Skip to content

Implement chain adapater to read on chain protocol configurations - #3482

Draft
turmelclem wants to merge 7 commits into
mainfrom
ctl/3393-implement-chain-adapater-to-read-on-chain-protocol-configurations-2
Draft

Implement chain adapater to read on chain protocol configurations#3482
turmelclem wants to merge 7 commits into
mainfrom
ctl/3393-implement-chain-adapater-to-read-on-chain-protocol-configurations-2

Conversation

@turmelclem

@turmelclem turmelclem commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Content

This PR includes modification to implement chain adapater to read on chain protocol configurations :

  • Implement on-chain reader for protocol configurations
  • move mechanism checking configuration consistency in model
  • add markers implementation of MithrilNetworkConfigurationProvider
  • Implement a protocol configuration builder (used by Signer and Aggregator)
  • Wire MarkersMithrilNetworkConfigurationProvider in the Signer
  • Wire MarkersMithrilNetworkConfigurationProvider instead of local impl for leader aggregator
  • Refactor usage of parameters for protocol-configuration commands

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • All check jobs of the CI have succeeded
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)
    • Add ADR blog post or Dev ADR entry (if relevant)
    • No new TODOs introduced

Relates to #3393

@turmelclem
turmelclem force-pushed the ctl/3393-implement-chain-adapater-to-read-on-chain-protocol-configurations-2 branch from 4f87a71 to cb72f72 Compare August 17, 2026 09:56
@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown

Test Results

     5 files  ± 0     209 suites  ±0   44m 6s ⏱️ - 1h 41m 55s
 3 381 tests  - 69   3 212 ✅  - 238  0 💤 ±0  169 ❌ +169 
11 256 runs   - 57  10 749 ✅  - 564  0 💤 ±0  507 ❌ +507 

For more details on these failures, see this check.

Results for commit cb72f72. ± Comparison against base commit 58b575a.

This pull request removes 76 and adds 7 tests. Note that renamed tests count towards both.
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::index_out_of_bounds
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::index_too_large_for_circuit_range
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::indices_not_increasing
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::leaf_merkle_path_mismatch
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::leaf_swap_keep_merkle_path
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::leaf_wrong_verification_key
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::merkle_path_corrupt_sibling
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::merkle_path_flip_position
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::merkle_path_length_long
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::merkle_path_length_short
…
mithril-protocol-config ‑ builder::test::deserialize_adapter_config_from_json
mithril-protocol-config ‑ builder::test::rejects_adapter_config_with_invalid_verification_key
mithril-protocol-config ‑ builder::test::rejects_adapter_config_with_unknown_type
mithril-protocol-config ‑ cardano_chain::protocol_configuration_reader::test::test_cardano_chain_reader
mithril-protocol-config ‑ cardano_chain::protocol_configuration_reader::test::test_cardano_chain_reader_should_throw_error_on_invalid_cbor
mithril-protocol-config ‑ markers::tests::test_get_network_configuration_removes_unavailable_discriminants_when_config_missing
mithril-protocol-config ‑ markers::tests::test_get_network_configuration_retrieve_configurations_for_aggregation_next_aggregation_and_registration

♻️ This comment has been updated with latest results.

@turmelclem
turmelclem force-pushed the ctl/3393-implement-chain-adapater-to-read-on-chain-protocol-configurations-2 branch from cb72f72 to 9a7ac9a Compare August 17, 2026 16:10
Comment on lines +18 to +30
pub enum AdapterConfig {
/// Cardano chain protocol configuration adapter
CardanoChain {
/// Cardano chain address
address: ChainAddress,

/// Verification key
verification_key: ProtocolConfigurationMarkersVerifierVerificationKey,
},

/// Fake protocol configuration adapter with default value at epoch 0 (for test usage)
Fake,
}
Comment on lines +18 to +30
pub enum AdapterConfig {
/// Cardano chain protocol configuration adapter
CardanoChain {
/// Cardano chain address
address: ChainAddress,

/// Verification key
verification_key: ProtocolConfigurationMarkersVerifierVerificationKey,
},

/// Fake protocol configuration adapter with default value at epoch 0 (for test usage)
Fake,
}
Comment on lines +20 to +26
CardanoChain {
/// Cardano chain address
address: ChainAddress,

/// Verification key
verification_key: ProtocolConfigurationMarkersVerifierVerificationKey,
},
Comment on lines +20 to +26
CardanoChain {
/// Cardano chain address
address: ChainAddress,

/// Verification key
verification_key: ProtocolConfigurationMarkersVerifierVerificationKey,
},
},

/// Fake protocol configuration adapter with default value at epoch 0 (for test usage)
Fake,
},

/// Fake protocol configuration adapter with default value at epoch 0 (for test usage)
Fake,
@turmelclem turmelclem self-assigned this Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants