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

feat: custom l1 price #294

Merged
merged 10 commits into from
Jun 27, 2024
Merged

feat: custom l1 price #294

merged 10 commits into from
Jun 27, 2024

Conversation

vbar
Copy link
Contributor

@vbar vbar commented Jun 17, 2024

What 💻

Made the L1 price overridable from command line, in both forking and standalone mode.

Why ✋

Transactions succeed of fail depending on the node fees, and users/developers might want to experiment with that.

Evidence 📷

Example (in replay mode):

$ ./target/release/era_test_node --show-calls=all --show-outputs --show-vm-details=all --resolve-hashes replay_tx sepolia-testnet 0xadf8319da65e377909e41a4806cb24eb7090cbdaf4521fad5084cfa933ce1849
10:31:45  INFO Creating fork from "https://sepolia.era.zksync.dev:443" L1 block: L1BatchNumber(8961) L2 block: 2386764 with timestamp 1715930527, L1 gas price 157087620156, L2 fair gas price 25000000 and protocol version: Some(Version24)
...
[!] Halt Reason:    virtual machine entered unexpected state. Please contact developers and provide transaction details that caused this error. Error description: Block.basefee is greater than max fee per gas

vs.

$ ./target/release/era_test_node --show-calls=all --show-outputs --show-vm-details=all --resolve-hashes --l1-gas-price=15708762015 replay_tx sepolia-testnet 0xadf8319da65e377909e41a4806cb24eb7090cbdaf4521fad5084cfa933ce1849
10:33:47  INFO Creating fork from "https://sepolia.era.zksync.dev:443" L1 block: L1BatchNumber(8961) L2 block: 2386764 with timestamp 1715930527, L1 gas price 157087620156, L2 fair gas price 25000000 and protocol version: Some(Version24)
10:33:47  INFO Starting node with L2 gas price set to 25_000_000
10:33:47  INFO L1 gas price set to 15_708_762_015 (overridden from 157_087_620_156)
...
10:33:51  INFO Transaction: SUCCESS

@vbar vbar requested a review from a team as a code owner June 17, 2024 10:35
MexicanAce
MexicanAce previously approved these changes Jun 27, 2024
Copy link
Collaborator

@MexicanAce MexicanAce left a comment

Choose a reason for hiding this comment

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

LGTM

@vbar
Copy link
Contributor Author

vbar commented Jun 27, 2024

LGTM

Sorry, not quite - clippy complained... This time, for sure... :-)

@MexicanAce MexicanAce merged commit 788dc0a into matter-labs:main Jun 27, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants