Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.

add TxReceipt constraint in begin&end tx#181

Merged
ed255 merged 7 commits into
privacy-ethereum:masterfrom
scroll-tech:tx_logid
Apr 29, 2022
Merged

add TxReceipt constraint in begin&end tx#181
ed255 merged 7 commits into
privacy-ethereum:masterfrom
scroll-tech:tx_logid

Conversation

@DreamWuGit
Copy link
Copy Markdown
Collaborator

@DreamWuGit DreamWuGit commented Apr 13, 2022

this PR aims to resolve issue #177 to add constraint to TxReceipt tag.

  • (1) In begin_Tx gadget, log_id should reset to zero at the beginning.
    In end_tx gadget, log_id should match with LogLength of TxReceipt RW table.
  • (2) PostStateOrStatus should be equal to tx status in end_tx
  • (3) current receipt's CumulativeGasUsed =.pre receipt's CumulativeGasUsed + current tx gas cost

@DreamWuGit DreamWuGit marked this pull request as ready for review April 14, 2022 07:41
@DreamWuGit DreamWuGit requested review from a team and CPerezz April 14, 2022 07:41
@DreamWuGit DreamWuGit changed the title add logid constraint in begin&end tx add TxReceipt constraint in begin&end tx Apr 14, 2022
Copy link
Copy Markdown
Contributor

@CPerezz CPerezz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a first review round.

So far looking good! 👍

Comment thread src/zkevm_specs/evm/execution/end_tx.py Outdated
Comment thread src/zkevm_specs/evm/instruction.py Outdated
Comment thread src/zkevm_specs/evm/instruction.py Outdated
@DreamWuGit
Copy link
Copy Markdown
Collaborator Author

@ed255 Could you also have a look ?

Comment thread src/zkevm_specs/evm/execution/begin_tx.py Outdated
Comment thread tests/evm/test_end_tx.py Outdated
Comment thread src/zkevm_specs/evm/execution/end_tx.py
Copy link
Copy Markdown
Contributor

@ed255 ed255 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for working on this :)

Copy link
Copy Markdown
Contributor

@CPerezz CPerezz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants