Conversation
Codecov Report
@@ Coverage Diff @@
## master #770 +/- ##
==========================================
+ Coverage 36.58% 36.82% +0.24%
==========================================
Files 175 174 -1
Lines 12401 12262 -139
==========================================
- Hits 4537 4516 -21
+ Misses 7864 7746 -118
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
I like this simplification.
However, are we still going to perform multiple signatures on a transaction, @erikzhang?
I mean, nowdays we can sign an InvocationTx with several signers (singlesig, multisig and special_verification scripts) at the same time.
I saw that the Array of Witness has been simplified.
|
You can still use multisig as a |
|
The ideia is Multiple Signers (`CoSigner), @erikzhang. Sometimes we want to merge This enables interesting scenarios, in which we can even take funds for all of them together in a smart contract. |
|
The |
|
This change is very important for TPS (and to prevent attacks), let's think carefully on what can be cut (and how). Having undefinite number of attributes and witnesses is bad, I agree.
Ok, I get it now. So this is only for "Input" validation. Perhaps Inputs won't exist, so we will have an "invoker" or "sender" here? The one who pays fees.
Ok, so witnesses will be passed for internal contract processing. User signature is passed as argument on contract invocation, correct? This effectively simplifies a lot the architecture, and witness system can be considered effectively gone. bool Main(string op, object args[]) {
...
if ! CheckSignature((pubkey)args[0], (signature)args[1]) return false; // or FAULT
}Perhaps we should rename this single |
|
@erikzhang Example: REST Even on Neo 2.0 we could benefit of such strategies I guess, because at least some scripts aren't part of tx header, as far as I remember (or was it all of them already?) 🤔 |
|
neo/neo/SmartContract/Helper.cs Lines 261 to 265 in 01e56ef If it's a deployed contract, the |
|
Yes, I know that for deployed contracts, but I mean, even for regular contracts we can do that too if it's repeated in the past already. This saves a lot of space when exporting the chain (repeating over and over the VerificationScripts). We can do this on Neo 2.0 as well. What I mean is:
Another possibility is:
Nevermind, I checked and it can work already, since it's still out of SerializeUnsigned. I can leave this proposal for later: neo/neo/Network/P2P/Payloads/Transaction.cs Lines 163 to 173 in b16c084 |
Don't touch neo 2.0, just for bugs please 📦 |
|
I am scary about how this could affect some projects, for multisig wallets and check owners without multisig wallets... Every time that we want to change one of the owners, we will need to create a new multisign wallet? maybe is a good move, but we should provide a easy method for create this multisign wallet in neo-cli. |
|
There is a command in CLI: |
It's a plugin shargon, no core change. I can explain better later. Result of a brainstorming here.
I dont see how this can affect multisig.. its usually one witness, right ? |
|
Not multisign wallet, multi signatures for owners, without a multign wallet |
| { | ||
| engine.LoadScript(verification); | ||
| engine.LoadScript(verifiable.Witness.InvocationScript); | ||
| if (engine.Execute().HasFlag(VMState.FAULT)) return false; |
There was a problem hiding this comment.
I think that we shouldn't deal with VMState as a flag
vncoelho
left a comment
There was a problem hiding this comment.
It was a great PR and simplification, Erik. Nice job!
I still wonder about cosigners...however, we check it later.
Witnessin aTransaction.CosignerfromTransaction.Attributes.Wallet.MakeTransaction()to support SVM.NOTE: Which
SYSCALLs can be called by theValidationtrigger has been limited by the gas. See #771