Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use new unbonding_delay parameter to compute trusting period #18

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions crates/relayer/src/chain/penumbra/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,25 +522,17 @@
.map_err(|e| Error::grpc_status(e, "app_parameters query".to_owned()))?
.into_inner();

let epoch_duration = app_parameters
.clone()
.app_parameters
.expect("should have app parameters")
.sct_params
.expect("should have sct parameters")
.epoch_duration;

let unbonding_epochs = app_parameters
let epoch_delay_blocks = app_parameters
.app_parameters
.expect("should have app parameters")

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / clippy-no-default-features

no field `unbonding_delay` on type `penumbra_proto::core::component::stake::v1::StakeParameters`

error[E0609]: no field `unbonding_delay` on type `penumbra_proto::core::component::stake::v1::StakeParameters` --> crates/relayer/src/chain/penumbra/chain.rs:527:14 | 527 | .unbonding_delay; | ^^^^^^^^^^^^^^^ unknown field | = note: available fields are: `unbonding_epochs`, `active_validator_limit`, `base_reward_rate`, `slashing_penalty_misbehavior`, `slashing_penalty_downtime` ... and 3 others

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / clippy-no-default-features

no field `unbonding_delay` on type `penumbra_proto::core::component::stake::v1::StakeParameters`

error[E0609]: no field `unbonding_delay` on type `penumbra_proto::core::component::stake::v1::StakeParameters` --> crates/relayer/src/chain/penumbra/chain.rs:527:14 | 527 | .unbonding_delay; | ^^^^^^^^^^^^^^^ unknown field | = note: available fields are: `unbonding_epochs`, `active_validator_limit`, `base_reward_rate`, `slashing_penalty_misbehavior`, `slashing_penalty_downtime` ... and 3 others

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / clippy-all-features

no field `unbonding_delay` on type `penumbra_proto::core::component::stake::v1::StakeParameters`

error[E0609]: no field `unbonding_delay` on type `penumbra_proto::core::component::stake::v1::StakeParameters` --> crates/relayer/src/chain/penumbra/chain.rs:527:14 | 527 | .unbonding_delay; | ^^^^^^^^^^^^^^^ unknown field | = note: available fields are: `unbonding_epochs`, `active_validator_limit`, `base_reward_rate`, `slashing_penalty_misbehavior`, `slashing_penalty_downtime` ... and 3 others

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / clippy-all-features

no field `unbonding_delay` on type `penumbra_proto::core::component::stake::v1::StakeParameters`

error[E0609]: no field `unbonding_delay` on type `penumbra_proto::core::component::stake::v1::StakeParameters` --> crates/relayer/src/chain/penumbra/chain.rs:527:14 | 527 | .unbonding_delay; | ^^^^^^^^^^^^^^^ unknown field | = note: available fields are: `unbonding_epochs`, `active_validator_limit`, `base_reward_rate`, `slashing_penalty_misbehavior`, `slashing_penalty_downtime` ... and 3 others

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / test-stable

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / integration-test (osmosis, osmosisd, osmo, stake, dynamic-gas-fee)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / ics-light-client-attack-freeze (interchain-security, cosmos)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / ics-double-sign (interchain-security, cosmos)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / interchain-security-ica (.#gaia14 .#stride-consumer, gaiad,strided, cosmos,stride)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / light-client-attack (gaia14, gaiad, cosmos)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / interchain-security-no-ica (.#gaia14 .#neutron, gaiad,neutrond, cosmos,neutron)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / interchain-security-icq (.#gaia13 .#stride-consumer-no-admin, gaiad,strided, cosmos,stride)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / ics-light-client-attack (interchain-security, cosmos)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / integration-test (gaia14, gaiad, cosmos, stake, forward-packet,clean-workers)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / interchain-security-icq (.#gaia14 .#stride-consumer-no-admin, gaiad,strided, cosmos,stride)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / integration-test (wasmd, wasmd, wasm, stake)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / integration-test (migaloo, migalood, migaloo, stake)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / model-based-test (gaia6)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / interchain-security-no-ica (.#gaia13 .#neutron, gaiad,neutrond, cosmos,neutron)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / integration-test (ibc-go-v8-simapp, simd, cosmos, stake, ica,ics29-fee)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / integration-test (ibc-go-v7-simapp, simd, cosmos, stake, ica,ics29-fee)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / integration-test (juno, junod, juno, stake, juno,forward-packet)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / integration-test (gaia13, gaiad, cosmos, stake, forward-packet,clean-workers)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / celestia-to-gaia (.#celestia .#gaia13, celestia-appd,gaiad, celestia,cosmos, utia,stake)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / celestia-to-gaia (.#celestia .#gaia14, celestia-appd,gaiad, celestia,cosmos, utia,stake)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / ordered-channel-test

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / integration-test (ibc-go-v6-simapp, simd, cosmos, stake, ica,ics29-fee)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / integration-test (provenance, provenanced, pb, nhash, fee-grant,async-icq)

no field `unbonding_delay` on type `StakeParameters`

Check failure on line 527 in crates/relayer/src/chain/penumbra/chain.rs

View workflow job for this annotation

GitHub Actions / interchain-security-ica (.#gaia13 .#stride-consumer, gaiad,strided, cosmos,stride)

no field `unbonding_delay` on type `StakeParameters`
.stake_params
.expect("should have stake parameters")
.unbonding_epochs;
.unbonding_delay;

// here we assume roughly 5s block time, which is not part of consensus but should be
// roughly correct. it would really be better if the ibc protocol gave the client's
// trusting period in terms of blocks instead of duration.
let unbonding_period = Duration::from_secs(epoch_duration * unbonding_epochs * 5);
let unbonding_period = Duration::from_secs(epoch_delay_blocks * 5);

tracing::info!("starting view service sync");

Expand Down
Loading