EIPs icon indicating copy to clipboard operation
EIPs copied to clipboard

Update EIP-7702: remove chain_id in authorization tuple

Open fjl opened this issue 11 months ago • 4 comments
trafficstars

This is a counterproposal to #9143. Since the chain ID is already available in the context of the transaction, there is no need to specify it again in each authorization tuple. To preserve the special case of an authorization which is valid on all chains (chain_id == 0), a new boolean field unchained is added to the tuple in place of chain_id.

fjl avatar Dec 18 '24 14:12 fjl

File EIPS/eip-7702.md

Requires 1 more reviewers from @adietrichs, @lightclient, @samwilsn, @vbuterin

eth-bot avatar Dec 18 '24 14:12 eth-bot

I'm proposing this just because it's weird to duplicate a potentially large chainID in every authorization tuple. The chainID value will always be zero or equal to the tx chainID.

From an implementation point of view, the chainID is already an input to the signing function. This does not change with the PR, you still have to supply the chainID when signing an authorization. We just leave out the chainID in the encoded authorization object that goes into the transaction, and replace it with a single bit instead, which says if chainID was zero.

fjl avatar Dec 19 '24 09:12 fjl

Would this leave any room for replaying a chain specific authorisation tuple on a different chain?

gurukamath avatar Dec 19 '24 10:12 gurukamath

No, because the signed-over data still contains the chainID, and it will be verified with the chainID of the executing chain.

fjl avatar Dec 19 '24 10:12 fjl