-
Notifications
You must be signed in to change notification settings - Fork 168
Support networks that fork at 0 #766
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
Conversation
b0a9715
to
1f96fd8
Compare
Previously, if creating a new testnet via scripts/byron-to-alonzo/mkfiles.sh, cardano-db-sync would fail to start up. Once we switched to the branch, cardano-db-sync successful starts up and runs. However, if cardano-db-sync is shut down and then restarted, the following error appears:
|
Seems like the issue lies here, https://github.com/input-output-hk/cardano-db-sync/blob/1f96fd8f010c7a117a3c622884abcdc550890735/cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Genesis.hs#L164 where "nonAvvmBalances": {
"5oP9ib6ym3XYb4bdW1gpkqYpzw939QGkd7xUAYemppCiBiMBQtY4jTfnboPBrZfWkh": "5010000000",
"5oP9ib6ym3XbF24fvvwzCEhPynWgmMM9d9Z5tDvB7msP133Ria6m58umoomWAuByWr": "5010000000"
}, so I would have expected 2 to be returned. |
Thank you for pointing this out. There are indeed some remaining issues with this pr. |
@kderme Is this going to be addressed:
|
@savaki the error you get comes from the Shelley genesis and the |
1f96fd8
to
b20ce42
Compare
Cherry picked the "Support networks that fork at 0" commit into #864 . |
Fixes #507
With this pr db-sync supports node configuration like
"TestShelleyHardForkAtEpoch": 0
It also supports initial funds and staking in the Shelley Genesis
When the Shelley Genesis file has some important information, like initial distribution, pools and delegations, an artificial Shelley Genesis Block is inserted and artificial Txs, to attach all the information to it. The genesis blocks have some unique characteristics in the db:
In most cases the Shelley Genesis Block will be the next block of the Byron Genesis block. This means the byron genesis block may have two next blocks.
The Shelley Genesis block is not inserted, if it lacks any important information (funds/staking). So this should not affect mainnet.