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

chore: Move epoch and slot durations to config #9861

Merged
merged 4 commits into from
Nov 9, 2024

Conversation

spalladino
Copy link
Collaborator

@spalladino spalladino commented Nov 8, 2024

De-enshrines the following constants and turns them into config:

ETHEREUM_SLOT_DURATION = 12;
AZTEC_SLOT_DURATION = 24;
AZTEC_EPOCH_DURATION = 16;
AZTEC_TARGET_COMMITTEE_SIZE = 48;
AZTEC_EPOCH_PROOF_CLAIM_WINDOW_IN_L2_SLOTS = 13;

These can now be set via env vars. On L1, they are set as immutable variables across all contracts that require them. As for circuits, none of them was needed, except for the epoch duration to be able to dimension the fees array. This was handled by introducing a new MAX_EPOCH_DURATION constant (32) which sets the max length of the array.

This is a prerequisite to #9809

@spalladino spalladino enabled auto-merge (squash) November 8, 2024 21:02
@spalladino spalladino force-pushed the palla/durations-as-config branch 2 times, most recently from 098611a to 52ba943 Compare November 8, 2024 21:12
@just-mitch just-mitch added the hotfix A PR/issue that needs to be cherrypicked back to the RC label Nov 8, 2024
Copy link
Contributor

@just-mitch just-mitch left a comment

Choose a reason for hiding this comment

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

Awesome. Nice one!

Copy link
Contributor

github-actions bot commented Nov 8, 2024

Changes to circuit sizes

Generated at commit: d49f8d9d243da89e1a1c5a79ef83f35f1327f700, compared to commit: 23c122d36091b3b756084584ecba59b800196d58

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
rollup_root +6,944 ❌ +137.75% +29,107 ❌ +1.52%
rollup_block_merge +6,944 ❌ +137.31% +29,107 ❌ +1.52%
rollup_block_root_empty +32 ❌ +51.61% +32 ❌ +1.12%
rollup_block_root +32 ❌ +0.72% +32 ❌ +0.00%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
rollup_root 11,985 (+6,944) +137.75% 1,940,902 (+29,107) +1.52%
rollup_block_merge 12,001 (+6,944) +137.31% 1,940,916 (+29,107) +1.52%
rollup_block_root_empty 94 (+32) +51.61% 2,891 (+32) +1.12%
rollup_block_root 4,485 (+32) +0.72% 2,863,248 (+32) +0.00%

@spalladino spalladino force-pushed the palla/durations-as-config branch 2 times, most recently from 3cb4633 to 56519b1 Compare November 8, 2024 22:21
De-enshrines the following constants and turns them into config:

```
ETHEREUM_SLOT_DURATION = 12;
AZTEC_SLOT_DURATION = 24;
AZTEC_EPOCH_DURATION = 16;
AZTEC_TARGET_COMMITTEE_SIZE = 48;
AZTEC_EPOCH_PROOF_CLAIM_WINDOW_IN_L2_SLOTS = 13;
```

These can now be set via env vars. On L1, they are set as immutable
variables across all contracts that require them. As for circuits, none
of them was needed, except for the epoch duration to be able to
dimension the fees array. This was handled by introducing a new
MAX_EPOCH_DURATION constant (32) which sets the max length of the array.

This is a prerequisite to #9809
@spalladino spalladino merged commit bfd4f2c into master Nov 9, 2024
66 checks passed
@spalladino spalladino deleted the palla/durations-as-config branch November 9, 2024 02:35
TomAFrench added a commit that referenced this pull request Nov 11, 2024
* master: (182 commits)
  feat(avm): mem specific range check (#9828)
  refactor: remove public kernel inner (#9865)
  chore: Revert "chore: Validate RPC inputs" (#9875)
  Revert "fix: deploy l2 contracts fails on 48 validator" (#9871)
  fix: deploy l2 contracts fails on 48 validator (#9860)
  chore: Validate RPC inputs (#9672)
  fix: fixing devcontainers to use the sandbox docker-compose file (#9782)
  fix: Revert changes to ci.yml (#9863)
  chore: Move epoch and slot durations to config (#9861)
  git subrepo push --branch=master noir-projects/aztec-nr
  git_subrepo.sh: Fix parent in .gitrepo file. [skip ci]
  chore: replace relative paths to noir-protocol-circuits
  git subrepo push --branch=master barretenberg
  fix: tree heights that last past 3 days (#9760)
  fix(build): l1-contracts .rebuild_patterns did not cover test files (#9862)
  fix: bench prover test (#9856)
  fix: Fix mac build by calling `count` on durations (#9855)
  feat: zk shplemini (#9830)
  feat: domain separate block proposals and attestations (#9842)
  chore: bump runner cache disk size (#9849)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotfix A PR/issue that needs to be cherrypicked back to the RC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants