Neo: [Neo3] Witnesses should deny access to Verification and Invocation script onchain

Created on 15 Aug 2019  路  8Comments  路  Source: neo-project/neo

I think we shouldn't give access to Verification or Invocation script on Neo3.
InvocationScript is already non-deterministic, and cut-off on Neo2, but Verification can also be not good to access, if we follow a "Neo SegWit" logic... If we use it on script, we need it to execute the script, so this ties us forever to maintaining that witness on blockchain.
If user really wants to handle VerificationScript, it should pass it manually on Entry (Script) to the contract, that takes the Hash160 and matches against a known witness.
It's much better for network optimizations (we can easily drop all Witnesses in short time periods).

enhancement ready-to-implement vm

All 8 comments

Related to: https://github.com/neo-project/neo/issues/906 (this allows us to safely name a onchain feature as "Witness", and it would be corresponding to a Verification ScriptHash)

Related to: #840 (Witness price is just instantaneous price, not future prices).

Ok, we got the blessing of master yoda here... so I'll put it ready-to-implement xD

This is an easy task, good to invite new souls to interact :)

Here's the specification:

  • Remove Neo.Witness.GetVerificationScript interop call
  • Remove Neo.Transaction.GetWitnesses interop call (since Neo.Witness.* prefix will cease to exist).

After this is done, some stuff can be done on neo-devpack-dotnet too... basically remove Witness class and GetWitness call from Transaction.

Easy to do? 馃槀
Please, let's leave at least 2 days in the design phase so are sure this is implemented correctly.
Thanks

Pros and cons of this proposal?

I only see pros.
Cons would exist on neo2, as a breaking change
On neo3 thats fine, people can still implement same stuff by explicitly passing verifscript, so no cons to me.

but what are the pros @igormcoelho? I also didn't understand the design.
@neo-project/core if you guys are in agreement, I think we can put this into ready-to-implement, I'm not doing it because I can't really understand the changes required.

According to Erik's comment https://github.com/neo-project/neo/pull/1081#discussion_r323067104 I think this will be resolved with these refactors

According to Erik's comment #1081 (comment) I think this will be resolved with these refactors

Thanks for informing @shargon . It's a good place to fix this :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shargon picture shargon  路  3Comments

canesin picture canesin  路  3Comments

shargon picture shargon  路  4Comments

vncoelho picture vncoelho  路  4Comments

igormcoelho picture igormcoelho  路  4Comments