-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can verify()
storage reads be trusted?
#2447
Comments
@roman-khimov can you help me? |
The behavior you've described is what will happen with current implementation, that's true.
The problem is that TxB is already in a block by that time, so its fees have to be paid and if We do have in-block transaction reverification in NeoGo, but it does it the same way regular verification happens --- independently for each transaction before block processing (we can't do it in other way without breaking compatibility). And it's mostly a safety check in that we'll just refuse a block with invalid transaction. Fixing your case actually requires not just reverification, but running/reverifying transactions before signing a block, so that we could exclude TxB from new block completely. Which certainly can be done, but it's a substantial change, so I doubt it's something for RC phase. |
Thanks for the clarifications @roman-khimov . In fact, I'm now a big defender of a single-verification system, and I recognize that Neo System needs to be paid anyway, otherwise it may suffer attacks. So I wouldn't defend (anymore) more flexibility during verification phase, I think this is decided already (a good decision). Neo will certainly get its GAS, and that's good. |
A recent discussion on neo-project/proposals#137 got me thinking: Can
verify()
storage reads be trusted?I'll put a simple example.
Am I really mistaken here, or Neo System will actually (and correctly) extract GAS fees and fund both operations, but on the other hand, ContractY will have allowed spending GAS from its account when its "owner" has already been changed?
Sorry for re-discussing things, we have discussed already many times the execution order of transactions and the precise points where re-verification happens, but as long as no re-verification happens between tx executions on block, I feel that ContractY will pay for something it shouldn't.
The text was updated successfully, but these errors were encountered: