IntersectMBO / IntersectMBO/ouroboros-consensus

Sanity check configuration (within the node and across nodes)

Open
#649 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
67
Forks
43
Avg merge
5d 13h
Merged PRs (30d)
43

Description

Many configuration mismatches are not currently detected as such, leading to confusing error messages and failures. Checks that we could do include the following (not an exhaustive list):

# Within one node

We should check that the various parts of the `TopLevelConfig` match each other:

- [ ] We should check that the `epochSize` in the Byron `CodecConfig` matches the one used elsewhere. (When this mismatches, very confusing errors can happen, because the `SlotNo` of an `EBB` would be reported incorrectly. One potential way that this might materialize is that the `SlotNo` of an incoming `EBB` is actually _larger_ than the `tip` of the node that provided it).

# Across nodes

- [ ] We should check that the used block matches (`ByronBlock` versus, say, `CardanoBlock`). If this is not the case, it will materialize as deserialisation errors.
- [ ] We should check that the hardcoded transition points match. If this is not the case, one node will transition from Byron to Shelley (say) but the other will not.
- [ ] We should check that the genesis hashes (of all eras) match. At the moment, a mismatch in the Shelley genesis will actually lead to quite an inscrutable error about `VRFKeyBadNonce` -- that's because the initial nonce in the Shelley is derived from the genesis, and so when the VRF proof in the first block is verified, if that initial nonce is computed differently by the node that produced the block than by the node that is verifying the block, the nonce will be wrong -- but obviously, that's not exactly pointing at the actual problem).

## Other remarks

- [ ] When comparing genesis files, we should do more than just comparing hashes: we should check which values in the genesis files match, and if none, report "same contents but different layout" or some such.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.