V1.10.2 statediff 0.0.20 #68
Merged
telackey
merged 12 commits from 2021-05-03 18:18:41 +00:00
v1.10.2-statediff-0.0.20 into v1.10.2-statediff
No Reviewers
Labels
Clear labels
bug
critical
duplicate
enhancement
epic
help wanted
in progress
invalid
low priority
question
rebase
v1
v5
wontfix
Copied from Github
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
An issue or PR manually copied from GitHub.
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cerc-io/go-ethereum#68
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This took a lot longer than expected. This includes the fixes to support EIP-2718/EIP-2930 transactions.
tx_typefield in thetransaction_cidstableaccess_list_elementtable which contains the access list elements which reference thetransaction_cidstx they belong to by FKMarshalBinaryandUnmarshalBinarymethods forReceipt. This should probably be upstreamed, they ought to already exist as they are counterparts to analogousTransactionmethods.To add to that last point:
A lot of confusion was due to these methods not existing on
Receiptand the methods we previously used,EncodeRLP/DecodeRLP, now being under documented and overloaded.In particular, the
EncodeRLPmethod for an EIP-2718 tx is outputtingrlp(TransactionType || TransactionPayload). For EIP-2930 txs this isrlp(0x01 || rlp([chainId, nonce, gasPrice, gasLimit, to, value, data, access_list, yParity, senderR, senderS])).This makes sense from the definition of Transaction in EIP-2718:
"Transaction is either TransactionType || TransactionPayload or LegacyTransaction"
So the RLP encoding of Transaction is either
rlp(TransactionType || TransactionPayload)orrlp(LegacyTransaction).But EIP-2718 also states
"LegacyTransaction is rlp([nonce, gasPrice, gasLimit, to, value, data, v, r, s])"
So strictly following the same logic that is being used for a 2718 Transaction would suggest the output of
EncodeRLPfor a legacy Transaction should berlp(rlp([nonce, gasPrice, gasLimit, to, value, data, v, r, s])).When I get time I may upstream a patch to the EIP doc to help clarify this as well, but I need to give it some more thought.
In this context it is more appropriate to define
LegacyTransactionandLegacyReceiptin EIP-2718 as"LegacyTransaction is [nonce, gasPrice, gasLimit, to, value, data, v, r, s]" and "LegacyReceipt is [status, cumulativeGasUsed, logsBloom, logs]"
Except then the assertion that "the transaction/receipt root in the block header MUST be the root hash of patriciaTrie(rlp(Index) => Transaction)" breaks down as for legacy txs it expects
rlp([nonce, gasPrice, gasLimit, to, value, data, v, r, s])and for 2718 it expectsTransactionType || TransactionPayload, notrlp(TransactionType || TransactionPayload).Awesome work. Please make the appropriate upstream PRs. Thanks!