The workflow
- Branch from
main. - Write the spec first, or at least alongside the code. A
*.spec.yamlthat was written after the fact tends to describe what the code does rather than what it should do, which is worth very little. - Every invariant in a spec names at least one test, and that test must exist
and pass.
make verifyenforces the binding, so you cannot declare an invariant and forget to test it. - Run
make checklocally. CI runs every targetmake checkruns (make ci-parityasserts it), plus two thatmake checkleaves out: the recovery drill (make test-recovery-drill, which needs a regtestbitcoind) and the image build (make image-system, thenmake verify-image, which need Docker and Linux). A local pass can still be followed by a CI failure in those. - Open a pull request. Reference spec ids in the description.
Commit messages
Write what changed and why, in the imperative, with the reasoning in the body where it is not obvious. Reference spec ids where applicable.
Reject dice sequences shorter than 100 rolls
99 rolls is 255.911 bits, which is short of 256. The earlier bound came from
the project brief and was wrong by 0.089 bits. Small enough not to matter in
practice, large enough that a project about checkable arithmetic should not
round in its own favour.
Spec: core.entropy.dice (INV-ENT-5)
No em dashes anywhere: not in commit messages, code comments, documentation, or
UI copy. Use a comma, a colon, parentheses, or two sentences. This is enforced
by make prose.
Rendered from CONTRIBUTING.md, the same bytes that ship with the code. SHA-256 80ae67da20b1d79a061ae1ffe5ac6af62ad6b80566961c8d27c3a1b5fb0e265d