Granola-Team / mina-indexer

The Mina Indexer is a re-imagined version of the software collectively called the "Mina archive node."
Apache License 2.0
19 stars 10 forks source link

Spike: better understand the HF mechanism #818

Closed Isaac-DeFrain closed 6 months ago

Isaac-DeFrain commented 6 months ago

Outcome: plan for an implementation in the indexer

Isaac-DeFrain commented 6 months ago

What is special about the ledger the archive node barfs out? How to use it? What's the deal with the "exported" ledger? Will the indexer barf out a similar ledger?

Isaac-DeFrain commented 6 months ago

Summary ala https://minaprotocol.com/blog/minas-berkeley-upgrade-what-to-expect:

Hour 0: Once the majority stake has upgraded, at a predetermined point the stop transaction slot will be reached. Starting from this slot, all the blocks produced by the upgraded stake will be empty and not include any transactions (payments, delegations, coinbase, etc) and blocks containing transactions will not be accepted, confirming behavior is as expected.

Hour 5: 5 hours after the stop transaction slot (equivalent to 100 slots), the stop network slot will be reached. At this point, block producers who have upgraded will no longer produce new blocks and no new blocks will be accepted, with chain density expected to drop.

Hours 5-11: During this period, o1Labs will publish the post-upgrade package, the build that is planned to run post-fork, by exporting the state at the fork block. This state will be validated along with the ledger state and migrated archive node before the build is ready for release. In parallel, the team will be preparing to launch the network, and will deploy seeds, archive nodes and cron jobs to validate node and network health.

Post-Upgrade: Hour 12: One hour after the post-upgrade release is available, the first Berkeley block is expected to be produced. Network monitoring: Once the upgrade is complete, and the first Berkeley block has been produced, the teams will be conducting extensive network monitoring to ensure the chain quality is as expected, and the majority stake has been upgraded to the post-Berkeley build.

Isaac-DeFrain commented 6 months ago

Last devnet "mainnet" block (height 296371) before slot_tx_end slot (445620): https://devnet.minaexplorer.com/block/3NKSvjaGSKiQuAt8BP1b1VCpLbJc9RcEFjYCaBYsJJFdrtd6tpaV

Isaac-DeFrain commented 6 months ago

First devnet block (height 296372) after slot_tx_end slot, this is the "berkeley" genesis block: https://devnet.minaexplorer.com/block/3NL93SipJfAMNDBRfQ8Uo8LPovC74mnJZfZYB5SK7mTtkL72dsPx

Isaac-DeFrain commented 6 months ago

First devnet "berkeley" PCB (height 296373): https://devnet.minaexplorer.com/block/3NL3CmLeS91jp1cLgBST98YLX5RtDVWdddNGfEiXpABmDsBveAey

Isaac-DeFrain commented 6 months ago

Hard fork package generation RFC https://github.com/MinaProtocol/mina/blob/develop/rfcs/0053-hard-fork-package-generation.md