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: Boost the size of the non-revertible reads/writes #4688

Merged
merged 5 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions l1-contracts/src/core/libraries/ConstantsGen.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ library Constants {
uint256 internal constant MAX_PUBLIC_CALL_STACK_LENGTH_PER_TX = 8;
uint256 internal constant MAX_NON_REVERTIBLE_PUBLIC_CALL_STACK_LENGTH_PER_TX = 3;
uint256 internal constant MAX_REVERTIBLE_PUBLIC_CALL_STACK_LENGTH_PER_TX = 5;
uint256 internal constant MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX = 16;
uint256 internal constant MAX_NON_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX = 1;
uint256 internal constant MAX_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX = 15;
uint256 internal constant MAX_PUBLIC_DATA_READS_PER_TX = 16;
uint256 internal constant MAX_NON_REVERTIBLE_PUBLIC_DATA_READS_PER_TX = 1;
uint256 internal constant MAX_REVERTIBLE_PUBLIC_DATA_READS_PER_TX = 15;
uint256 internal constant MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX = 32;
uint256 internal constant MAX_NON_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX = 16;
uint256 internal constant MAX_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX = 16;
uint256 internal constant MAX_PUBLIC_DATA_READS_PER_TX = 32;
uint256 internal constant MAX_NON_REVERTIBLE_PUBLIC_DATA_READS_PER_TX = 16;
uint256 internal constant MAX_REVERTIBLE_PUBLIC_DATA_READS_PER_TX = 16;
uint256 internal constant MAX_NEW_L2_TO_L1_MSGS_PER_TX = 2;
uint256 internal constant MAX_NEW_CONTRACTS_PER_TX = 1;
uint256 internal constant MAX_READ_REQUESTS_PER_TX = 128;
Expand All @@ -62,10 +62,10 @@ library Constants {
uint256 internal constant NOTE_HASH_SUBTREE_HEIGHT = 6;
uint256 internal constant NOTE_HASH_SUBTREE_SIBLING_PATH_LENGTH = 26;
uint256 internal constant NULLIFIER_SUBTREE_HEIGHT = 6;
uint256 internal constant PUBLIC_DATA_SUBTREE_HEIGHT = 4;
uint256 internal constant PUBLIC_DATA_SUBTREE_HEIGHT = 5;
uint256 internal constant ARCHIVE_HEIGHT = 16;
uint256 internal constant NULLIFIER_SUBTREE_SIBLING_PATH_LENGTH = 14;
uint256 internal constant PUBLIC_DATA_SUBTREE_SIBLING_PATH_LENGTH = 36;
uint256 internal constant PUBLIC_DATA_SUBTREE_SIBLING_PATH_LENGTH = 35;
uint256 internal constant L1_TO_L2_MSG_SUBTREE_HEIGHT = 4;
uint256 internal constant L1_TO_L2_MSG_SUBTREE_SIBLING_PATH_LENGTH = 12;
uint256 internal constant FUNCTION_SELECTOR_NUM_BYTES = 4;
Expand Down Expand Up @@ -115,7 +115,7 @@ library Constants {
uint256 internal constant GET_NOTES_ORACLE_RETURN_LENGTH = 674;
uint256 internal constant COMMITMENTS_NUM_BYTES_PER_BASE_ROLLUP = 2048;
uint256 internal constant NULLIFIERS_NUM_BYTES_PER_BASE_ROLLUP = 2048;
uint256 internal constant PUBLIC_DATA_WRITES_NUM_BYTES_PER_BASE_ROLLUP = 1024;
uint256 internal constant PUBLIC_DATA_WRITES_NUM_BYTES_PER_BASE_ROLLUP = 2048;
uint256 internal constant CONTRACTS_NUM_BYTES_PER_BASE_ROLLUP = 32;
uint256 internal constant CONTRACT_DATA_NUM_BYTES_PER_BASE_ROLLUP = 64;
uint256 internal constant CONTRACT_DATA_NUM_BYTES_PER_BASE_ROLLUP_UNPADDED = 52;
Expand Down
22 changes: 11 additions & 11 deletions l1-contracts/test/fixtures/empty_block_0.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions l1-contracts/test/fixtures/empty_block_1.json

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions l1-contracts/test/fixtures/mixed_block_0.json

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions l1-contracts/test/fixtures/mixed_block_1.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ impl BaseRollupInputs {
// Consist of
// MAX_NEW_COMMITMENTS_PER_TX fields for commitments
// MAX_NEW_NULLIFIERS_PER_TX fields for nullifiers
// 16 public data update requests -> 32 fields
// 32 public data update requests -> 64 fields
// 2 l2 -> l1 messages -> 2 fields
// 1 contract deployments -> 3 fields
// 1 encrypted logs hashes -> 2 fields --> 2 sha256 hashes --> 64 bytes
Expand Down Expand Up @@ -498,7 +498,7 @@ fn consistent_not_hash_subtree_width() {
);
}

global CALLDATA_HASH_INPUT_SIZE = 169;
global CALLDATA_HASH_INPUT_SIZE = 201;

#[test]
fn consistent_calldata_hash_input_size() {
Expand All @@ -522,7 +522,7 @@ fn consistent_call_data_hash_log_fields() {
);
}

global CALL_DATA_HASH_FULL_FIELDS = 165;
global CALL_DATA_HASH_FULL_FIELDS = 197;

#[test]
fn consistent_call_data_hash_full_fields() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ global MAX_PUBLIC_CALL_STACK_LENGTH_PER_TX: Field = 8;
global MAX_NON_REVERTIBLE_PUBLIC_CALL_STACK_LENGTH_PER_TX: Field = 3;
global MAX_REVERTIBLE_PUBLIC_CALL_STACK_LENGTH_PER_TX: Field = 5;

global MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX: Field = 16;
global MAX_NON_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX: Field = 1;
global MAX_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX: Field = 15;
global MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX: Field = 32;
global MAX_NON_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX: Field = 16;
global MAX_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX: Field = 16;

global MAX_PUBLIC_DATA_READS_PER_TX: Field = 16;
global MAX_NON_REVERTIBLE_PUBLIC_DATA_READS_PER_TX: Field = 1;
global MAX_REVERTIBLE_PUBLIC_DATA_READS_PER_TX: Field = 15;
global MAX_PUBLIC_DATA_READS_PER_TX: Field = 32;
global MAX_NON_REVERTIBLE_PUBLIC_DATA_READS_PER_TX: Field = 16;
global MAX_REVERTIBLE_PUBLIC_DATA_READS_PER_TX: Field = 16;

global MAX_NEW_L2_TO_L1_MSGS_PER_TX: Field = 2;
global MAX_NEW_CONTRACTS_PER_TX: Field = 1;
Expand Down Expand Up @@ -84,10 +84,10 @@ global CONTRACT_SUBTREE_SIBLING_PATH_LENGTH: Field = 16;
global NOTE_HASH_SUBTREE_HEIGHT: Field = 6;
global NOTE_HASH_SUBTREE_SIBLING_PATH_LENGTH: Field = 26;
global NULLIFIER_SUBTREE_HEIGHT: Field = 6;
global PUBLIC_DATA_SUBTREE_HEIGHT: Field = 4;
global PUBLIC_DATA_SUBTREE_HEIGHT: Field = 5;
global ARCHIVE_HEIGHT: Field = 16;
global NULLIFIER_SUBTREE_SIBLING_PATH_LENGTH: Field = 14;
global PUBLIC_DATA_SUBTREE_SIBLING_PATH_LENGTH: Field = 36;
global PUBLIC_DATA_SUBTREE_SIBLING_PATH_LENGTH: Field = 35;
global L1_TO_L2_MSG_SUBTREE_HEIGHT: Field = 4;
global L1_TO_L2_MSG_SUBTREE_SIBLING_PATH_LENGTH: Field = 12;

Expand Down Expand Up @@ -169,7 +169,7 @@ global TX_REQUEST_LENGTH: Field = 17;
global GET_NOTES_ORACLE_RETURN_LENGTH: Field = 674;
global COMMITMENTS_NUM_BYTES_PER_BASE_ROLLUP: Field = 2048;
global NULLIFIERS_NUM_BYTES_PER_BASE_ROLLUP: Field = 2048;
global PUBLIC_DATA_WRITES_NUM_BYTES_PER_BASE_ROLLUP: Field = 1024;
global PUBLIC_DATA_WRITES_NUM_BYTES_PER_BASE_ROLLUP: Field = 2048;
global CONTRACTS_NUM_BYTES_PER_BASE_ROLLUP: Field = 32;
global CONTRACT_DATA_NUM_BYTES_PER_BASE_ROLLUP: Field = 64;
global CONTRACT_DATA_NUM_BYTES_PER_BASE_ROLLUP_UNPADDED: Field = 52;
Expand Down
18 changes: 9 additions & 9 deletions yarn-project/circuits.js/src/constants.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ export const MAX_PRIVATE_CALL_STACK_LENGTH_PER_TX = 8;
export const MAX_PUBLIC_CALL_STACK_LENGTH_PER_TX = 8;
export const MAX_NON_REVERTIBLE_PUBLIC_CALL_STACK_LENGTH_PER_TX = 3;
export const MAX_REVERTIBLE_PUBLIC_CALL_STACK_LENGTH_PER_TX = 5;
export const MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX = 16;
export const MAX_NON_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX = 1;
export const MAX_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX = 15;
export const MAX_PUBLIC_DATA_READS_PER_TX = 16;
export const MAX_NON_REVERTIBLE_PUBLIC_DATA_READS_PER_TX = 1;
export const MAX_REVERTIBLE_PUBLIC_DATA_READS_PER_TX = 15;
export const MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX = 32;
export const MAX_NON_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX = 16;
export const MAX_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX = 16;
export const MAX_PUBLIC_DATA_READS_PER_TX = 32;
export const MAX_NON_REVERTIBLE_PUBLIC_DATA_READS_PER_TX = 16;
export const MAX_REVERTIBLE_PUBLIC_DATA_READS_PER_TX = 16;
export const MAX_NEW_L2_TO_L1_MSGS_PER_TX = 2;
export const MAX_NEW_CONTRACTS_PER_TX = 1;
export const MAX_READ_REQUESTS_PER_TX = 128;
Expand All @@ -48,10 +48,10 @@ export const CONTRACT_SUBTREE_SIBLING_PATH_LENGTH = 16;
export const NOTE_HASH_SUBTREE_HEIGHT = 6;
export const NOTE_HASH_SUBTREE_SIBLING_PATH_LENGTH = 26;
export const NULLIFIER_SUBTREE_HEIGHT = 6;
export const PUBLIC_DATA_SUBTREE_HEIGHT = 4;
export const PUBLIC_DATA_SUBTREE_HEIGHT = 5;
export const ARCHIVE_HEIGHT = 16;
export const NULLIFIER_SUBTREE_SIBLING_PATH_LENGTH = 14;
export const PUBLIC_DATA_SUBTREE_SIBLING_PATH_LENGTH = 36;
export const PUBLIC_DATA_SUBTREE_SIBLING_PATH_LENGTH = 35;
export const L1_TO_L2_MSG_SUBTREE_HEIGHT = 4;
export const L1_TO_L2_MSG_SUBTREE_SIBLING_PATH_LENGTH = 12;
export const FUNCTION_SELECTOR_NUM_BYTES = 4;
Expand Down Expand Up @@ -101,7 +101,7 @@ export const TX_REQUEST_LENGTH = 17;
export const GET_NOTES_ORACLE_RETURN_LENGTH = 674;
export const COMMITMENTS_NUM_BYTES_PER_BASE_ROLLUP = 2048;
export const NULLIFIERS_NUM_BYTES_PER_BASE_ROLLUP = 2048;
export const PUBLIC_DATA_WRITES_NUM_BYTES_PER_BASE_ROLLUP = 1024;
export const PUBLIC_DATA_WRITES_NUM_BYTES_PER_BASE_ROLLUP = 2048;
export const CONTRACTS_NUM_BYTES_PER_BASE_ROLLUP = 32;
export const CONTRACT_DATA_NUM_BYTES_PER_BASE_ROLLUP = 64;
export const CONTRACT_DATA_NUM_BYTES_PER_BASE_ROLLUP_UNPADDED = 52;
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/e2e_fees.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('e2e_fees', () => {
});

describe('NativeFeePaymentMethod', () => {
it.skip('pays out the expected fee to the sequencer', async () => {
it('pays out the expected fee to the sequencer', async () => {
await testContract.methods
.mint_public(aliceAddress, 1000)
.send({
Expand Down
Loading
Loading