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: adds init and timestamp genesis cli params #441

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

dutterbutter
Copy link
Collaborator

@dutterbutter dutterbutter commented Nov 26, 2024

What πŸ’»

  • adds init and timestamp genesis cli params

Why βœ‹

  • Anvil-zksync parity

Evidence πŸ“·

Include screenshots, screen recordings, or console output here demonstrating that your changes work as intended

Example usage

genesis.json:

{
  "hash": null,
  "parent_hash": null,
  "block_number": 0,
  "timestamp": 1638316800,
  "l1_batch_env": {
    "previous_batch_hash": null,
    "number": 0,
    "timestamp": 1732653220,
    "fee_input": {
      "PubdataIndependent": {
        "l1_gas_price": 1,
        "fair_l2_gas_price": 2,
        "fair_pubdata_price": 1000000000000000
      }
    },
    "fee_account": "0x0000000000000000000000000000000000000000",
    "enforced_base_fee": null,
    "first_l2_block": {
      "number": 0,
      "timestamp": 1638316800,
      "prev_block_hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "max_virtual_blocks_to_create": 0
    }
  },
  "transactions": [],
  "gas_used": null,
  "logs_bloom": null
}

init

./target/release/era_test_node --init genesis.json run

Timestamp:

./target/release/era_test_node --timestamp 1 run

@dutterbutter dutterbutter requested a review from a team as a code owner November 26, 2024 21:30
@dutterbutter dutterbutter added the needs review πŸ‘“ PR requires a review label Nov 26, 2024
@dutterbutter
Copy link
Collaborator Author

Note: will create separate issues to move this to its own Genesis Impl to reduce duplication, add validate(), tests.

@dutterbutter dutterbutter merged commit e5cd460 into main Nov 27, 2024
12 checks passed
@dutterbutter dutterbutter deleted the db/init-genesis-configuration branch November 27, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review πŸ‘“ PR requires a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants