MinaProtocol / mina

Mina is a cryptocurrency protocol with a constant size blockchain, improving scaling while maintaining decentralization and security.
https://minaprotocol.com
Apache License 2.0
1.99k stars 528 forks source link

Integration Test: Bootstrap w/ Epoch Ledgers #7689

Open nholland94 opened 3 years ago

nholland94 commented 3 years ago

Create a new test which tests the same properties as the existing bootstrap test, but starts the network in a state that has non-genesis epoch ledgers. Doing this will require adding support to the daemon's configuration to have non-genesis epoch ledgers in the genesis block, and to make the rocksdb instances for those non-genesis ledgers available to the nodes we deploy. To make the epoch ledgers themselves, it should suffice to take the epoch ledger and simulate a few transactions on top of it, taking 2 db snapshots along the way.

Implementing this will meet the acceptance feature requirement for non-genesis epoch ledgers.

vanarasiantonyswamy commented 1 year ago

Depends on https://app.zenhub.com/workspaces/velocity-62264fddc441a100183f7f86/issues/gh/minaprotocol/mina/13520 https://app.zenhub.com/workspaces/velocity-62264fddc441a100183f7f86/issues/gh/minaprotocol/mina/13521

vanarasiantonyswamy commented 1 year ago

Being new to OCAML- i am breaking this task into two - This task is broken into 2 parts Update mina_automation to support change of epoch ledger Part 1 https://app.zenhub.com/workspaces/velocity-62264fddc441a100183f7f86/issues/gh/minaprotocol/mina/13520

  1. create a new file
  2. Write slots_per_epoch =15 & K=2 =[DONE} 2.a :check i can kick off test executive. => Steven will help unblock [DONE]
  3. wait for 2 epochs before we do bootstrap => will need pointers, read existing code for any lead, if not post on slack -> AM Here.

    Update test_executive to support epoch ledger for automation Part II https://app.zenhub.com/workspaces/velocity-62264fddc441a100183f7f86/issues/gh/minaprotocol/mina/13521 TASK:

  4. sending out transaction periodically to fill the scan state
  5. make sure snarked ledger changed before each epoch

Exit Criteria: Implement above and run test using executive send for Code Review

Part 3 : Integrate as part of nightly run as this will take time to run the tests At present the nightly run has some work to be done, Slack thread conversation has to be sorted . so once Integration framework supports this, will add this test and monitor the stability of the test. This will be created as separate work it.

psteckler commented 1 year ago

Does the current hard fork integration test address this issue?

It allows specifying a staking and a next epoch ledger in the test config.

deepthiskumar commented 1 year ago

I don't think so? The epoch ledgers set in the HF tests are genesis epoch ledgers which don't get downloaded/synced during boostrap (because a node already has them). We should probably use the same configuration as the HF test (after berkeley every release will have a HF config) but still test crossing two epochs

deepthiskumar commented 1 year ago

Blocked on infra changes to test this on cluster other than mina-integration-test cluster