Update EIP-8141: Spec cleanup and clarifications#11814
Conversation
File
|
| - If `mode` is `SENDER` or `DEFAULT`: | ||
| - Return successfully as if calling empty code. | ||
|
|
||
| > TODO: Can we pass signature index as calldata? Why don't we support P256 signature scheme as well? |
There was a problem hiding this comment.
I think the signature index thing is mostly an optimization for quantum (since the outer signatures can be aggregated and then removed from the txns), which is not really useful here since the signature is ECDSA.
Re why no P256 support -- supporting P256 in the default code means that we'd have to support P256-EOAs, where the EOA address is derived from P256 pub key. My initial version of default code actually did support that, but after some discussions with @lightclient we decided to remove it since introducing a new class of passkey-derived EOAs may open a can of worms that is hard to put back.
There was a problem hiding this comment.
By the way, another TODO for the default code is that we need to define a gas schedule for it. Since the default code is implemented not in the EVM but rather in client code, it's not clear how much gas it costs, unless we define it.
Or, we could define the default code in terms of EVM bytecode.
There was a problem hiding this comment.
I think signature index makes design cleaner. Why would code iterate over all signatures and try to check which one of them matches the requirements (scheme, msg, target), when we can just pass the index and it only checks one. Also, having index would make it easier to design gas schedule (if we want it to be executed as client code rather than EVM bytecode).
Regarding P256 support, I can see that as a good enough reason. It's something we can easily add in the future.
Clean up of the EIP-8141 spec. Some highlighter changes:
sig.signercan be empty and defaults totx.sendersig.signaturebytes are elided for allsig_hashsig.msgindirectly commits tosig.signaturesas wellNote
I left several
TODOin the code where I think we might want to change / clarify something. These should be resolved before merging.