-
Notifications
You must be signed in to change notification settings - Fork 649
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
STUB: New transaction format #194
Comments
I'm gonna start working on this, but disregard any account abstraction stuff for the moment (as there's no clear/single specification yet). So the transaction object will include nonce and signature. Removing those should be trivial later. |
@jannikluhn I will add a new ticket for |
I updated the @jannikluhn @hwwhww Please let me know if there's any update that's missing regarding the new transaction format. |
@NIC619 I think the only thing wrong with the transaction format itself is that
Good point, my guess is that with stateless clients gas costs of state access in general will need to be revised significantly. |
Could you open a new ticket to describe "constructing the access list"? Or reopen #192 for the whole access restriction mechanism? 🙂
Is it already be included in the cost of |
Will do.
Charging per access list entry would mean that accessing the same storage slot multiple times wouldn't cost more which is reasonable. On the other hand we can't discriminate between read and writes there. So a combination of both would probably make sense. |
@jannikluhn yes,
I think there would be something like
@ jannikluhn Can you elaborate more on "The problem here is that changing the access list potentially changes the code path (as it changes SIGHASH)."? Sorry I didn't follow.
@hwwhww My understanding is that it will be charged twice. One as the cost of witness data and one as data operated by |
IMO doing this with an execution mode is a bad idea; it would break in any scenario where the keys accessed depend even slightly on variables that could be affected by third parties. The access lists should be generated by something which gets added to Viper; you would pass a function name and arguments and Viper would reply back with what addresses and storage keys could get read or written. For now, I recommend that we stick to setting the access list to be the sender and receiver, including their entire storage, and possibly add a field for "manually add an additional address" for transactions to contracts that trigger payouts to third-party addresses; don't bother doing partial storage witnesses until later. Even sender and receiver only covers a huge number of use cases.
Yep! My personal preference at the moment BTW is that we charge a clean 4 gas per byte for all transaction or witness data, and we compute witness sizes based on the trie/state root at the start of collation execution (ie. part of the witness verification step of verifying a collation). Regarding cost of SLOAD and SSTORE, I recommend just keeping the status quo for now.
I think the solution may be simpler. Rather than just returning success or failure, we could return two kinds of failure, one where PAYGAS is executed, and if so with what gasprice, and the other where PAYGAS is not executed. |
See sharding doc
Transaction
format (depend on Account Abstraction #203 and STUB: Account access restriction #192)The format of a transaction now becomes:
- [ ] Updateapply_transaction
function procedureThe text was updated successfully, but these errors were encountered: