-
Notifications
You must be signed in to change notification settings - Fork 206
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
Operational swing-store artifact level #9391
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I wonder about genesis export because an XS version change may be more likely in that scenario. Not an objection, though, just food for thought.
swingStoreGenesisEventHandler{exportDir: swingStoreExportDir, snapshotHeight: snapshotHeight}, | ||
// The export will fail if the swing-store does not contain all replay artifacts | ||
keeper.SwingStoreExportOptions{ | ||
ArtifactMode: keeper.SwingStoreArtifactModeReplay, | ||
ArtifactMode: keeper.SwingStoreArtifactModeOperational, | ||
ExportDataMode: keeper.SwingStoreExportDataModeSkip, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, shouldn't a genesis export require replay-level data?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, "operational" includes both XS heap snapshots and the subset (suffix) of transcript entries since the snapshot point.
I think a "genesis export" is meant to immediately reconstruct the chain state vector as of a given block height without retrieving or re-applying any cosmos txns. It could be used as the genesis of a new chain, with a different identity, whose initial state is equal to the most-recent state of the parent. And for that, you only need the current state of the vat workers, which is "operational" in our world.
In particular, it is not trying to start from the genesis state of the parent chain.
Now, the debugging/diagnostic replay-everything-with-a-different-xsnap things we might find ourselves needing to do will require replay-level data, and I suppose the question is whether we intend agd genesis-export
to be the tool to fetch the data for that purpose, or if there's a different subcommand (or a --replay
flag) that we'd use for that purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, at the end of the day, we can always devise a mechanism to re-import missing artifacts, as long as the hashes are correct in the export data. Genesis export does not change that. What may happen is that in a genesis export we'd need to edit artifacts in some fashion, which would require editing the hashes in the genesis file, but at this point I'm skeptical we'll ever be able to or need to do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, assuming I'm understanding the how-do-we-get-full-data thing properly
'home', | ||
`${homedir}/.ag-chain-cosmos`, | ||
)}/data/agoric`; | ||
`${processValue.getFlag('home', `${homedir}/.agoric`)}/data/agoric`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the comment on the previous line need to be updated to match
'home', | ||
`${homedir}/.ag-chain-cosmos`, | ||
)}/data/agoric`; | ||
`${processValue.getFlag('home', `${homedir}/.agoric`)}/data/agoric`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
@@ -41,10 +41,10 @@ export const ExportManifestFileName = 'export-manifest.json'; | |||
*/ | |||
export const getEffectiveArtifactMode = artifactMode => { | |||
switch (artifactMode) { | |||
case undefined: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. and this might be the flag that one would provide to get a replay-everything -type bundle out of an archival node, to address @gibson042 's comment
8490944
to
319b386
Compare
closes: #9388 ## Description Switch from `replay` to `operational` for state-sync export/restore, genesis export/import, and as the default for cosmic-swingset's export/import of kernel DB command line tool. Drive by change of the default chain home directory for the import/export tool (this location was effectively changed a couple year ago but not consistently in the rest of the SDK). ### Security Considerations If all nodes prune historical "replay" artifacts, we lose the ability to perform replay based upgrades in the future. We expect archive nodes to not manually prune their DB in this way. ### Scaling Considerations This should have no impact on performance right now. In the future, when exporting the IAVL data is not as slow, this would reduce the time it takes for state-sync snapshots to be created. ### Documentation Considerations Should communicate this change with validators ### Testing Considerations Covered by existing integration tests. ### Upgrade Considerations Chain software change
closes: #9388
Description
Switch from
replay
tooperational
for state-sync export/restore, genesis export/import, and as the default for cosmic-swingset's export/import of kernel DB command line tool.Drive by change of the default chain home directory for the import/export tool (this location was effectively changed a couple year ago but not consistently in the rest of the SDK).
Security Considerations
If all nodes prune historical "replay" artifacts, we lose the ability to perform replay based upgrades in the future. We expect archive nodes to not manually prune their DB in this way.
Scaling Considerations
This should have no impact on performance right now. In the future, when exporting the IAVL data is not as slow, this would reduce the time it takes for state-sync snapshots to be created.
Documentation Considerations
Should communicate this change with validators
Testing Considerations
Covered by existing integration tests.
Upgrade Considerations
Chain software change