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

refactor: use simulate instead of timebased input #10991

Open
Tracked by #9456
LHerskind opened this issue Jan 2, 2025 · 0 comments
Open
Tracked by #9456

refactor: use simulate instead of timebased input #10991

LHerskind opened this issue Jan 2, 2025 · 0 comments
Assignees
Labels
C-l1-contracts Component: contracts deployed to L1 C-node Component: Aztec Node T-refactor Type: this code needs refactoring

Comments

@LHerskind
Copy link
Contributor

A few of our contracts have had extra functions added to allow passing "time" as input instead of using the block.timestamp to allow us to simulate the execution in the future. While some nodes support providing "block overrides", viem which we used did not expose it, so we just added it as argument to work around it first.

However, versions >= 2.22.0 of viem now support it https://viem.sh/docs/actions/public/simulate, so we can delete a few of our extra functions and use the overrides instead.

BEFORE doing all the changes, check that it works with anvil, as it might not have the needed functionality.

@LHerskind LHerskind added C-l1-contracts Component: contracts deployed to L1 C-node Component: Aztec Node T-refactor Type: this code needs refactoring labels Jan 2, 2025
@spypsy spypsy self-assigned this Jan 13, 2025
spypsy added a commit that referenced this issue Jan 24, 2025
Relevant to #10991 but not 'Fixes' because anvil doesn't support
`eth_simulateV1` so we can't yet remove all time-based inputs in L1

Fixes #11341 

- We now try to `simulate` the 'propose' & 'proposeAndClaim'
transactions, using the appropriate timestamp, instead of using
hardcoded 12M gas.
- Also some updates to logging where we 
  1. Try to decode errors from our Rollup ABI
2. truncate large Hexes but still include them in error data so txs can
be investigated
- Update slot duration to 36 for sepolia deployments

Follow-up from this: #11390 #11440

---------

Co-authored-by: Santiago Palladino <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-l1-contracts Component: contracts deployed to L1 C-node Component: Aztec Node T-refactor Type: this code needs refactoring
Projects
None yet
Development

No branches or pull requests

2 participants