diff --git a/CHANGELOG.md b/CHANGELOG.md index 290551890..1649f9344 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ ## Unreleased changes - Add `cis3` module and `Cis3Contract` for interacting with CIS3 contracts. +- Updated the concordium-base submodule to incorporate protocol 7 changes (cooldown and baker pool status changes). + Specifically, this changes the following public types: + - `AccountInfo`: Now has two new fields, `cooldown: Vec` and `available_balance: Amount`. + The `cooldown` field specifies the stake currently in cooldown for the account. + The `available_balance` field denotes the total amount available to the account for transfers. + - `BakerPoolStatus`: The `baker_equity_capital`, `delegated_capital`, `delegated_capital_cap`, `pool_info` + and `baker_stake_pending_change` fields are moved into a new type, `ActiveBakerPoolStatus`. A new field is added + to `BakerPoolStatus` which includes these fields, namely `active_baker_pool_status: Option`. + This field is `Some(..)` iff `pool_info` is included in the node's `PoolInfoResponse`. ## 4.3.0 @@ -126,7 +135,7 @@ serialization macros. - Bump minimum supported rust version to 1.64. - When using derive(Serial,Deserial) macros from the smart_contracts modules - `concordium_std` must be made available, for example as + `concordium_std` must be made available, for example as `use concordium_rust_sdk::smart_contracts::common as concordium_std` ## 2.3.0 diff --git a/build.rs b/build.rs index 42516da27..7f34e32ff 100644 --- a/build.rs +++ b/build.rs @@ -15,7 +15,7 @@ fn main() -> Result<(), Box> { let spec = repo.revparse_single("HEAD")?.id(); std::fs::write( "./src/v2/proto_schema_version.rs", - format!("pub const PROTO_SCHEMA_VERSION: &str = \"{}\";", spec), + format!("pub const PROTO_SCHEMA_VERSION: &str = \"{}\";\n", spec), )?; } Ok(()) diff --git a/concordium-base b/concordium-base index fff939660..dfdcd6886 160000 --- a/concordium-base +++ b/concordium-base @@ -1 +1 @@ -Subproject commit fff93966098e648aa65aaa446f8dd2f87e3380a7 +Subproject commit dfdcd68864ed9e99a844acf1680754384cb0ed1c diff --git a/examples/v2_dry_run.rs b/examples/v2_dry_run.rs index 21aed8954..315587d0b 100644 --- a/examples/v2_dry_run.rs +++ b/examples/v2_dry_run.rs @@ -94,6 +94,7 @@ async fn test_all(endpoint: v2::Endpoint) -> anyhow::Result<()> { // Update the timestamp to now. let _fut7 = dry_run.begin_set_timestamp(Timestamp::now()).await?; // Execute a transfer to the encrypted balance on account 0. + #[allow(deprecated)] let payload = Payload::TransferToEncrypted { amount: Amount::from_ccd(20), }; diff --git a/examples/v2_send_encrypted_transfer.rs b/examples/v2_send_encrypted_transfer.rs index 860740e1c..d0a8a8e15 100644 --- a/examples/v2_send_encrypted_transfer.rs +++ b/examples/v2_send_encrypted_transfer.rs @@ -112,7 +112,9 @@ async fn main() -> anyhow::Result<()> { )?; send::transfer_to_public(&keys.account_keys, keys.address, nonce, expiry, data) } - Receiver::Encrypt => { + Receiver::Encrypt => + { + #[allow(deprecated)] send::transfer_to_encrypted(&keys.account_keys, keys.address, nonce, expiry, app.amount) } Receiver::Transfer(addr) => { @@ -127,6 +129,7 @@ async fn main() -> anyhow::Result<()> { &receiver.response.account_encryption_key, &mut rng, )?; + #[allow(deprecated)] send::encrypted_transfer(&keys.account_keys, keys.address, nonce, expiry, addr, data) } }; diff --git a/src/lib.rs b/src/lib.rs index 23193c9ce..b187d88f3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,7 +19,8 @@ //! - [`common`] has some common type definitions, as well as traits and helpers //! for binary serialization //! - [`encrypted_transfers`] implements structures and zero knowledge proofs -//! related to encrypted transfers +//! related to encrypted transfers. Note that this functionality has been +//! deprecated in protocol version 7. //! - [`eddsa_ed25519`] is a re-export of the signature scheme used for blocks //! and accounts on the Concordium blockchain. //! - [`aggregate_sig`] is a re-export of the BLS signature scheme, used by the diff --git a/src/types/mod.rs b/src/types/mod.rs index 17e861766..699cfa050 100644 --- a/src/types/mod.rs +++ b/src/types/mod.rs @@ -134,11 +134,13 @@ impl AccountEncryptedAmount { let mut combined = self.self_amount.clone(); let mut agg_amount = encrypted_transfers::decrypt_amount(table, sk, &self.self_amount); let mut index = self.start_index; + #[allow(deprecated)] if let Some((agg, num_agg)) = self.aggregated_amount.as_ref() { agg_amount += encrypted_transfers::decrypt_amount(table, sk, agg); combined = encrypted_transfers::aggregate(&combined, agg); index += u64::from(*num_agg); } + #[allow(deprecated)] for amount in &self.incoming_amounts { agg_amount += encrypted_transfers::decrypt_amount(table, sk, amount); combined = encrypted_transfers::aggregate(&combined, amount); @@ -192,6 +194,7 @@ impl AccountEncryptedAmount { { let agg_amount = self.decrypt_and_combine(ctx, sk); if amount <= agg_amount.agg_amount { + #[allow(deprecated)] let data = encrypted_transfers::make_transfer_data( ctx.params, receiver_pk, @@ -285,6 +288,46 @@ impl AccountStakingInfo { } } +/// The status of a cooldown. When stake is removed from a baker or delegator +/// (from protocol version 7) it first enters the pre-pre-cooldown state. +/// The next time the stake snaphot is taken (at the epoch transition before +/// a payday) it enters the pre-cooldown state. At the subsequent payday, it +/// enters the cooldown state. At the payday after the end of the cooldown +/// period, the stake is finally released. +#[derive(SerdeSerialize, SerdeDeserialize, Debug, PartialEq)] +pub enum CooldownStatus { + /// The amount is in cooldown and will expire at the specified time, + /// becoming available at the subsequent pay day. + Cooldown, + + /// The amount will enter cooldown at the next pay day. The specified + /// end time is projected to be the end of the cooldown period, + /// but the actual end time will be determined at the payday, + /// and may be different if the global cooldown period changes. + PreCooldown, + + /// The amount will enter pre-cooldown at the next snapshot epoch (i.e. + /// the epoch transition before a pay day transition). As with + /// pre-cooldown, the specified end time is projected, but the + /// actual end time will be determined later. + PrePreCooldown, +} + +#[derive(SerdeSerialize, SerdeDeserialize, Debug, PartialEq)] +#[serde(rename_all = "camelCase")] +pub struct Cooldown { + /// The time in milliseconds since the Unix epoch when the cooldown period + /// ends. + pub end_time: Timestamp, + + /// The amount that is in cooldown and set to be released at the end of the + /// cooldown period. + pub amount: Amount, + + /// The status of the cooldown. + pub status: CooldownStatus, +} + #[derive(SerdeSerialize, SerdeDeserialize, Debug, PartialEq)] #[serde(rename_all = "camelCase")] /// Account information exposed via the node's API. This is always the state of @@ -327,6 +370,19 @@ pub struct AccountInfo { pub account_stake: Option, /// Canonical address of the account. pub account_address: AccountAddress, + + /// The stake on the account that is in cooldown. + /// There can be multiple amounts in cooldown that expire at different + /// times. + /// Empty for nodes using protocol version 6 or lower. + pub cooldowns: Vec, + + /// The available (unencrypted) balance of the account (i.e. that can be + /// transferred or used to pay for transactions). This is the balance + /// minus the locked amount. The locked amount is the maximum of the + /// amount in the release schedule and the total amount that is actively + /// staked or in cooldown (inactive stake). + pub available_balance: Amount, } impl From<&AccountInfo> for AccountAccessStructure { @@ -595,9 +651,26 @@ mod lottery_power_parser { /// the state of the baker that is currently eligible for baking. pub struct BakerPoolStatus { /// The 'BakerId' of the pool owner. - pub baker_id: BakerId, + pub baker_id: BakerId, /// The account address of the pool owner. - pub baker_address: AccountAddress, + pub baker_address: AccountAddress, + /// The active status of the pool. This reflects any changes to the pool + /// since the last snapshot. + pub active_baker_pool_status: Option, + /// Status of the pool in the current reward period. This will be [`None`] + /// if the pool is not a baker in the payday (e.g., because they just + /// registered and a new payday has not started yet). + pub current_payday_status: Option, + /// Total capital staked across all pools. + pub all_pool_total_capital: Amount, +} + +// Information about a baker pool's active stake and status. This does not +// reflect the stake used for the current reward period, but rather the stake +// that is currently active. +#[derive(SerdeSerialize, SerdeDeserialize, Debug, Clone, PartialEq)] +#[serde(rename_all = "camelCase")] +pub struct ActiveBakerPoolStatus { /// The equity capital provided by the pool owner. pub baker_equity_capital: Amount, /// The capital delegated to the pool by other accounts. @@ -610,12 +683,6 @@ pub struct BakerPoolStatus { pub pool_info: BakerPoolInfo, /// Any pending change to the baker's stake. pub baker_stake_pending_change: PoolPendingChange, - /// Status of the pool in the current reward period. This will be [`None`] - /// if the pool is not a baker in the payday (e.g., because they just - /// registered and a new payday has not started yet). - pub current_payday_status: Option, - /// Total capital staked across all pools. - pub all_pool_total_capital: Amount, } #[derive(SerdeSerialize, SerdeDeserialize, Debug, Clone)] @@ -1705,19 +1772,27 @@ impl AccountTransactionEffects { AccountTransactionEffects::ContractUpdateIssued { .. } => Some(Update), AccountTransactionEffects::AccountTransfer { .. } => Some(Transfer), AccountTransactionEffects::AccountTransferWithMemo { .. } => Some(TransferWithMemo), + #[allow(deprecated)] AccountTransactionEffects::BakerAdded { .. } => Some(AddBaker), + #[allow(deprecated)] AccountTransactionEffects::BakerRemoved { .. } => Some(RemoveBaker), + #[allow(deprecated)] AccountTransactionEffects::BakerStakeUpdated { .. } => Some(UpdateBakerStake), + #[allow(deprecated)] AccountTransactionEffects::BakerRestakeEarningsUpdated { .. } => { Some(UpdateBakerRestakeEarnings) } + #[allow(deprecated)] AccountTransactionEffects::BakerKeysUpdated { .. } => Some(UpdateBakerKeys), + #[allow(deprecated)] AccountTransactionEffects::EncryptedAmountTransferred { .. } => { Some(EncryptedAmountTransfer) } + #[allow(deprecated)] AccountTransactionEffects::EncryptedAmountTransferredWithMemo { .. } => { Some(EncryptedAmountTransferWithMemo) } + #[allow(deprecated)] AccountTransactionEffects::TransferredToEncrypted { .. } => Some(TransferToEncrypted), AccountTransactionEffects::TransferredToPublic { .. } => Some(TransferToPublic), AccountTransactionEffects::TransferredWithSchedule { .. } => Some(TransferWithSchedule), diff --git a/src/types/summary_helper.rs b/src/types/summary_helper.rs index 92844a229..0249c555e 100644 --- a/src/types/summary_helper.rs +++ b/src/types/summary_helper.rs @@ -462,10 +462,14 @@ impl From for BlockItemSummary { }, Event::TransferMemo { memo }, ), - super::AccountTransactionEffects::BakerAdded { data } => { + super::AccountTransactionEffects::BakerAdded { data } => + { + #[allow(deprecated)] mk_success_1(TransactionType::AddBaker, Event::BakerAdded { data }) } - super::AccountTransactionEffects::BakerRemoved { baker_id } => { + super::AccountTransactionEffects::BakerRemoved { baker_id } => + { + #[allow(deprecated)] mk_success_1(TransactionType::RemoveBaker, Event::BakerRemoved { baker_id, account: sender, @@ -474,6 +478,7 @@ impl From for BlockItemSummary { super::AccountTransactionEffects::BakerStakeUpdated { data } => { if let Some(data) = data { mk_success_1( + #[allow(deprecated)] TransactionType::UpdateBakerStake, if data.increased { Event::BakerStakeIncreased { @@ -491,6 +496,7 @@ impl From for BlockItemSummary { ) } else { ( + #[allow(deprecated)] Some(TransactionType::UpdateBakerStake), BlockItemResult::Success { events: Vec::new() }, ) @@ -500,6 +506,7 @@ impl From for BlockItemSummary { baker_id, restake_earnings, } => mk_success_1( + #[allow(deprecated)] TransactionType::UpdateBakerRestakeEarnings, Event::BakerSetRestakeEarnings { baker_id, @@ -507,7 +514,9 @@ impl From for BlockItemSummary { restake_earnings, }, ), - super::AccountTransactionEffects::BakerKeysUpdated { data } => { + super::AccountTransactionEffects::BakerKeysUpdated { data } => + { + #[allow(deprecated)] mk_success_1(TransactionType::UpdateBakerKeys, Event::BakerKeysUpdated { data, }) @@ -516,6 +525,7 @@ impl From for BlockItemSummary { removed, added, } => mk_success_2( + #[allow(deprecated)] TransactionType::EncryptedAmountTransfer, Event::EncryptedAmountsRemoved { data: removed }, Event::NewEncryptedAmount { data: added }, @@ -525,12 +535,15 @@ impl From for BlockItemSummary { added, memo, } => mk_success_3( + #[allow(deprecated)] TransactionType::EncryptedAmountTransferWithMemo, Event::EncryptedAmountsRemoved { data: removed }, Event::NewEncryptedAmount { data: added }, Event::TransferMemo { memo }, ), - super::AccountTransactionEffects::TransferredToEncrypted { data } => { + super::AccountTransactionEffects::TransferredToEncrypted { data } => + { + #[allow(deprecated)] mk_success_1( TransactionType::TransferToEncrypted, Event::EncryptedSelfAmountAdded { data }, @@ -899,6 +912,7 @@ fn convert_account_transaction( _ => Err(ConversionError::InvalidTransactionResult), } } + #[allow(deprecated)] TransactionType::AddBaker => { let effects = with_singleton(events, |e| match e { Event::BakerAdded { data } => { @@ -908,6 +922,7 @@ fn convert_account_transaction( })?; mk_success(effects) } + #[allow(deprecated)] TransactionType::RemoveBaker => { let effects = with_singleton(events, |e| match e { Event::BakerRemoved { @@ -918,6 +933,7 @@ fn convert_account_transaction( })?; mk_success(effects) } + #[allow(deprecated)] TransactionType::UpdateBakerStake => { let effects = if events.is_empty() { super::AccountTransactionEffects::BakerStakeUpdated { data: None } @@ -950,6 +966,7 @@ fn convert_account_transaction( }; mk_success(effects) } + #[allow(deprecated)] TransactionType::UpdateBakerRestakeEarnings => { let effects = with_singleton(events, |e| match e { Event::BakerSetRestakeEarnings { @@ -966,6 +983,7 @@ fn convert_account_transaction( })?; mk_success(effects) } + #[allow(deprecated)] TransactionType::UpdateBakerKeys => { let effects = with_singleton(events, |e| match e { Event::BakerKeysUpdated { data } => { @@ -984,6 +1002,7 @@ fn convert_account_transaction( })?; mk_success(effects) } + #[allow(deprecated)] TransactionType::EncryptedAmountTransfer => { let events_arr: [_; 2] = events .try_into() @@ -1000,6 +1019,7 @@ fn convert_account_transaction( _ => Err(ConversionError::InvalidTransactionResult), } } + #[allow(deprecated)] TransactionType::EncryptedAmountTransferWithMemo => { let events_arr: [_; 3] = events .try_into() @@ -1017,6 +1037,7 @@ fn convert_account_transaction( _ => Err(ConversionError::InvalidTransactionResult), } } + #[allow(deprecated)] TransactionType::TransferToEncrypted => { let effects = with_singleton(events, |e| match e { Event::EncryptedSelfAmountAdded { data } => { diff --git a/src/v2/conversions.rs b/src/v2/conversions.rs index 6b3085693..fe3c71ad9 100644 --- a/src/v2/conversions.rs +++ b/src/v2/conversions.rs @@ -5,7 +5,10 @@ use super::generated::*; use super::Require; use crate::{ - types::{queries::ConcordiumBFTDetails, UpdateKeysCollectionSkeleton}, + types::{ + queries::ConcordiumBFTDetails, AccountReleaseSchedule, ActiveBakerPoolStatus, + UpdateKeysCollectionSkeleton, + }, v2::generated::BlockCertificates, }; use chrono::TimeZone; @@ -21,6 +24,7 @@ use concordium_base::{ }, updates, }; +use cooldown::CooldownStatus; use std::collections::{BTreeMap, BTreeSet}; fn consume(bytes: &[u8]) -> Result { @@ -899,6 +903,35 @@ impl TryFrom for super::types::DelegatorRewardPeriodI } } +impl From for super::types::CooldownStatus { + fn from(cds: CooldownStatus) -> Self { + match cds { + CooldownStatus::Cooldown => Self::Cooldown, + CooldownStatus::PreCooldown => Self::PreCooldown, + CooldownStatus::PrePreCooldown => Self::PrePreCooldown, + } + } +} + +impl TryFrom for super::types::Cooldown { + type Error = tonic::Status; + + fn try_from(cd: Cooldown) -> Result { + Ok(Self { + status: CooldownStatus::try_from(cd.status) + .map_err(|_| { + tonic::Status::invalid_argument(format!( + "unknown cooldown status value {}", + cd.status + )) + })? + .into(), + end_time: cd.end_time.require()?.into(), + amount: cd.amount.require()?.into(), + }) + } +} + impl TryFrom for super::types::AccountInfo { type Error = tonic::Status; @@ -914,19 +947,54 @@ impl TryFrom for super::types::AccountInfo { index, stake, address, + cooldowns, + available_balance, } = value; let account_nonce = sequence_number.require()?.into(); let account_amount = amount.require()?.into(); - let account_release_schedule = schedule.require()?.try_into()?; + let account_release_schedule: AccountReleaseSchedule = schedule.require()?.try_into()?; let account_threshold = threshold.require()?.try_into()?; let account_encrypted_amount = encrypted_balance.require()?.try_into()?; let account_encryption_key = encryption_key.require()?.try_into()?; let account_index = index.require()?.into(); - let account_stake = match stake { + let account_stake: Option = match stake { Some(stake) => Some(stake.try_into()?), None => None, }; let account_address = address.require()?.try_into()?; + let mut cds: Vec = Vec::with_capacity(cooldowns.len()); + for cooldown in cooldowns.into_iter() { + cds.push(cooldown.try_into()?) + } + let cooldowns = cds; + + // The available balance is only provided as convenience and in case the + // calculation of it changes in the future. It should be present if the node + // is version 7 (or later). If the available balance is not present, + // we calculate it manually instead. + // If we up the minimum supported node version to version 7, we can remove this + // fallback calculation and instead require the available balance field to + // always be present. + let available_balance = available_balance.map(|ab| ab.into()).unwrap_or_else(|| { + let active_stake = account_stake + .as_ref() + .map(|s| s.staked_amount()) + .unwrap_or_default(); + + let inactive_stake = cooldowns.iter().map(|cd| cd.amount).sum(); + + let staked_amount = active_stake + inactive_stake; + + // The locked amount is the maximum of the amount in the release schedule and + // the total amount that is actively staked or in cooldown (inactive stake). + let locked_amount = Ord::max(account_release_schedule.total, staked_amount); + + // According to the protobuf documentation: + // The available (unencrypted) balance of the account is the balance minus the + // locked amount. + account_amount - locked_amount + }); + Ok(Self { account_nonce, account_amount, @@ -947,6 +1015,8 @@ impl TryFrom for super::types::AccountInfo { account_index, account_stake, account_address, + cooldowns, + available_balance, }) } } @@ -2471,20 +2541,29 @@ impl TryFrom for super::types::BakerPoolStatus { type Error = tonic::Status; fn try_from(value: PoolInfoResponse) -> Result { + // The active baker pool status is present iff the pool info is present in the + // response. + let active_baker_pool_status = match value.pool_info { + None => None, + Some(pi) => Some(ActiveBakerPoolStatus { + baker_equity_capital: value.equity_capital.require()?.into(), + delegated_capital: value.delegated_capital.require()?.into(), + delegated_capital_cap: value.delegated_capital_cap.require()?.into(), + pool_info: pi.try_into()?, + baker_stake_pending_change: value.equity_pending_change.try_into()?, + }), + }; + Ok(Self { - baker_id: value.baker.require()?.into(), - baker_address: value.address.require()?.try_into()?, - baker_equity_capital: value.equity_capital.require()?.into(), - delegated_capital: value.delegated_capital.require()?.into(), - delegated_capital_cap: value.delegated_capital_cap.require()?.into(), - pool_info: value.pool_info.require()?.try_into()?, - baker_stake_pending_change: value.equity_pending_change.try_into()?, - current_payday_status: if let Some(v) = value.current_payday_info { + baker_id: value.baker.require()?.into(), + baker_address: value.address.require()?.try_into()?, + active_baker_pool_status, + current_payday_status: if let Some(v) = value.current_payday_info { Some(v.try_into()?) } else { None }, - all_pool_total_capital: value.all_pool_total_capital.require()?.into(), + all_pool_total_capital: value.all_pool_total_capital.require()?.into(), }) } } diff --git a/src/v2/generated/concordium.v2.rs b/src/v2/generated/concordium.v2.rs index 0ff347f76..f02f771c1 100644 --- a/src/v2/generated/concordium.v2.rs +++ b/src/v2/generated/concordium.v2.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// A message that contains no information. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -644,6 +645,73 @@ pub mod account_credential { Normal(super::NormalCredentialValues), } } +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Cooldown { + /// The time in milliseconds since the Unix epoch when the cooldown period + /// ends. + #[prost(message, optional, tag = "1")] + pub end_time: ::core::option::Option, + /// The amount that is in cooldown and set to be released at the end of the + /// cooldown period. + #[prost(message, optional, tag = "2")] + pub amount: ::core::option::Option, + /// The status of the cooldown. + #[prost(enumeration = "cooldown::CooldownStatus", tag = "3")] + pub status: i32, +} +/// Nested message and enum types in `Cooldown`. +pub mod cooldown { + /// The status of a cooldown. When stake is removed from a baker or + /// delegator (from protocol version 7) it first enters the + /// pre-pre-cooldown state. The next time the stake snaphot is taken (at + /// the epoch transition before a payday) it enters the pre-cooldown + /// state. At the subsequent payday, it enters the cooldown state. At + /// the payday after the end of the cooldown period, the stake is + /// finally released. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum CooldownStatus { + /// The amount is in cooldown and will expire at the specified time, + /// becoming available at the subsequent pay day. + Cooldown = 0, + /// The amount will enter cooldown at the next pay day. The specified + /// end time is projected to be the end of the cooldown period, + /// but the actual end time will be determined at the payday, + /// and may be different if the global cooldown period changes. + PreCooldown = 1, + /// The amount will enter pre-cooldown at the next snapshot epoch (i.e. + /// the epoch transition before a pay day transition). As with + /// pre-cooldown, the specified end time is projected, but the + /// actual end time will be determined later. + PrePreCooldown = 2, + } + impl CooldownStatus { + /// String value of the enum field names used in the ProtoBuf + /// definition. + /// + /// The values are not transformed in any way and thus are considered + /// stable (if the ProtoBuf definition does not change) and safe + /// for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + CooldownStatus::Cooldown => "COOLDOWN", + CooldownStatus::PreCooldown => "PRE_COOLDOWN", + CooldownStatus::PrePreCooldown => "PRE_PRE_COOLDOWN", + } + } + + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "COOLDOWN" => Some(Self::Cooldown), + "PRE_COOLDOWN" => Some(Self::PreCooldown), + "PRE_PRE_COOLDOWN" => Some(Self::PrePreCooldown), + _ => None, + } + } + } +} /// Information about the account at a particular point in time. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -690,6 +758,20 @@ pub struct AccountInfo { /// credential that created the account. #[prost(message, optional, tag = "10")] pub address: ::core::option::Option, + /// The stake on the account that is in cooldown. + /// There can be multiple amounts in cooldown that expire at different + /// times. This was introduced in protocol version 7, and so is not + /// present in earlier protocol versions. + #[prost(message, repeated, tag = "11")] + pub cooldowns: ::prost::alloc::vec::Vec, + /// The available (unencrypted) balance of the account (i.e. that can be + /// transferred or used to pay for transactions). This is the balance + /// minus the locked amount. The locked amount is the maximum of the + /// amount in the release schedule and the total amount that is actively + /// staked or in cooldown (inactive stake). This was introduced in node + /// version 7.0. + #[prost(message, optional, tag = "12")] + pub available_balance: ::core::option::Option, } /// Input to queries which take a block as a parameter. #[allow(clippy::derive_partial_eq_without_eq)] @@ -3048,6 +3130,12 @@ pub struct PoolCurrentPaydayInfo { } /// Type for the response of GetPoolInfo. /// Contains information about a given pool at the end of a given block. +/// From protocol version 7, pool removal has immediate effect, however, the +/// pool may still be present for the current (and possibly next) reward period. +/// In this case, the `current_payday_info` field will be set, but the +/// `equity_capital`, `delegated_capital`, `delegated_capital_cap` and, +/// `pool_info` fields will all be absent. The `equity_pending_change` field +/// will also be absent, as stake changes are immediate. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PoolInfoResponse { @@ -3057,21 +3145,25 @@ pub struct PoolInfoResponse { /// The account address of the pool owner. #[prost(message, optional, tag = "2")] pub address: ::core::option::Option, - /// The equity capital provided by the pool owner. + /// The equity capital provided by the pool owner. Absent if the pool is + /// removed. #[prost(message, optional, tag = "3")] pub equity_capital: ::core::option::Option, - /// The capital delegated to the pool by other accounts. + /// The capital delegated to the pool by other accounts. Absent if the pool + /// is removed. #[prost(message, optional, tag = "4")] pub delegated_capital: ::core::option::Option, /// The maximum amount that may be delegated to the pool, accounting for - /// leverage and stake limits. + /// leverage and stake limits. Absent if the pool is removed. #[prost(message, optional, tag = "5")] pub delegated_capital_cap: ::core::option::Option, /// The pool info associated with the pool: open status, metadata URL and - /// commission rates. + /// commission rates. Absent if the pool is removed. #[prost(message, optional, tag = "6")] pub pool_info: ::core::option::Option, - /// Any pending change to the equity carpital. + /// Any pending change to the equity capital. + /// This is not used from protocol version 7 onwards, as stake changes are + /// immediate. #[prost(message, optional, tag = "7")] pub equity_pending_change: ::core::option::Option, /// Information of the pool in the current reward period. @@ -5602,7 +5694,7 @@ pub mod queries_client { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where - D: std::convert::TryInto, + D: TryInto, D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) @@ -5660,13 +5752,33 @@ pub mod queries_client { self } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// Return a stream of blocks that arrive from the time the query is /// made onward. This can be used to listen for incoming blocks. pub async fn get_blocks( &mut self, request: impl tonic::IntoRequest, - ) -> Result>, tonic::Status> - { + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -5675,9 +5787,10 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetBlocks"); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetBlocks")); + self.inner.server_streaming(req, path, codec).await } /// Return a stream of blocks that are finalized from the time the query @@ -5689,7 +5802,7 @@ pub mod queries_client { pub async fn get_finalized_blocks( &mut self, request: impl tonic::IntoRequest, - ) -> Result< + ) -> std::result::Result< tonic::Response>, tonic::Status, > { @@ -5702,16 +5815,19 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetFinalizedBlocks"); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetFinalizedBlocks", + )); + self.inner.server_streaming(req, path, codec).await } /// Retrieve the information about the given account in the given block. pub async fn get_account_info( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -5721,7 +5837,10 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetAccountInfo"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetAccountInfo")); + self.inner.unary(req, path, codec).await } /// Retrieve the list of accounts that exist at the end of the given @@ -5729,8 +5848,10 @@ pub mod queries_client { pub async fn get_account_list( &mut self, request: impl tonic::IntoRequest, - ) -> Result>, tonic::Status> - { + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -5740,9 +5861,10 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetAccountList"); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetAccountList")); + self.inner.server_streaming(req, path, codec).await } /// Get a list of all smart contract modules. The stream will end @@ -5751,8 +5873,10 @@ pub mod queries_client { pub async fn get_module_list( &mut self, request: impl tonic::IntoRequest, - ) -> Result>, tonic::Status> - { + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -5761,9 +5885,10 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetModuleList"); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetModuleList")); + self.inner.server_streaming(req, path, codec).await } /// Get a stream of ancestors for the provided block. @@ -5773,8 +5898,10 @@ pub mod queries_client { pub async fn get_ancestors( &mut self, request: impl tonic::IntoRequest, - ) -> Result>, tonic::Status> - { + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -5783,16 +5910,18 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetAncestors"); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetAncestors")); + self.inner.server_streaming(req, path, codec).await } /// Get the source of a smart contract module. pub async fn get_module_source( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -5802,7 +5931,10 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetModuleSource"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetModuleSource")); + self.inner.unary(req, path, codec).await } /// Get a list of addresses for all smart contract instances. The stream @@ -5811,8 +5943,10 @@ pub mod queries_client { pub async fn get_instance_list( &mut self, request: impl tonic::IntoRequest, - ) -> Result>, tonic::Status> - { + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -5822,9 +5956,10 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetInstanceList"); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetInstanceList")); + self.inner.server_streaming(req, path, codec).await } /// Get info about a smart contract instance as it appears at the end of @@ -5832,7 +5967,7 @@ pub mod queries_client { pub async fn get_instance_info( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -5842,7 +5977,10 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetInstanceInfo"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetInstanceInfo")); + self.inner.unary(req, path, codec).await } /// Get the exact state of a specific contract instance, streamed as a @@ -5851,7 +5989,7 @@ pub mod queries_client { pub async fn get_instance_state( &mut self, request: impl tonic::IntoRequest, - ) -> Result< + ) -> std::result::Result< tonic::Response>, tonic::Status, > { @@ -5864,9 +6002,10 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetInstanceState"); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetInstanceState")); + self.inner.server_streaming(req, path, codec).await } /// Get the value at a specific key of a contract state. In contrast to @@ -5875,7 +6014,8 @@ pub mod queries_client { pub async fn instance_state_lookup( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -5885,7 +6025,12 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/InstanceStateLookup"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "InstanceStateLookup", + )); + self.inner.unary(req, path, codec).await } /// Get the best guess as to what the next account sequence number @@ -5896,7 +6041,8 @@ pub mod queries_client { pub async fn get_next_account_sequence_number( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -5907,14 +6053,19 @@ pub mod queries_client { let path = http::uri::PathAndQuery::from_static( "/concordium.v2.Queries/GetNextAccountSequenceNumber", ); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetNextAccountSequenceNumber", + )); + self.inner.unary(req, path, codec).await } /// Get information about the current state of consensus. pub async fn get_consensus_info( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -5924,7 +6075,10 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetConsensusInfo"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetConsensusInfo")); + self.inner.unary(req, path, codec).await } /// Get the status of and information about a specific block item @@ -5932,7 +6086,7 @@ pub mod queries_client { pub async fn get_block_item_status( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -5942,14 +6096,20 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetBlockItemStatus"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetBlockItemStatus", + )); + self.inner.unary(req, path, codec).await } /// Get the cryptographic parameters in a given block. pub async fn get_cryptographic_parameters( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -5960,7 +6120,12 @@ pub mod queries_client { let path = http::uri::PathAndQuery::from_static( "/concordium.v2.Queries/GetCryptographicParameters", ); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetCryptographicParameters", + )); + self.inner.unary(req, path, codec).await } /// Get information, such as height, timings, and transaction counts for @@ -5968,7 +6133,7 @@ pub mod queries_client { pub async fn get_block_info( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -5977,15 +6142,20 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetBlockInfo"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetBlockInfo")); + self.inner.unary(req, path, codec).await } /// Get all the bakers at the end of the given block. pub async fn get_baker_list( &mut self, request: impl tonic::IntoRequest, - ) -> Result>, tonic::Status> - { + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -5994,16 +6164,17 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetBakerList"); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetBakerList")); + self.inner.server_streaming(req, path, codec).await } /// Get information about a given pool at the end of a given block. pub async fn get_pool_info( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6012,7 +6183,10 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetPoolInfo"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetPoolInfo")); + self.inner.unary(req, path, codec).await } /// Get information about the passive delegators at the end of a given @@ -6020,7 +6194,8 @@ pub mod queries_client { pub async fn get_passive_delegation_info( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6031,14 +6206,20 @@ pub mod queries_client { let path = http::uri::PathAndQuery::from_static( "/concordium.v2.Queries/GetPassiveDelegationInfo", ); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetPassiveDelegationInfo", + )); + self.inner.unary(req, path, codec).await } /// Get a list of live blocks at a given height. pub async fn get_blocks_at_height( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6048,14 +6229,19 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetBlocksAtHeight"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetBlocksAtHeight", + )); + self.inner.unary(req, path, codec).await } /// Get information about tokenomics at the end of a given block. pub async fn get_tokenomics_info( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6065,7 +6251,12 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetTokenomicsInfo"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetTokenomicsInfo", + )); + self.inner.unary(req, path, codec).await } /// Run the smart contract entrypoint in a given context and in the @@ -6073,7 +6264,8 @@ pub mod queries_client { pub async fn invoke_instance( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6083,7 +6275,10 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/InvokeInstance"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "InvokeInstance")); + self.inner.unary(req, path, codec).await } /// Get the registered delegators of a given pool at the end of a given @@ -6096,8 +6291,10 @@ pub mod queries_client { pub async fn get_pool_delegators( &mut self, request: impl tonic::IntoRequest, - ) -> Result>, tonic::Status> - { + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6107,9 +6304,12 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetPoolDelegators"); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetPoolDelegators", + )); + self.inner.server_streaming(req, path, codec).await } /// Get the fixed delegators of a given pool for the reward period of @@ -6121,7 +6321,7 @@ pub mod queries_client { pub async fn get_pool_delegators_reward_period( &mut self, request: impl tonic::IntoRequest, - ) -> Result< + ) -> std::result::Result< tonic::Response>, tonic::Status, > { @@ -6135,9 +6335,12 @@ pub mod queries_client { let path = http::uri::PathAndQuery::from_static( "/concordium.v2.Queries/GetPoolDelegatorsRewardPeriod", ); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetPoolDelegatorsRewardPeriod", + )); + self.inner.server_streaming(req, path, codec).await } /// Get the registered passive delegators at the end of a given block. @@ -6150,8 +6353,10 @@ pub mod queries_client { pub async fn get_passive_delegators( &mut self, request: impl tonic::IntoRequest, - ) -> Result>, tonic::Status> - { + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6161,9 +6366,12 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetPassiveDelegators"); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetPassiveDelegators", + )); + self.inner.server_streaming(req, path, codec).await } /// Get the fixed passive delegators for the reward period of the given @@ -6175,7 +6383,7 @@ pub mod queries_client { pub async fn get_passive_delegators_reward_period( &mut self, request: impl tonic::IntoRequest, - ) -> Result< + ) -> std::result::Result< tonic::Response>, tonic::Status, > { @@ -6189,9 +6397,12 @@ pub mod queries_client { let path = http::uri::PathAndQuery::from_static( "/concordium.v2.Queries/GetPassiveDelegatorsRewardPeriod", ); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetPassiveDelegatorsRewardPeriod", + )); + self.inner.server_streaming(req, path, codec).await } /// Get the current branches of blocks starting from and including the @@ -6199,7 +6410,7 @@ pub mod queries_client { pub async fn get_branches( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6208,7 +6419,10 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetBranches"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetBranches")); + self.inner.unary(req, path, codec).await } /// Get information related to the baker election for a particular @@ -6216,7 +6430,7 @@ pub mod queries_client { pub async fn get_election_info( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6226,7 +6440,10 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetElectionInfo"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetElectionInfo")); + self.inner.unary(req, path, codec).await } /// Get the identity providers registered as of the end of a given @@ -6235,8 +6452,10 @@ pub mod queries_client { pub async fn get_identity_providers( &mut self, request: impl tonic::IntoRequest, - ) -> Result>, tonic::Status> - { + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6246,9 +6465,12 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetIdentityProviders"); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetIdentityProviders", + )); + self.inner.server_streaming(req, path, codec).await } /// Get the anonymity revokers registered as of the end of a given @@ -6257,8 +6479,10 @@ pub mod queries_client { pub async fn get_anonymity_revokers( &mut self, request: impl tonic::IntoRequest, - ) -> Result>, tonic::Status> - { + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6268,9 +6492,12 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetAnonymityRevokers"); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetAnonymityRevokers", + )); + self.inner.server_streaming(req, path, codec).await } /// Get a list of non-finalized transaction hashes for a given account. @@ -6281,8 +6508,10 @@ pub mod queries_client { pub async fn get_account_non_finalized_transactions( &mut self, request: impl tonic::IntoRequest, - ) -> Result>, tonic::Status> - { + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6293,9 +6522,12 @@ pub mod queries_client { let path = http::uri::PathAndQuery::from_static( "/concordium.v2.Queries/GetAccountNonFinalizedTransactions", ); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetAccountNonFinalizedTransactions", + )); + self.inner.server_streaming(req, path, codec).await } /// Get a list of transaction events in a given block. @@ -6304,8 +6536,10 @@ pub mod queries_client { pub async fn get_block_transaction_events( &mut self, request: impl tonic::IntoRequest, - ) -> Result>, tonic::Status> - { + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6316,9 +6550,12 @@ pub mod queries_client { let path = http::uri::PathAndQuery::from_static( "/concordium.v2.Queries/GetBlockTransactionEvents", ); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetBlockTransactionEvents", + )); + self.inner.server_streaming(req, path, codec).await } /// Get a list of special events in a given block. These are events @@ -6329,8 +6566,10 @@ pub mod queries_client { pub async fn get_block_special_events( &mut self, request: impl tonic::IntoRequest, - ) -> Result>, tonic::Status> - { + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6341,9 +6580,12 @@ pub mod queries_client { let path = http::uri::PathAndQuery::from_static( "/concordium.v2.Queries/GetBlockSpecialEvents", ); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetBlockSpecialEvents", + )); + self.inner.server_streaming(req, path, codec).await } /// Get the pending updates to chain parameters at the end of a given @@ -6352,8 +6594,10 @@ pub mod queries_client { pub async fn get_block_pending_updates( &mut self, request: impl tonic::IntoRequest, - ) -> Result>, tonic::Status> - { + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6364,9 +6608,12 @@ pub mod queries_client { let path = http::uri::PathAndQuery::from_static( "/concordium.v2.Queries/GetBlockPendingUpdates", ); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetBlockPendingUpdates", + )); + self.inner.server_streaming(req, path, codec).await } /// Get next available sequence numbers for updating chain parameters @@ -6374,7 +6621,8 @@ pub mod queries_client { pub async fn get_next_update_sequence_numbers( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6385,7 +6633,12 @@ pub mod queries_client { let path = http::uri::PathAndQuery::from_static( "/concordium.v2.Queries/GetNextUpdateSequenceNumbers", ); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetNextUpdateSequenceNumbers", + )); + self.inner.unary(req, path, codec).await } /// Get the projected earliest time at which a particular baker will be @@ -6411,7 +6664,7 @@ pub mod queries_client { pub async fn get_baker_earliest_win_time( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6422,7 +6675,12 @@ pub mod queries_client { let path = http::uri::PathAndQuery::from_static( "/concordium.v2.Queries/GetBakerEarliestWinTime", ); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetBakerEarliestWinTime", + )); + self.inner.unary(req, path, codec).await } /// Shut down the node. @@ -6430,7 +6688,7 @@ pub mod queries_client { pub async fn shutdown( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6439,7 +6697,10 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/Shutdown"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "Shutdown")); + self.inner.unary(req, path, codec).await } /// Suggest to a peer to connect to the submitted peer details. @@ -6451,7 +6712,7 @@ pub mod queries_client { pub async fn peer_connect( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6460,7 +6721,10 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/PeerConnect"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "PeerConnect")); + self.inner.unary(req, path, codec).await } /// Disconnect from the peer and remove them from the given addresses @@ -6469,7 +6733,7 @@ pub mod queries_client { pub async fn peer_disconnect( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6479,14 +6743,17 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/PeerDisconnect"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "PeerDisconnect")); + self.inner.unary(req, path, codec).await } /// Get a list of banned peers. pub async fn get_banned_peers( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6496,7 +6763,10 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetBannedPeers"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetBannedPeers")); + self.inner.unary(req, path, codec).await } /// Ban the given peer. @@ -6504,7 +6774,7 @@ pub mod queries_client { pub async fn ban_peer( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6513,7 +6783,10 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/BanPeer"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "BanPeer")); + self.inner.unary(req, path, codec).await } /// Unban the banned peer. @@ -6521,7 +6794,7 @@ pub mod queries_client { pub async fn unban_peer( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6530,7 +6803,10 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/UnbanPeer"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "UnbanPeer")); + self.inner.unary(req, path, codec).await } /// Start dumping packages into the specified file. @@ -6539,7 +6815,7 @@ pub mod queries_client { pub async fn dump_start( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6548,7 +6824,10 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/DumpStart"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "DumpStart")); + self.inner.unary(req, path, codec).await } /// Stop dumping packages. @@ -6557,7 +6836,7 @@ pub mod queries_client { pub async fn dump_stop( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6566,7 +6845,10 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/DumpStop"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "DumpStop")); + self.inner.unary(req, path, codec).await } /// / Get a list of the peers that the node is connected to @@ -6574,7 +6856,7 @@ pub mod queries_client { pub async fn get_peers_info( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6583,7 +6865,10 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetPeersInfo"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetPeersInfo")); + self.inner.unary(req, path, codec).await } /// Get information about the node. @@ -6598,7 +6883,7 @@ pub mod queries_client { pub async fn get_node_info( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6607,7 +6892,10 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetNodeInfo"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetNodeInfo")); + self.inner.unary(req, path, codec).await } /// Send a block item. A block item is either an `AccountTransaction`, @@ -6622,7 +6910,7 @@ pub mod queries_client { pub async fn send_block_item( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6631,7 +6919,10 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/SendBlockItem"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "SendBlockItem")); + self.inner.unary(req, path, codec).await } /// Get the hash to be signed for an account transaction. The hash @@ -6646,7 +6937,8 @@ pub mod queries_client { pub async fn get_account_transaction_sign_hash( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6657,14 +6949,19 @@ pub mod queries_client { let path = http::uri::PathAndQuery::from_static( "/concordium.v2.Queries/GetAccountTransactionSignHash", ); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetAccountTransactionSignHash", + )); + self.inner.unary(req, path, codec).await } /// Get the values of chain parameters in effect in the given block. pub async fn get_block_chain_parameters( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6675,14 +6972,20 @@ pub mod queries_client { let path = http::uri::PathAndQuery::from_static( "/concordium.v2.Queries/GetBlockChainParameters", ); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetBlockChainParameters", + )); + self.inner.unary(req, path, codec).await } /// Get the summary of the finalization data in a given block. pub async fn get_block_finalization_summary( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6693,15 +6996,22 @@ pub mod queries_client { let path = http::uri::PathAndQuery::from_static( "/concordium.v2.Queries/GetBlockFinalizationSummary", ); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetBlockFinalizationSummary", + )); + self.inner.unary(req, path, codec).await } /// Get the items of a block. pub async fn get_block_items( &mut self, request: impl tonic::IntoRequest, - ) -> Result>, tonic::Status> - { + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6710,9 +7020,10 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetBlockItems"); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "GetBlockItems")); + self.inner.server_streaming(req, path, codec).await } /// Get all bakers in the reward period of a block. @@ -6722,7 +7033,7 @@ pub mod queries_client { pub async fn get_bakers_reward_period( &mut self, request: impl tonic::IntoRequest, - ) -> Result< + ) -> std::result::Result< tonic::Response>, tonic::Status, > { @@ -6736,9 +7047,12 @@ pub mod queries_client { let path = http::uri::PathAndQuery::from_static( "/concordium.v2.Queries/GetBakersRewardPeriod", ); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetBakersRewardPeriod", + )); + self.inner.server_streaming(req, path, codec).await } /// For a non-genesis block, this returns the quorum certificate, a @@ -6751,7 +7065,7 @@ pub mod queries_client { pub async fn get_block_certificates( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6761,7 +7075,12 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetBlockCertificates"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetBlockCertificates", + )); + self.inner.unary(req, path, codec).await } /// Get the list of bakers that won the lottery in a particular @@ -6786,8 +7105,10 @@ pub mod queries_client { pub async fn get_winning_bakers_epoch( &mut self, request: impl tonic::IntoRequest, - ) -> Result>, tonic::Status> - { + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6798,9 +7119,12 @@ pub mod queries_client { let path = http::uri::PathAndQuery::from_static( "/concordium.v2.Queries/GetWinningBakersEpoch", ); - self.inner - .server_streaming(request.into_request(), path, codec) - .await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetWinningBakersEpoch", + )); + self.inner.server_streaming(req, path, codec).await } /// Get the block hash of the first finalized block in a specified @@ -6817,7 +7141,7 @@ pub mod queries_client { pub async fn get_first_block_epoch( &mut self, request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6827,7 +7151,12 @@ pub mod queries_client { let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/GetFirstBlockEpoch"); - self.inner.unary(request.into_request(), path, codec).await + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "concordium.v2.Queries", + "GetFirstBlockEpoch", + )); + self.inner.unary(req, path, codec).await } /// Dry run a series of transactions and operations on a state derived @@ -6868,8 +7197,10 @@ pub mod queries_client { pub async fn dry_run( &mut self, request: impl tonic::IntoStreamingRequest, - ) -> Result>, tonic::Status> - { + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -6878,9 +7209,10 @@ pub mod queries_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/concordium.v2.Queries/DryRun"); - self.inner - .streaming(request.into_streaming_request(), path, codec) - .await + let mut req = request.into_streaming_request(); + req.extensions_mut() + .insert(GrpcMethod::new("concordium.v2.Queries", "DryRun")); + self.inner.streaming(req, path, codec).await } } } diff --git a/src/v2/proto_schema_version.rs b/src/v2/proto_schema_version.rs index 05a87b0b4..34ca3ef59 100644 --- a/src/v2/proto_schema_version.rs +++ b/src/v2/proto_schema_version.rs @@ -1 +1 @@ -pub const PROTO_SCHEMA_VERSION: &str = "7235ab10c1086f53c7ac29ab9e8c32ab163fd866"; +pub const PROTO_SCHEMA_VERSION: &str = "7f9899b3a27fc2b0132a058a46f953e13d59f739";