mithril icon indicating copy to clipboard operation
mithril copied to clipboard

Implement Real Genesis Certificate

Open jpraynaud opened this issue 2 years ago • 1 comments

This PR implements the Real Genesis Certificate:

  • [x] Add a Genesis Signer that signs a message with a Genesis Secret Key (only for test purpose)
  • [x] Add a Genesis Verifier that verifies a Genesis Signature against a Genesis Verification Key
  • [x] Implement the verify_genesis_certificate of the Certificate Verifier
  • [x] Make Client load/use the Genesis Verification Key
  • [x] Make Aggregator load/use the Genesis Verification Key
  • [x] Make Aggregator verify that the Certificate Chain is valid before trying to produce new Mithril Certificates
  • [x] Add a sub command to the Aggregator CLI to generate test only Genesis Keys, and boostrap a test only Genesis Certificate
  • [x] Add a sub command to the Aggregator CLI to export the message that must be signed with Genesis Secret Key into a Genesis Signature
  • [x] Add a sub command to the Aggregator CLI to import the Genesis Signature and create a Genesis Certificate
  • [x] Update test lab to bootstrap a Genesis Certificate
  • [x] Update devnet standalone to bootstrap a Genesis Certificate
  • [x] Update GCP Aggregator to use the test Genesis Keys
  • [ ] Fix flakiness test end to end in CI
  • [ ] Update documentations

Closes #364

jpraynaud avatar Aug 22 '22 09:08 jpraynaud

Unit Test Results

    7 files  ±  0    22 suites  ±0   2m 3s :stopwatch: -24s 318 tests +24  318 :heavy_check_mark: +24  0 :zzz: ±0  0 :x: ±0  319 runs  +24  319 :heavy_check_mark: +24  0 :zzz: ±0  0 :x: ±0 

Results for commit c0e1cff3. ± Comparison against base commit 3f9a99a8.

This pull request removes 7 and adds 31 tests. Note that renamed tests count towards both.
runtime::runner::tests ‑ test_certificate_exist_for_beacon
runtime::runner::tests ‑ test_is_new_beacon
runtime::state_machine::tests ‑ idle_certificate_already_exist_for_beacon
runtime::state_machine::tests ‑ idle_check_no_new_beacon_with_no_current_beacon
runtime::state_machine::tests ‑ signing_multisig_ready_to_idle
runtime::state_machine::tests ‑ signing_same_beacon_to_signing
runtime::state_machine::tests ‑ unregistered_no_transition
certificate_handler::tests ‑ test_epoch_settings_ko_500
certificate_handler::tests ‑ test_epoch_settings_ok_200
crypto_helper::genesis::tests ‑ test_codec_genesis_keypair
crypto_helper::genesis::tests ‑ test_generate_test_deterministic_genesis_keypair
crypto_helper::genesis::tests ‑ test_generate_test_non_deterministic_genesis_keypair
entities::beacon::tests ‑ test_beacon_compare_to_older_different_network
entities::beacon::tests ‑ test_beacon_compare_to_older_epochs_greater
entities::beacon::tests ‑ test_beacon_compare_to_older_epochs_less
entities::beacon::tests ‑ test_beacon_compare_to_older_equal
entities::beacon::tests ‑ test_beacon_compare_to_older_lower_epoch_greater_immutable
…

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Aug 22 '22 09:08 github-actions[bot]

Many thanks @Alenar for your large contribution to this PR and for all the help and support you provided :1st_place_medal:

jpraynaud avatar Sep 06 '22 10:09 jpraynaud