Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Fix: allow skipping of L1Msg tx part 2 i.e. calculate num_all_txs in tx circuit#764

Closed
kunxian-xia wants to merge 10 commits into
release-v0.5.xfrom
release-v0.5.x-allow-skip-part2
Closed

Fix: allow skipping of L1Msg tx part 2 i.e. calculate num_all_txs in tx circuit#764
kunxian-xia wants to merge 10 commits into
release-v0.5.xfrom
release-v0.5.x-allow-skip-part2

Conversation

@kunxian-xia
Copy link
Copy Markdown

@kunxian-xia kunxian-xia commented Aug 14, 2023

Description

This PR aims to add constraints on tx.block_number in tx table. We group txs with same block number and then get the
num_all_txs in each group (i.e. block). Then we do lookup arg into block table in tx circuit. Since the num_txs in pi's chunk data hash preimage means num_all_txs now, we now copy it to the NumAllTxs row in block table. That is, the NumTxs and CumNumTxs in block number is not constrained by pi circuit then.

The lookup arg into block table in tx circuit are done at tag == BlockNum rows and it looks as

  • the input expr is (NumAllTxs, tx_table.value, num_all_txs_acc).

This is the 2nd part of the #760.

Issue Link

#759

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

@kunxian-xia kunxian-xia changed the title Fix: allow skipping of L1Msg tx part 2 i.e. calculate num_l1_msgs and num_l2_txs in tx circuit Fix: allow skipping of L1Msg tx part 2 i.e. calculate num_all_txs in tx circuit Aug 14, 2023
@kunxian-xia kunxian-xia requested a review from icemelon August 15, 2023 06:53
Comment thread zkevm-circuits/src/tx_circuit.rs Outdated
Comment thread zkevm-circuits/src/tx_circuit.rs Outdated
Comment thread zkevm-circuits/src/tx_circuit.rs Outdated
Comment thread zkevm-circuits/src/tx_circuit.rs Outdated
Comment thread zkevm-circuits/src/tx_circuit.rs Outdated
Comment thread zkevm-circuits/src/tx_circuit.rs Outdated
Comment thread zkevm-circuits/src/tx_circuit.rs Outdated
Comment thread zkevm-circuits/src/tx_circuit.rs Outdated
@kunxian-xia kunxian-xia changed the base branch from release-v0.5.x to develop August 16, 2023 02:58
@kunxian-xia kunxian-xia changed the base branch from develop to release-v0.5.x August 16, 2023 02:58
@kunxian-xia
Copy link
Copy Markdown
Author

kunxian-xia commented Aug 16, 2023

Close this as we have it rebased against develop branch. #778

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants