Skip to content
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

fix ut case of TestBlockchainWithTxDAGDebug #213

Conversation

andyzhang2023
Copy link
Contributor

Description

The ut TestBlockchainWithTxDAGDebug failed and report two errors:

  1. invalid gas used:
        --- FAIL: TestBlockchainWithTxDAG/InvalidBlocks/bcStateTests/transactionFromSelfDestructedContract.json/transactionFromSelfDestructedContract_London (0.00s)
            block_test.go:134: test in path mode with snapshotter failed: block #1 insertion into chain failed: invalid gas used (remote: 95603 local: 70603)
        --- FAIL: TestBlockchainWithTxDAG/InvalidBlocks/bcStateTests/transactionFromSelfDestructedContract.json/transactionFromSelfDestructedContract_Merge (0.00s)
            block_test.go:134: test in path mode with snapshotter failed: block #1 insertion into chain failed: invalid gas used (remote: 95603 local: 70603)
        --- FAIL: TestBlockchainWithTxDAG/InvalidBlocks/bcStateTests/transactionFromSelfDestructedContract.json/transactionFromSelfDestructedContract_Shanghai (0.01s)
            block_test.go:134: test in path mode with snapshotter failed: block #1 insertion into chain failed: invalid gas used (remote: 95603 local: 70603)
  1. invalid mercle root:
            block_test.go:134: test in path mode with snapshotter failed: block #2 insertion into chain failed: invalid merkle root (remote: 602b01d9587fd41105414b9cb65d20918836a971e664fd8184b1cc99fce6b618 local: c76d6f3b4866e53c0bc66eb62890efff73b99196a34c235bb29b3771f98e98da) dberr: %!w(<nil>)

cause of invalid gas used

UncommittedDB forgets to load the code of an object before checking whether it is empty or not, which makes the method Empty() possiblely return false.

cause of invalid mercle root

(Unknown, to be continued)

@sunny2022da
Copy link
Collaborator

LGTM

@sunny2022da sunny2022da requested review from sunny2022da and welkin22 and removed request for bnoieh and redhdx November 1, 2024 01:15
@sunny2022da sunny2022da merged commit 7c1c919 into bnb-chain:feature/TxDAG-PEVM Nov 1, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants