Skip to content

Discrepancy of protocol parameters in epoch settings and pending certificates routes #1963

Closed
@jpraynaud

Description

@jpraynaud

Why

The /epoch-settings and pending-certificate routes do not expose the same values for the protocol parameters and next protocol parameters.

Here is an extract of logs retrieved from the end to end test:

{"msg":"RUNNER: get_current_time_point","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.09493338Z","hostname":"jp","pid":1945438}
{"msg":"RUNNER: update_stake_distribution","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.096956687Z","hostname":"jp","pid":1945438}
{"msg":"RUNNER: register_epoch","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.125593004Z","hostname":"jp","pid":1945438}
{"msg":"EpochService: register_epoch_settings: SignerEpochSettings { epoch: Epoch(16), protocol_parameters: ProtocolParameters { k: 75, m: 105, phi_f: 0.95 }, next_protocol_parameters: ProtocolParameters { k: 150, m: 210, phi_f: 0.8 }, current_signers: [Signer { party_id: \"pool1jn678ztmy2ceqmufhqq4x4z8nx5qj2z5nn4hkem5yxduwngqa29\", .. }, Signer { party_id: \"pool1xmys4w5cetfgezj8j8hx9ds0je7pp5n7ljzc2n94am3d6xr8zk8\", .. }], next_signers: [Signer { party_id: \"pool1xmys4w5cetfgezj8j8hx9ds0je7pp5n7ljzc2n94am3d6xr8zk8\", .. }, Signer { party_id: \"pool1jn678ztmy2ceqmufhqq4x4z8nx5qj2z5nn4hkem5yxduwngqa29\", .. }], cardano_transactions_signing_config: Some(CardanoTransactionsSigningConfig { security_parameter: BlockNumber(1), step: BlockNumber(15) }), next_cardano_transactions_signing_config: Some(CardanoTransactionsSigningConfig { security_parameter: BlockNumber(1), step: BlockNumber(15) }) }","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.12562825Z","hostname":"jp","pid":1945438}
{"msg":"RUNNER: register_signer_to_aggregator","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.125647937Z","hostname":"jp","pid":1945438}
{"msg":"Register signer","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.126988994Z","hostname":"jp","pid":1945438}
{"msg":"MetricsService: incrementing 'signer_registration_success_since_startup' counter","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.202827688Z","hostname":"jp","pid":1945438}
{"msg":"MetricsService: set 'signer_registration_success_last_epoch_set' gauge value to 16","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.202939638Z","hostname":"jp","pid":1945438}
{"msg":"RUNNER: upkeep","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.203013597Z","hostname":"jp","pid":1945438}
{"msg":"UpkeepService::start","v":0,"name":"slog-rs","level":30,"time":"2024-09-26T12:43:54.203059343Z","hostname":"jp","pid":1945438}
{"msg":"UpkeepService::Cleaning main database","v":0,"name":"slog-rs","level":30,"time":"2024-09-26T12:43:54.203102975Z","hostname":"jp","pid":1945438}
{"msg":"SqliteCleaner::Running `vacuum` on the database","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.203165171Z","hostname":"jp","pid":1945438}
{"msg":"SqliteCleaner::Running `wal_checkpoint(TRUNCATE)` on the database","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.259063437Z","hostname":"jp","pid":1945438}
{"msg":"UpkeepService::Cleaning cardano transactions database","v":0,"name":"slog-rs","level":30,"time":"2024-09-26T12:43:54.259199472Z","hostname":"jp","pid":1945438}
{"msg":"SqliteCleaner::Running `wal_checkpoint(TRUNCATE)` on the database","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.259237804Z","hostname":"jp","pid":1945438}
{"msg":"UpkeepService::end","v":0,"name":"slog-rs","level":30,"time":"2024-09-26T12:43:54.259282248Z","hostname":"jp","pid":1945438}
{"msg":" > got protocol initializer for this epoch (16)","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.259596036Z","hostname":"jp","pid":1945438}
{"msg":"MetricsService: incrementing 'runtime_cycle_success_since_startup' counter","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.259627746Z","hostname":"jp","pid":1945438}
{"msg":"… Cycle finished, Sleeping for 125 ms","v":0,"name":"slog-rs","level":30,"time":"2024-09-26T12:43:54.259658754Z","hostname":"jp","pid":1945438}
{"msg":"================================================================================","v":0,"name":"slog-rs","level":30,"time":"2024-09-26T12:43:54.385891966Z","hostname":"jp","pid":1945438}
{"msg":"STATE MACHINE: new cycle: ReadyToSign - 16 - None","v":0,"name":"slog-rs","level":30,"time":"2024-09-26T12:43:54.385937962Z","hostname":"jp","pid":1945438}
{"msg":"MetricsService: incrementing 'runtime_cycle_total_since_startup' counter","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.38596315Z","hostname":"jp","pid":1945438}
{"msg":"RUNNER: get_current_time_point","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.385986854Z","hostname":"jp","pid":1945438}
{"msg":"RUNNER: get_pending_certificate","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.387179853Z","hostname":"jp","pid":1945438}
{"msg":"Retrieve pending certificate","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.387247029Z","hostname":"jp","pid":1945438}
{"msg":" ⋅ Epoch has NOT changed we can sign this certificate, transiting to ReadyToSign","v":0,"name":"slog-rs","level":30,"time":"2024-09-26T12:43:54.412797746Z","hostname":"jp","pid":1945438,"pending_certificate":"CertificatePending { epoch: Epoch(16), signed_entity_type: MithrilStakeDistribution(Epoch(16)), protocol_parameters: ProtocolParameters { k: 75, m: 105, phi_f: 0.95 }, next_protocol_parameters: ProtocolParameters { k: 75, m: 105, phi_f: 0.95 }, signers: [], next_signers: [] }"}
{"msg":" > transition_from_ready_to_sign_to_ready_to_sign","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.412828974Z","hostname":"jp","pid":1945438,"next_retrieval_epoch":"Epoch(16)","retrieval_epoch":"Epoch(15)","current_epoch":"Epoch(16)"}
{"msg":"MetricsService: incrementing 'signature_registration_total_since_startup' counter","v":0,"name":"slog-rs","level":20,"time":"2024-09-26T12:43:54.41284815Z","hostname":"jp","pid":1945438}

Where we can see that:

  • /epoch-settings returned next_protocol_parameters: ProtocolParameters { k: 150, m: 210, phi_f: 0.8 }
  • /pending-certificate returned next_protocol_parameters: ProtocolParameters { k: 75, m: 105, phi_f: 0.95 }
  • for the same Epoch(16)

What

Investigate and fix the problem

How

  • Investigate the problem
  • Fix the problem: use the protocol parameters of the epoch settings in the pending certificate route

Metadata

Metadata

Assignees

Labels

bug ⚠️Something isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions