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

Beans per unit nondeterminism #4137

Merged
merged 2 commits into from
Dec 1, 2021
Merged

Beans per unit nondeterminism #4137

merged 2 commits into from
Dec 1, 2021

Conversation

michaelfig
Copy link
Member

@michaelfig michaelfig commented Dec 1, 2021

closes: #4134

Description

Add some tools for finding nondeterminism in Cosmos KVStore traces.

We found (again) that map[][] really isn't deterministically serialised to JSON by Go, so we converted beans_per_unit to an array of objects instead of an object-as-map.

Running the determinism test

$ unzip ../deployment-test-results.zip 
Archive:  ../deployment-test-results.zip
  inflating: validator0-kvstore.trace  
  inflating: validator0.slog         
  inflating: validator1-kvstore.trace  
  inflating: validator1.slog         
soil:foundit michael$ ~/agoric/agoric-sdk/packages/deployment/scripts/find-nondeterminism.sh 
162c163
< swingset/beans_per_unit       {"message":{"whole":"1000000"},"messageByte":{"whole":"20000"},"minFeeDebit":{"whole":"250000000000"},"vatCreation":{"whole":"30000000"},"xsnapComputron":{"whole":"100"},"blockComputeLimit":{"whole":"800000000"},"feeUnit":{"whole":"1000000000000"},"inboundTx":{"whole":"10000000"}}     null
---
> swingset/beans_per_unit       {"xsnapComputron":{"whole":"100"},"blockComputeLimit":{"whole":"800000000"},"feeUnit":{"whole":"1000000000000"},"inboundTx":{"whole":"10000000"},"message":{"whole":"1000000"},"messageByte":{"whole":"20000"},"minFeeDebit":{"whole":"250000000000"},"vatCreation":{"whole":"30000000"}}     null

Note the different order of serialised beans_per_unit entries.

Security Considerations

Documentation Considerations

Testing Considerations

@michaelfig michaelfig added cosmic-swingset package: cosmic-swingset deployment Chain deployment mechanism (e.g. testnet) labels Dec 1, 2021
@michaelfig michaelfig self-assigned this Dec 1, 2021
packages/deployment/scripts/crunch.mjs Show resolved Hide resolved
packages/deployment/scripts/crunch.mjs Outdated Show resolved Hide resolved
packages/deployment/scripts/crunch.mjs Outdated Show resolved Hide resolved
@michaelfig michaelfig added the automerge:no-update (expert!) Automatically merge without updates label Dec 1, 2021
@mergify mergify bot merged commit e18ad64 into master Dec 1, 2021
@mergify mergify bot deleted the mfig-bean-entries branch December 1, 2021 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:no-update (expert!) Automatically merge without updates cosmic-swingset package: cosmic-swingset deployment Chain deployment mechanism (e.g. testnet)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Genesis validator block 1 AppHash differs from other nodes
2 participants