go-spacemesh
go-spacemesh copied to clipboard
Add pos atx to post commitment
Motivation
Closes #3556
Changes
- a "commitment" ATX is chosen when PoST is initialised
- this new ATX is referenced in the
NiPoSTChallenge
but only for the initial ATX of a node - incoming ATX are verified to have a commitment ATX when they are initial and don't have one if they are not
- this new ATX is referenced in the
- Instead of only using the Nodes public key as commitment for post, the digest of the concatenation of public key and the ID of the chosen commitment ATX are used
- I did some cleanup of the tests in the
activation
package-
handler_test.go
: now usest.Run
to isolate various test cases from each other more clearly - imho there are still too many tests cases within single tests (especially for
SyntacticallyValidate
); if I find some time I'll break that up in multiple smaller tests - there is too much shared setup between tests in the activation package in general, which makes it hard to modify or add tests without breaking several existing tests; if I find some time I'll try to get rid of some shared setup code
-
Test Plan
- All existing tests still pass / are updated to incorporate changes
- New tests where added for new functions / methods and to test new behaviour
TODO
- [x] Explain motivation or link existing issue(s)
- [x] Test changes and document test plan
- [x] Update documentation as needed
DevOps Notes
- [x] This PR does not require configuration changes (e.g., environment variables, GitHub secrets, VM resources)
- [x] This PR does not affect public APIs
- [x] This PR does not rely on a new version of external services (PoET, elasticsearch, etc.)
- [x] This PR does not make changes to log messages (which monitoring infrastructure may rely on)