From 3a5d96333f5d22f4f02db0124765979556687e89 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Fri, 22 Apr 2022 16:44:51 -0700 Subject: [PATCH 01/20] Exponential backoff in logic call skips --- .../ethereum_gravity/src/logic_call.rs | 122 ++++++++++++++---- .../relayer/src/logic_call_relaying.rs | 6 +- 2 files changed, 96 insertions(+), 32 deletions(-) diff --git a/orchestrator/ethereum_gravity/src/logic_call.rs b/orchestrator/ethereum_gravity/src/logic_call.rs index 2ffda51b2..682f870c3 100644 --- a/orchestrator/ethereum_gravity/src/logic_call.rs +++ b/orchestrator/ethereum_gravity/src/logic_call.rs @@ -197,8 +197,16 @@ pub fn build_send_logic_call_contract_call( Ok(contract_call) } +#[derive(Clone)] pub struct LogicCallSkips { - skip_map: HashMap, HashMap>, + skip_map: HashMap, HashMap>, +} + +#[derive(Clone)] +pub struct LogicCallSkipState { + logic_call: LogicCall, + starting_skip_counter: u32, + skips_left: u32, } impl LogicCallSkips { @@ -208,25 +216,47 @@ impl LogicCallSkips { } } - pub fn should_skip(&self, call: &LogicCall) -> bool { + pub fn skips_left(&self, call: &LogicCall) -> u32 { let id_skips = self.skip_map.get(&call.invalidation_id); if id_skips.is_some() { let nonce_skips = id_skips.unwrap().get(&call.invalidation_nonce); if nonce_skips.is_some() { - return true; + return nonce_skips.unwrap().skips_left; } } - false + 0 } pub fn skip(&mut self, call: &LogicCall) { + let new_skip_state = LogicCallSkipState { + logic_call: call.clone(), + starting_skip_counter: 2, // start by waiting 2 loop iterations + skips_left: 2, + }; + let id_skips = self.skip_map.get_mut(&call.invalidation_id); if id_skips.is_none() { - let new_id_skips = HashMap::from([(call.invalidation_nonce, call.clone())]); + // first time we've seen this invalidation id, start at 2 skips + let new_id_skips = HashMap::from([(call.invalidation_nonce, new_skip_state)]); self.skip_map.insert(call.invalidation_id.clone(), new_id_skips); } else { - id_skips.unwrap().insert(call.invalidation_nonce.clone(), call.clone()); + let id_skips = id_skips.unwrap(); + let skip_state = id_skips.get_mut(&call.invalidation_nonce); + if skip_state.is_none() { + // first time we've seen this invalidation id and nonce combo, start at 2 skips + id_skips.insert(call.invalidation_nonce.clone(), new_skip_state); + } else { + let mut skip_state = skip_state.unwrap(); + if skip_state.skips_left == 0 { + // exponential backoff: double the number of skips and reset the skip counter + skip_state.starting_skip_counter *= 2; + skip_state.skips_left = skip_state.starting_skip_counter; + } else { + // decrement the existing skip counter + skip_state.skips_left -= 1; + } + } } } @@ -234,7 +264,7 @@ impl LogicCallSkips { for id_skip_map in self.skip_map.iter_mut() { let nonce_map = id_skip_map.1; for nonce_skip_map in nonce_map.clone() { - let call = nonce_skip_map.1; + let call = &nonce_skip_map.1.logic_call; // Contract calls are timed out based on the last observed ethereum event // height, which means if there is not much bridge activity occurring, // they will not get timed out. This adds a large (longer than a day) @@ -282,44 +312,80 @@ fn test_logic_call_skips() { let mut skips = LogicCallSkips::new(); - assert_eq!(skips.should_skip(&logic_call_1_nonce_1), false); - assert_eq!(skips.should_skip(&logic_call_1_nonce_2), false); - assert_eq!(skips.should_skip(&logic_call_2), false); + assert_eq!(skips.skips_left(&logic_call_1_nonce_1), 0); + assert_eq!(skips.skips_left(&logic_call_1_nonce_2), 0); + assert_eq!(skips.skips_left(&logic_call_2), 0); + // both will start with 2 skips skips.skip(&logic_call_1_nonce_1); skips.skip(&logic_call_2); - assert_eq!(skips.should_skip(&logic_call_1_nonce_1), true); - assert_eq!(skips.should_skip(&logic_call_1_nonce_2), false); - assert_eq!(skips.should_skip(&logic_call_2), true); + assert_eq!(skips.skips_left(&logic_call_1_nonce_1), 2); + assert_eq!(skips.skips_left(&logic_call_1_nonce_2), 0); + assert_eq!(skips.skips_left(&logic_call_2), 2); + + // logic_call_1_nonce_2 will now start with 2 skips + skips.skip(&logic_call_1_nonce_2); + + assert_eq!(skips.skips_left(&logic_call_1_nonce_1), 2); + assert_eq!(skips.skips_left(&logic_call_1_nonce_2), 2); + assert_eq!(skips.skips_left(&logic_call_2), 2); + // burn down the remaining skips + skips.skip(&logic_call_1_nonce_1); skips.skip(&logic_call_1_nonce_2); + skips.skip(&logic_call_2); - assert_eq!(skips.should_skip(&logic_call_1_nonce_1), true); - assert_eq!(skips.should_skip(&logic_call_1_nonce_2), true); - assert_eq!(skips.should_skip(&logic_call_2), true); + assert_eq!(skips.skips_left(&logic_call_1_nonce_1), 1); + assert_eq!(skips.skips_left(&logic_call_1_nonce_2), 1); + assert_eq!(skips.skips_left(&logic_call_2), 1); + skips.skip(&logic_call_1_nonce_1); + skips.skip(&logic_call_1_nonce_2); + skips.skip(&logic_call_2); + + assert_eq!(skips.skips_left(&logic_call_1_nonce_1), 0); + assert_eq!(skips.skips_left(&logic_call_1_nonce_2), 0); + assert_eq!(skips.skips_left(&logic_call_2), 0); + + // only skip one of each call and observe exponential backoff + skips.skip(&logic_call_1_nonce_1); + skips.skip(&logic_call_2); + + assert_eq!(skips.skips_left(&logic_call_1_nonce_1), 4); + assert_eq!(skips.skips_left(&logic_call_1_nonce_2), 0); + assert_eq!(skips.skips_left(&logic_call_2), 4); + + // now skip the other nonce + skips.skip(&logic_call_1_nonce_2); + + assert_eq!(skips.skips_left(&logic_call_1_nonce_1), 4); + assert_eq!(skips.skips_left(&logic_call_1_nonce_2), 4); + assert_eq!(skips.skips_left(&logic_call_2), 4); + + // clear out timed-out logic call skip state skips.clear_old_calls(6000); - assert_eq!(skips.should_skip(&logic_call_1_nonce_1), true); - assert_eq!(skips.should_skip(&logic_call_1_nonce_2), true); - assert_eq!(skips.should_skip(&logic_call_2), true); + assert_eq!(skips.skips_left(&logic_call_1_nonce_1), 4); + assert_eq!(skips.skips_left(&logic_call_1_nonce_2), 4); + assert_eq!(skips.skips_left(&logic_call_2), 4); skips.clear_old_calls(8850); - assert_eq!(skips.should_skip(&logic_call_1_nonce_1), false); - assert_eq!(skips.should_skip(&logic_call_1_nonce_2), true); - assert_eq!(skips.should_skip(&logic_call_2), true); + assert_eq!(skips.skips_left(&logic_call_1_nonce_1), 0); + assert_eq!(skips.skips_left(&logic_call_1_nonce_2), 4); + assert_eq!(skips.skips_left(&logic_call_2), 4); skips.clear_old_calls(8980); - assert_eq!(skips.should_skip(&logic_call_1_nonce_1), false); - assert_eq!(skips.should_skip(&logic_call_1_nonce_2), false); - assert_eq!(skips.should_skip(&logic_call_2), true); + assert_eq!(skips.skips_left(&logic_call_1_nonce_1), 0); + assert_eq!(skips.skips_left(&logic_call_1_nonce_2), 0); + assert_eq!(skips.skips_left(&logic_call_2), 4); skips.clear_old_calls(9001); - assert_eq!(skips.should_skip(&logic_call_1_nonce_1), false); - assert_eq!(skips.should_skip(&logic_call_1_nonce_2), false); - assert_eq!(skips.should_skip(&logic_call_2), false); + assert_eq!(skips.skips_left(&logic_call_1_nonce_1), 0); + assert_eq!(skips.skips_left(&logic_call_1_nonce_2), 0); + assert_eq!(skips.skips_left(&logic_call_2), 0); + } diff --git a/orchestrator/relayer/src/logic_call_relaying.rs b/orchestrator/relayer/src/logic_call_relaying.rs index f99f80abb..86677f4ad 100644 --- a/orchestrator/relayer/src/logic_call_relaying.rs +++ b/orchestrator/relayer/src/logic_call_relaying.rs @@ -4,11 +4,8 @@ use ethereum_gravity::one_eth_f32; use ethereum_gravity::{ logic_call::send_eth_logic_call, types::EthClient, utils::get_logic_call_nonce, }; -use ethers::prelude::ContractError; -use ethers::prelude::signer::SignerMiddlewareError; use ethers::types::Address as EthAddress; use gravity_proto::gravity::query_client::QueryClient as GravityQueryClient; -use gravity_utils::error::GravityError; use gravity_utils::ethereum::{bytes_to_hex_str, downcast_to_f32}; use gravity_utils::types::{LogicCallConfirmResponse, Valset}; use gravity_utils::{message_signatures::encode_logic_call_confirm_hashed, types::LogicCall}; @@ -40,11 +37,12 @@ pub async fn relay_logic_calls( let mut oldest_signed_call: Option = None; let mut oldest_signatures: Option> = None; for call in latest_calls { - if logic_call_skips.should_skip(&call) { + if logic_call_skips.skips_left(&call) > 0 { warn!( "Skipping LogicCall {}/{}, will be skipped until on-chain timeout at eth height {} or process restart", bytes_to_hex_str(&call.invalidation_id), call.invalidation_nonce, call.timeout ); + logic_call_skips.skip(&call); continue; } From b542ef13e3a9b5c57deb022d130d495dcf0e1647 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Fri, 22 Apr 2022 16:48:30 -0700 Subject: [PATCH 02/20] Clearer variable naming --- orchestrator/ethereum_gravity/src/logic_call.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/orchestrator/ethereum_gravity/src/logic_call.rs b/orchestrator/ethereum_gravity/src/logic_call.rs index 682f870c3..f27bb085a 100644 --- a/orchestrator/ethereum_gravity/src/logic_call.rs +++ b/orchestrator/ethereum_gravity/src/logic_call.rs @@ -219,9 +219,9 @@ impl LogicCallSkips { pub fn skips_left(&self, call: &LogicCall) -> u32 { let id_skips = self.skip_map.get(&call.invalidation_id); if id_skips.is_some() { - let nonce_skips = id_skips.unwrap().get(&call.invalidation_nonce); - if nonce_skips.is_some() { - return nonce_skips.unwrap().skips_left; + let skip_state = id_skips.unwrap().get(&call.invalidation_nonce); + if skip_state.is_some() { + return skip_state.unwrap().skips_left; } } From cb1fd8d2d402efeeb393965108a7146d7c25c734 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Fri, 22 Apr 2022 16:57:23 -0700 Subject: [PATCH 03/20] Make skip message more informative --- orchestrator/relayer/src/logic_call_relaying.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/orchestrator/relayer/src/logic_call_relaying.rs b/orchestrator/relayer/src/logic_call_relaying.rs index 86677f4ad..c795a0294 100644 --- a/orchestrator/relayer/src/logic_call_relaying.rs +++ b/orchestrator/relayer/src/logic_call_relaying.rs @@ -1,3 +1,4 @@ +use crate::main_loop::LOOP_SPEED; use cosmos_gravity::query::{get_latest_logic_calls, get_logic_call_signatures}; use ethereum_gravity::logic_call::LogicCallSkips; use ethereum_gravity::one_eth_f32; @@ -37,10 +38,11 @@ pub async fn relay_logic_calls( let mut oldest_signed_call: Option = None; let mut oldest_signatures: Option> = None; for call in latest_calls { - if logic_call_skips.skips_left(&call) > 0 { + let skips_left: u64 = logic_call_skips.skips_left(&call).into(); + if skips_left > 0 { warn!( - "Skipping LogicCall {}/{}, will be skipped until on-chain timeout at eth height {} or process restart", - bytes_to_hex_str(&call.invalidation_id), call.invalidation_nonce, call.timeout + "Skipping LogicCall {}/{} with eth timeout {}, estimated next retry after minimum of {} seconds", + bytes_to_hex_str(&call.invalidation_id), call.invalidation_nonce, call.timeout, skips_left * LOOP_SPEED.as_secs() ); logic_call_skips.skip(&call); continue; From 51891c2f7e45d9139918ea836ae3bebe4aedb18b Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Tue, 26 Apr 2022 23:02:46 -0700 Subject: [PATCH 04/20] Parse custom Gravity error types --- orchestrator/Cargo.lock | 1 + orchestrator/ethereum_gravity/src/utils.rs | 69 ++++- orchestrator/gravity_abi/src/lib.rs | 2 +- orchestrator/gravity_utils/Cargo.toml | 1 + .../src/types/gravity_contract_errors.rs | 268 ++++++++++++++++++ orchestrator/gravity_utils/src/types/mod.rs | 2 + .../relayer/src/logic_call_relaying.rs | 11 +- 7 files changed, 349 insertions(+), 5 deletions(-) create mode 100644 orchestrator/gravity_utils/src/types/gravity_contract_errors.rs diff --git a/orchestrator/Cargo.lock b/orchestrator/Cargo.lock index b563a9c41..6d99dc2b2 100644 --- a/orchestrator/Cargo.lock +++ b/orchestrator/Cargo.lock @@ -2339,6 +2339,7 @@ dependencies = [ "gravity_abi", "gravity_proto", "hdpath", + "lazy_static", "log", "num-bigint 0.4.0", "num256", diff --git a/orchestrator/ethereum_gravity/src/utils.rs b/orchestrator/ethereum_gravity/src/utils.rs index fe6cf55e7..ced710193 100644 --- a/orchestrator/ethereum_gravity/src/utils.rs +++ b/orchestrator/ethereum_gravity/src/utils.rs @@ -5,7 +5,8 @@ use ethers::prelude::*; use ethers::types::Address as EthAddress; use gravity_abi::gravity::*; use gravity_utils::error::GravityError; -use gravity_utils::ethereum::{downcast_to_u64, vec_u8_to_fixed_32}; +use gravity_utils::ethereum::{downcast_to_u64, vec_u8_to_fixed_32, hex_str_to_bytes}; +use gravity_utils::types::{decode_gravity_error, GravityContractError}; use std::result::Result; /// Gets the latest validator set nonce @@ -188,3 +189,69 @@ impl GasCost { self.gas * self.gas_price } } + +pub fn log_contract_error(gravity_error: GravityError) { + let error_string = format!("LogicCall error: {:?}", gravity_error); + let gravity_contract_error = extract_gravity_contract_error(gravity_error); + + if gravity_contract_error.is_some() { + match gravity_contract_error.unwrap() { + GravityContractError::InvalidLogicCallNonce(nonce_error) => { + info!("LogicCall already processed, skipping until observed on chain: {}", nonce_error.message()) + } + _ => { error!("{}", error_string) } + } + } else { + error!("{}", error_string); + } +} + +// ethers is providing an extremely nested set of enums as an error type and decomposing it +// results in this nightmare +pub fn extract_gravity_contract_error(gravity_error: GravityError) -> Option { + match gravity_error { + GravityError::EthersContractError(ce) => { + match ce { + ethers::contract::ContractError::MiddlewareError(me) => { + match me { + ethers::middleware::signer::SignerMiddlewareError::MiddlewareError(sme) => { + match sme { + ethers::providers::ProviderError::JsonRpcClientError(jrpce) => { + if jrpce.is::() { + let httpe = *jrpce.downcast::().unwrap(); + match httpe { + ethers::providers::HttpClientError::JsonRpcError(jre) => { + if jre.code == 3 && jre.data.is_some() { + let data = jre.data.unwrap(); + if data.is_string() { + let data_bytes = hex_str_to_bytes(data.as_str().unwrap()); + if data_bytes.is_ok() { + decode_gravity_error(data_bytes.unwrap()) + } else { + None + } + } else { + None + } + } else { + None + } + } + _ => None + } + } else { + None + } + } + _ => None + } + } + _ => None + } + } + _ => None + } + } + _ => None + } +} diff --git a/orchestrator/gravity_abi/src/lib.rs b/orchestrator/gravity_abi/src/lib.rs index dce4f7034..8cbc06205 100644 --- a/orchestrator/gravity_abi/src/lib.rs +++ b/orchestrator/gravity_abi/src/lib.rs @@ -1,2 +1,2 @@ pub mod erc20; -pub mod gravity; +pub mod gravity; \ No newline at end of file diff --git a/orchestrator/gravity_utils/Cargo.toml b/orchestrator/gravity_utils/Cargo.toml index 6e91c4a37..2dfe65978 100644 --- a/orchestrator/gravity_utils/Cargo.toml +++ b/orchestrator/gravity_utils/Cargo.toml @@ -14,6 +14,7 @@ deep_space = { git = "https://github.com/iqlusioninc/deep_space/", branch = "mas ethers = { git = "https://github.com/iqlusioninc/ethers-rs.git", branch = "zaki/error_abi_support", features = ["abigen"] } web30 = "0.15" clarity = "0.4.11" +lazy_static = "1.4.0" num256 = "0.3" serde_derive = "1.0" serde_json = "1.0.69" diff --git a/orchestrator/gravity_utils/src/types/gravity_contract_errors.rs b/orchestrator/gravity_utils/src/types/gravity_contract_errors.rs new file mode 100644 index 000000000..2a6d76175 --- /dev/null +++ b/orchestrator/gravity_utils/src/types/gravity_contract_errors.rs @@ -0,0 +1,268 @@ +use std::convert::TryInto; +use ethers::prelude::*; +use ethers::utils::keccak256; +use lazy_static::lazy_static; + +fn err_to_selector(error: &str) -> [u8; 4] { + keccak256(error)[0..4].try_into().unwrap() +} + +// ethers abigen doesn't create functions for errors, so we're defining the selectors +// here by calculating the first hash bytes rather than computing them by hand in advance +lazy_static! { + static ref INVALID_SIGNATURE: [u8; 4] = err_to_selector("InvalidSignature()"); + static ref INVALID_VALSET_NONCE: [u8; 4] = err_to_selector("InvalidValsetNonce(uint256,uint256)"); + static ref INVALID_BATCH_NONCE: [u8; 4] = err_to_selector("InvalidBatchNonce(uint256,uint256)"); + static ref INVALID_LOGIC_CALL_NONCE: [u8; 4] = err_to_selector("InvalidLogicCallNonce(uint256,uint256)"); + static ref INVALID_LOGIC_CALL_TRANSFERS: [u8; 4] = err_to_selector("InvalidLogicCallTransfers()"); + static ref INVALID_LOGIC_CALL_FEES: [u8; 4] = err_to_selector("InvalidLogicCallFees()"); + static ref INVALID_SEND_TO_COSMOS: [u8; 4] = err_to_selector("InvalidSendToCosmos()"); + static ref INCORRECT_CHECKPOINT: [u8; 4] = err_to_selector("IncorrectCheckpoint()"); + static ref MALFORMED_NEW_VALIDATOR_SET: [u8; 4] = err_to_selector("MalformedNewValidatorSet()"); + static ref MALFORMED_CURRENT_VALIDATOR_SET: [u8; 4] = err_to_selector("MalformedCurrentValidatorSet()"); + static ref MALFORMED_BATCH: [u8; 4] = err_to_selector("MalformedBatch()"); + static ref INSUFFICIENT_POWER: [u8; 4] = err_to_selector("InsufficientPower(uint256,uint256)"); + static ref BATCH_TIMED_OUT: [u8; 4] = err_to_selector("BatchTimedOut()"); + static ref LOGIC_CALL_TIMED_OUT: [u8; 4] = err_to_selector("LogicCallTimedOut()"); +} + +pub enum GravityContractError { + InvalidSignature(InvalidSignature), + InvalidValsetNonce(InvalidValsetNonce), + InvalidBatchNonce(InvalidBatchNonce), + InvalidLogicCallNonce(InvalidLogicCallNonce), + InvalidLogicCallTransfers(InvalidLogicCallTransfers), + InvalidLogicCallFees(InvalidLogicCallFees), + InvalidSendToCosmos(InvalidSendToCosmos), + IncorrectCheckpoint(IncorrectCheckpoint), + MalformedNewValidatorSet(MalformedNewValidatorSet), + MalformedCurrentValidatorSet(MalformedCurrentValidatorSet), + MalformedBatch(MalformedBatch), + InsufficientPower(InsufficientPower), + BatchTimedOut(BatchTimedOut), + LogicCallTimedOut(LogicCallTimedOut), +} + +pub fn decode_gravity_error(data: Vec) -> Option { + if data.len() < 4 { + return None; + } + + // TODO(bolten): trying to do this as a match arm was so incredibly unwieldy that + // I gave up + let selector: [u8; 4] = data[0..4].try_into().unwrap(); + + if selector == INVALID_SIGNATURE.as_slice() { + return Some(GravityContractError::InvalidSignature(InvalidSignature{})) + } + + if selector == INVALID_VALSET_NONCE.as_slice() { + if data.len() != 68 { + return None + } + + return Some(GravityContractError::InvalidValsetNonce(InvalidValsetNonce{ + new_nonce: data[4..36].into(), + current_nonce: data[36..].into(), + })) + } + + if selector == INVALID_BATCH_NONCE.as_slice() { + if data.len() != 68 { + return None + } + + return Some(GravityContractError::InvalidBatchNonce(InvalidBatchNonce{ + new_nonce: data[4..36].into(), + current_nonce: data[36..].into(), + })) + } + + if selector == INVALID_LOGIC_CALL_NONCE.as_slice() { + if data.len() != 68 { + return None + } + + return Some(GravityContractError::InvalidLogicCallNonce(InvalidLogicCallNonce{ + new_nonce: data[4..36].into(), + current_nonce: data[36..].into(), + })) + } + + if selector == INVALID_LOGIC_CALL_TRANSFERS.as_slice() { + return Some(GravityContractError::InvalidLogicCallTransfers(InvalidLogicCallTransfers{})) + } + + if selector == INVALID_LOGIC_CALL_FEES.as_slice() { + return Some(GravityContractError::InvalidLogicCallFees(InvalidLogicCallFees{})) + } + + if selector == INVALID_SEND_TO_COSMOS.as_slice() { + return Some(GravityContractError::InvalidSendToCosmos(InvalidSendToCosmos{})) + } + + if selector == INCORRECT_CHECKPOINT.as_slice() { + return Some(GravityContractError::InvalidLogicCallTransfers(InvalidLogicCallTransfers{})) + } + + if selector == MALFORMED_NEW_VALIDATOR_SET.as_slice() { + return Some(GravityContractError::MalformedNewValidatorSet(MalformedNewValidatorSet{})) + } + + if selector == MALFORMED_CURRENT_VALIDATOR_SET.as_slice() { + return Some(GravityContractError::MalformedCurrentValidatorSet(MalformedCurrentValidatorSet{})) + } + + if selector == MALFORMED_BATCH.as_slice() { + return Some(GravityContractError::MalformedBatch(MalformedBatch{})) + } + + if selector == INSUFFICIENT_POWER.as_slice() { + if data.len() != 68 { + return None + } + + return Some(GravityContractError::InsufficientPower(InsufficientPower{ + cumulative_power: data[4..36].into(), + power_threshold: data[36..].into(), + })) + } + + if selector == BATCH_TIMED_OUT.as_slice() { + return Some(GravityContractError::BatchTimedOut(BatchTimedOut{})) + } + + if selector == LOGIC_CALL_TIMED_OUT.as_slice() { + return Some(GravityContractError::LogicCallTimedOut(LogicCallTimedOut{})) + } + + None +} + +pub struct InvalidSignature {} + +impl InvalidSignature { + pub fn message(&self) -> String { + "Invalid signature".to_string() + } +} + +pub struct InvalidValsetNonce { + new_nonce: U256, + current_nonce: U256, +} + +impl InvalidValsetNonce { + pub fn message(&self) -> String { + format!("Invalid valset nonce, new nonce {}, current nonce {}", + self.new_nonce, self.current_nonce) + } +} + +pub struct InvalidBatchNonce { + new_nonce: U256, + current_nonce: U256, +} + +impl InvalidBatchNonce { + pub fn message(&self) -> String { + format!("Invalid batch nonce, new nonce {}, current nonce {}", + self.new_nonce, self.current_nonce) + } +} + +pub struct InvalidLogicCallNonce { + new_nonce: U256, + current_nonce: U256, +} + +impl InvalidLogicCallNonce { + pub fn message(&self) -> String { + format!("Invalid logic call nonce, new nonce {}, current nonce {}", + self.new_nonce, self.current_nonce) + } +} + +pub struct InvalidLogicCallTransfers {} + +impl InvalidLogicCallTransfers { + pub fn message(&self) -> String { + "Invalid logic call transfers".to_string() + } +} + +pub struct InvalidLogicCallFees {} + +impl InvalidLogicCallFees { + pub fn message(&self) -> String { + "Invalid logic call fees".to_string() + } +} + +pub struct InvalidSendToCosmos {} + +impl InvalidSendToCosmos { + pub fn message(&self) -> String { + "Invalid send to cosmos".to_string() + } +} + +pub struct IncorrectCheckpoint {} + +impl IncorrectCheckpoint { + pub fn message(&self) -> String { + "Incorrect checkpoint".to_string() + } +} + +pub struct MalformedNewValidatorSet {} + +impl MalformedNewValidatorSet { + pub fn message(&self) -> String { + "Malformed new validator set".to_string() + } +} + +pub struct MalformedCurrentValidatorSet {} + +impl MalformedCurrentValidatorSet { + pub fn message(&self) -> String { + "Malformed current validator set".to_string() + } +} + +pub struct MalformedBatch {} + +impl MalformedBatch { + pub fn message(&self) -> String { + "Malformed batch".to_string() + } +} + +pub struct InsufficientPower { + cumulative_power: U256, + power_threshold: U256, +} + +impl InsufficientPower { + pub fn message(&self) -> String { + format!("Insufficient power, cumulative power {}, power threshold {}", + self.cumulative_power, self.power_threshold) + } +} + +pub struct BatchTimedOut {} + +impl BatchTimedOut { + pub fn message(&self) -> String { + "Batch timed out".to_string() + } +} + +pub struct LogicCallTimedOut {} + +impl LogicCallTimedOut { + pub fn message(&self) -> String { + "Logic call timed out".to_string() + } +} \ No newline at end of file diff --git a/orchestrator/gravity_utils/src/types/mod.rs b/orchestrator/gravity_utils/src/types/mod.rs index 801b88525..729d6ec82 100644 --- a/orchestrator/gravity_utils/src/types/mod.rs +++ b/orchestrator/gravity_utils/src/types/mod.rs @@ -1,5 +1,6 @@ mod batches; mod ethereum_events; +mod gravity_contract_errors; mod logic_call; mod signatures; mod valsets; @@ -11,6 +12,7 @@ use std::result::Result; pub use batches::*; pub use ethereum_events::*; +pub use gravity_contract_errors::*; pub use logic_call::*; pub use signatures::*; pub use valsets::*; diff --git a/orchestrator/relayer/src/logic_call_relaying.rs b/orchestrator/relayer/src/logic_call_relaying.rs index c795a0294..2427d482d 100644 --- a/orchestrator/relayer/src/logic_call_relaying.rs +++ b/orchestrator/relayer/src/logic_call_relaying.rs @@ -2,12 +2,15 @@ use crate::main_loop::LOOP_SPEED; use cosmos_gravity::query::{get_latest_logic_calls, get_logic_call_signatures}; use ethereum_gravity::logic_call::LogicCallSkips; use ethereum_gravity::one_eth_f32; +use ethereum_gravity::utils::{extract_gravity_contract_error, log_contract_error}; use ethereum_gravity::{ logic_call::send_eth_logic_call, types::EthClient, utils::get_logic_call_nonce, }; use ethers::types::Address as EthAddress; use gravity_proto::gravity::query_client::QueryClient as GravityQueryClient; -use gravity_utils::ethereum::{bytes_to_hex_str, downcast_to_f32}; +use gravity_utils::error::GravityError; +use gravity_utils::ethereum::{bytes_to_hex_str, downcast_to_f32, hex_str_to_bytes}; +use gravity_utils::types::{decode_gravity_error, GravityContractError}; use gravity_utils::types::{LogicCallConfirmResponse, Valset}; use gravity_utils::{message_signatures::encode_logic_call_confirm_hashed, types::LogicCall}; use std::time::Duration; @@ -111,7 +114,8 @@ pub async fn relay_logic_calls( .await; if cost.is_err() { - error!("LogicCall cost estimate failed with {:?}", cost); + warn!("LogicCall cost estimate failed"); + log_contract_error(cost.unwrap_err()); logic_call_skips.skip(&oldest_signed_call); return; } @@ -153,7 +157,8 @@ pub async fn relay_logic_calls( .await; if res.is_err() { - info!("LogicCall submission failed with {:?}", res); + warn!("LogicCall submission failed"); + log_contract_error(res.unwrap_err()); logic_call_skips.skip(&oldest_signed_call); } } From ca6e9d3e1b6b3084f13779bd71f0d426856dff78 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Wed, 27 Apr 2022 14:45:38 -0700 Subject: [PATCH 05/20] Some debug log lines --- orchestrator/ethereum_gravity/src/utils.rs | 6 ++++++ .../gravity_utils/src/types/gravity_contract_errors.rs | 2 ++ 2 files changed, 8 insertions(+) diff --git a/orchestrator/ethereum_gravity/src/utils.rs b/orchestrator/ethereum_gravity/src/utils.rs index ced710193..77c7ca530 100644 --- a/orchestrator/ethereum_gravity/src/utils.rs +++ b/orchestrator/ethereum_gravity/src/utils.rs @@ -211,16 +211,22 @@ pub fn log_contract_error(gravity_error: GravityError) { pub fn extract_gravity_contract_error(gravity_error: GravityError) -> Option { match gravity_error { GravityError::EthersContractError(ce) => { + info!("Ethers contract error"); match ce { ethers::contract::ContractError::MiddlewareError(me) => { + info!("Contract middleware error"); match me { ethers::middleware::signer::SignerMiddlewareError::MiddlewareError(sme) => { + info!("Signer middleware error"); match sme { ethers::providers::ProviderError::JsonRpcClientError(jrpce) => { + info!("JSON RPC client error"); if jrpce.is::() { let httpe = *jrpce.downcast::().unwrap(); + info!("RPC error confirmed HTTP client error"); match httpe { ethers::providers::HttpClientError::JsonRpcError(jre) => { + info!("JSON RPC error found: {:?}", jre); if jre.code == 3 && jre.data.is_some() { let data = jre.data.unwrap(); if data.is_string() { diff --git a/orchestrator/gravity_utils/src/types/gravity_contract_errors.rs b/orchestrator/gravity_utils/src/types/gravity_contract_errors.rs index 2a6d76175..1c260b2f4 100644 --- a/orchestrator/gravity_utils/src/types/gravity_contract_errors.rs +++ b/orchestrator/gravity_utils/src/types/gravity_contract_errors.rs @@ -136,6 +136,8 @@ pub fn decode_gravity_error(data: Vec) -> Option { return Some(GravityContractError::LogicCallTimedOut(LogicCallTimedOut{})) } + info!("Did not find gravity error"); + None } From 0df64664c9c8db0d277bc7d8f70439ab5dcf6dec Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Wed, 27 Apr 2022 18:07:43 -0700 Subject: [PATCH 06/20] Add permanent skips, delete debug messages --- .../ethereum_gravity/src/logic_call.rs | 62 ++++++++++++++++--- orchestrator/ethereum_gravity/src/utils.rs | 22 ++++--- .../relayer/src/logic_call_relaying.rs | 29 ++++++--- 3 files changed, 87 insertions(+), 26 deletions(-) diff --git a/orchestrator/ethereum_gravity/src/logic_call.rs b/orchestrator/ethereum_gravity/src/logic_call.rs index f27bb085a..49281274e 100644 --- a/orchestrator/ethereum_gravity/src/logic_call.rs +++ b/orchestrator/ethereum_gravity/src/logic_call.rs @@ -207,6 +207,7 @@ pub struct LogicCallSkipState { logic_call: LogicCall, starting_skip_counter: u32, skips_left: u32, + permanently_skipped: bool, } impl LogicCallSkips { @@ -228,11 +229,32 @@ impl LogicCallSkips { 0 } + pub fn permanently_skipped(&self, call: &LogicCall) -> bool { + let id_skips = self.skip_map.get(&call.invalidation_id); + if id_skips.is_some() { + let skip_state = id_skips.unwrap().get(&call.invalidation_nonce); + if skip_state.is_some() { + return skip_state.unwrap().permanently_skipped; + } + } + + false + } + pub fn skip(&mut self, call: &LogicCall) { + self.skip_internal(call, false) + } + + pub fn skip_permanently(&mut self, call: &LogicCall) { + self.skip_internal(call, true) + } + + fn skip_internal(&mut self, call: &LogicCall, permanently_skip: bool) { let new_skip_state = LogicCallSkipState { logic_call: call.clone(), starting_skip_counter: 2, // start by waiting 2 loop iterations skips_left: 2, + permanently_skipped: permanently_skip, }; let id_skips = self.skip_map.get_mut(&call.invalidation_id); @@ -248,13 +270,15 @@ impl LogicCallSkips { id_skips.insert(call.invalidation_nonce.clone(), new_skip_state); } else { let mut skip_state = skip_state.unwrap(); - if skip_state.skips_left == 0 { - // exponential backoff: double the number of skips and reset the skip counter - skip_state.starting_skip_counter *= 2; - skip_state.skips_left = skip_state.starting_skip_counter; - } else { - // decrement the existing skip counter - skip_state.skips_left -= 1; + if !skip_state.permanently_skipped { + if skip_state.skips_left == 0 { + // exponential backoff: double the number of skips and reset the skip counter + skip_state.starting_skip_counter *= 2; + skip_state.skips_left = skip_state.starting_skip_counter; + } else { + // decrement the existing skip counter + skip_state.skips_left -= 1; + } } } } @@ -310,11 +334,34 @@ fn test_logic_call_skips() { invalidation_nonce: 1, }; + let logic_call_3 = LogicCall { + transfers: Vec::new(), + fees: Vec::new(), + logic_contract_address: EthAddress::default(), + payload: Vec::new(), + timeout: 1000, + invalidation_id: vec![6, 7, 8], + invalidation_nonce: 1, + }; + let mut skips = LogicCallSkips::new(); assert_eq!(skips.skips_left(&logic_call_1_nonce_1), 0); assert_eq!(skips.skips_left(&logic_call_1_nonce_2), 0); assert_eq!(skips.skips_left(&logic_call_2), 0); + assert_eq!(skips.skips_left(&logic_call_3), 0); + + assert_eq!(skips.permanently_skipped(&logic_call_1_nonce_1), false); + assert_eq!(skips.permanently_skipped(&logic_call_1_nonce_2), false); + assert_eq!(skips.permanently_skipped(&logic_call_2), false); + assert_eq!(skips.permanently_skipped(&logic_call_3), false); + + skips.skip_permanently(&logic_call_3); + + assert_eq!(skips.permanently_skipped(&logic_call_1_nonce_1), false); + assert_eq!(skips.permanently_skipped(&logic_call_1_nonce_2), false); + assert_eq!(skips.permanently_skipped(&logic_call_2), false); + assert_eq!(skips.permanently_skipped(&logic_call_3), true); // both will start with 2 skips skips.skip(&logic_call_1_nonce_1); @@ -387,5 +434,4 @@ fn test_logic_call_skips() { assert_eq!(skips.skips_left(&logic_call_1_nonce_1), 0); assert_eq!(skips.skips_left(&logic_call_1_nonce_2), 0); assert_eq!(skips.skips_left(&logic_call_2), 0); - } diff --git a/orchestrator/ethereum_gravity/src/utils.rs b/orchestrator/ethereum_gravity/src/utils.rs index 77c7ca530..2b038625e 100644 --- a/orchestrator/ethereum_gravity/src/utils.rs +++ b/orchestrator/ethereum_gravity/src/utils.rs @@ -190,20 +190,28 @@ impl GasCost { } } -pub fn log_contract_error(gravity_error: GravityError) { +pub fn handle_contract_error(gravity_error: GravityError) -> bool { let error_string = format!("LogicCall error: {:?}", gravity_error); let gravity_contract_error = extract_gravity_contract_error(gravity_error); if gravity_contract_error.is_some() { match gravity_contract_error.unwrap() { GravityContractError::InvalidLogicCallNonce(nonce_error) => { - info!("LogicCall already processed, skipping until observed on chain: {}", nonce_error.message()) + info!("LogicCall already processed, skipping until observed on chain: {}", nonce_error.message()); + return true; } - _ => { error!("{}", error_string) } + GravityContractError::LogicCallTimedOut(timeout_error) => { + info!("LogicCall is timed out, will be skipped until timeout on chain: {}", timeout_error.message()); + return true; + } + // TODO(bolten): implement other cases if necessary + _ => { error!("Unspecified gravity contract error: {}", error_string) } } } else { - error!("{}", error_string); + error!("Non-gravity contract error: {}", error_string); } + + false } // ethers is providing an extremely nested set of enums as an error type and decomposing it @@ -211,22 +219,16 @@ pub fn log_contract_error(gravity_error: GravityError) { pub fn extract_gravity_contract_error(gravity_error: GravityError) -> Option { match gravity_error { GravityError::EthersContractError(ce) => { - info!("Ethers contract error"); match ce { ethers::contract::ContractError::MiddlewareError(me) => { - info!("Contract middleware error"); match me { ethers::middleware::signer::SignerMiddlewareError::MiddlewareError(sme) => { - info!("Signer middleware error"); match sme { ethers::providers::ProviderError::JsonRpcClientError(jrpce) => { - info!("JSON RPC client error"); if jrpce.is::() { let httpe = *jrpce.downcast::().unwrap(); - info!("RPC error confirmed HTTP client error"); match httpe { ethers::providers::HttpClientError::JsonRpcError(jre) => { - info!("JSON RPC error found: {:?}", jre); if jre.code == 3 && jre.data.is_some() { let data = jre.data.unwrap(); if data.is_string() { diff --git a/orchestrator/relayer/src/logic_call_relaying.rs b/orchestrator/relayer/src/logic_call_relaying.rs index 2427d482d..89d52d0fa 100644 --- a/orchestrator/relayer/src/logic_call_relaying.rs +++ b/orchestrator/relayer/src/logic_call_relaying.rs @@ -2,15 +2,13 @@ use crate::main_loop::LOOP_SPEED; use cosmos_gravity::query::{get_latest_logic_calls, get_logic_call_signatures}; use ethereum_gravity::logic_call::LogicCallSkips; use ethereum_gravity::one_eth_f32; -use ethereum_gravity::utils::{extract_gravity_contract_error, log_contract_error}; +use ethereum_gravity::utils::handle_contract_error; use ethereum_gravity::{ logic_call::send_eth_logic_call, types::EthClient, utils::get_logic_call_nonce, }; use ethers::types::Address as EthAddress; use gravity_proto::gravity::query_client::QueryClient as GravityQueryClient; -use gravity_utils::error::GravityError; -use gravity_utils::ethereum::{bytes_to_hex_str, downcast_to_f32, hex_str_to_bytes}; -use gravity_utils::types::{decode_gravity_error, GravityContractError}; +use gravity_utils::ethereum::{bytes_to_hex_str, downcast_to_f32}; use gravity_utils::types::{LogicCallConfirmResponse, Valset}; use gravity_utils::{message_signatures::encode_logic_call_confirm_hashed, types::LogicCall}; use std::time::Duration; @@ -41,6 +39,13 @@ pub async fn relay_logic_calls( let mut oldest_signed_call: Option = None; let mut oldest_signatures: Option> = None; for call in latest_calls { + if logic_call_skips.permanently_skipped(&call) { + info!("LogicCall {}/{} permanently skipped, on-chain timeout after eth height {}", + bytes_to_hex_str(&call.invalidation_id), call.invalidation_nonce, call.timeout + ); + continue; + } + let skips_left: u64 = logic_call_skips.skips_left(&call).into(); if skips_left > 0 { warn!( @@ -115,8 +120,12 @@ pub async fn relay_logic_calls( if cost.is_err() { warn!("LogicCall cost estimate failed"); - log_contract_error(cost.unwrap_err()); - logic_call_skips.skip(&oldest_signed_call); + let should_permanently_skip = handle_contract_error(cost.unwrap_err()); + if should_permanently_skip { + logic_call_skips.skip_permanently(&oldest_signed_call); + } else { + logic_call_skips.skip(&oldest_signed_call); + } return; } @@ -158,8 +167,12 @@ pub async fn relay_logic_calls( if res.is_err() { warn!("LogicCall submission failed"); - log_contract_error(res.unwrap_err()); - logic_call_skips.skip(&oldest_signed_call); + let should_permanently_skip = handle_contract_error(res.unwrap_err()); + if should_permanently_skip { + logic_call_skips.skip_permanently(&oldest_signed_call); + } else { + logic_call_skips.skip(&oldest_signed_call); + } } } } From 25d228e1b9b238525f1071e320ed46a26da622c1 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Wed, 27 Apr 2022 18:29:17 -0700 Subject: [PATCH 07/20] Add MsgEthereumHeightVote --- module/proto/gravity/v1/msgs.proto | 13 + module/x/gravity/types/msgs.pb.go | 523 ++++++++++++++++++++++++----- 2 files changed, 449 insertions(+), 87 deletions(-) diff --git a/module/proto/gravity/v1/msgs.proto b/module/proto/gravity/v1/msgs.proto index 3388f7d4b..ebe56c3a3 100644 --- a/module/proto/gravity/v1/msgs.proto +++ b/module/proto/gravity/v1/msgs.proto @@ -33,6 +33,10 @@ service Msg { rpc SetDelegateKeys(MsgDelegateKeys) returns (MsgDelegateKeysResponse) { // option (google.api.http).post = "/gravity/v1/delegate_keys"; } + rpc SubmitEthereumHeightVote(MsgEthereumHeightVote) + returns (MsgEthereumHeightVoteResponse) { + // option (google.api.http).post = "/gravity/v1/ethereum_height_vote"; + } } // MsgSendToEthereum submits a SendToEthereum attempt to bridge an asset over to @@ -138,6 +142,15 @@ message DelegateKeysSignMsg { uint64 nonce = 2; } +// Periodic update of latest observed Ethereum and Cosmos heights from the +// orchestrator +message MsgEthereumHeightVote { + uint64 ethereum_height = 1; + uint64 cosmos_height = 2; +} + +message MsgEthereumHeightVoteResponse {} + //////////// // Events // //////////// diff --git a/module/x/gravity/types/msgs.pb.go b/module/x/gravity/types/msgs.pb.go index 5c002eba9..fe75dd085 100644 --- a/module/x/gravity/types/msgs.pb.go +++ b/module/x/gravity/types/msgs.pb.go @@ -850,6 +850,96 @@ func (m *DelegateKeysSignMsg) GetNonce() uint64 { return 0 } +// Periodic update of latest observed Ethereum and Cosmos heights from the +// orchestrator +type MsgEthereumHeightVote struct { + EthereumHeight uint64 `protobuf:"varint,1,opt,name=ethereum_height,json=ethereumHeight,proto3" json:"ethereum_height,omitempty"` + CosmosHeight uint64 `protobuf:"varint,2,opt,name=cosmos_height,json=cosmosHeight,proto3" json:"cosmos_height,omitempty"` +} + +func (m *MsgEthereumHeightVote) Reset() { *m = MsgEthereumHeightVote{} } +func (m *MsgEthereumHeightVote) String() string { return proto.CompactTextString(m) } +func (*MsgEthereumHeightVote) ProtoMessage() {} +func (*MsgEthereumHeightVote) Descriptor() ([]byte, []int) { + return fileDescriptor_2f8523f2f6feb451, []int{16} +} +func (m *MsgEthereumHeightVote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEthereumHeightVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEthereumHeightVote.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgEthereumHeightVote) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEthereumHeightVote.Merge(m, src) +} +func (m *MsgEthereumHeightVote) XXX_Size() int { + return m.Size() +} +func (m *MsgEthereumHeightVote) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEthereumHeightVote.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEthereumHeightVote proto.InternalMessageInfo + +func (m *MsgEthereumHeightVote) GetEthereumHeight() uint64 { + if m != nil { + return m.EthereumHeight + } + return 0 +} + +func (m *MsgEthereumHeightVote) GetCosmosHeight() uint64 { + if m != nil { + return m.CosmosHeight + } + return 0 +} + +type MsgEthereumHeightVoteResponse struct { +} + +func (m *MsgEthereumHeightVoteResponse) Reset() { *m = MsgEthereumHeightVoteResponse{} } +func (m *MsgEthereumHeightVoteResponse) String() string { return proto.CompactTextString(m) } +func (*MsgEthereumHeightVoteResponse) ProtoMessage() {} +func (*MsgEthereumHeightVoteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2f8523f2f6feb451, []int{17} +} +func (m *MsgEthereumHeightVoteResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEthereumHeightVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEthereumHeightVoteResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgEthereumHeightVoteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEthereumHeightVoteResponse.Merge(m, src) +} +func (m *MsgEthereumHeightVoteResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgEthereumHeightVoteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEthereumHeightVoteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEthereumHeightVoteResponse proto.InternalMessageInfo + // SendToCosmosEvent is submitted when the SendToCosmosEvent is emitted by they // gravity contract. ERC20 representation coins are minted to the cosmosreceiver // address. @@ -866,7 +956,7 @@ func (m *SendToCosmosEvent) Reset() { *m = SendToCosmosEvent{} } func (m *SendToCosmosEvent) String() string { return proto.CompactTextString(m) } func (*SendToCosmosEvent) ProtoMessage() {} func (*SendToCosmosEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_2f8523f2f6feb451, []int{16} + return fileDescriptor_2f8523f2f6feb451, []int{18} } func (m *SendToCosmosEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -943,7 +1033,7 @@ func (m *BatchExecutedEvent) Reset() { *m = BatchExecutedEvent{} } func (m *BatchExecutedEvent) String() string { return proto.CompactTextString(m) } func (*BatchExecutedEvent) ProtoMessage() {} func (*BatchExecutedEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_2f8523f2f6feb451, []int{17} + return fileDescriptor_2f8523f2f6feb451, []int{19} } func (m *BatchExecutedEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1013,7 +1103,7 @@ func (m *ContractCallExecutedEvent) Reset() { *m = ContractCallExecutedE func (m *ContractCallExecutedEvent) String() string { return proto.CompactTextString(m) } func (*ContractCallExecutedEvent) ProtoMessage() {} func (*ContractCallExecutedEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_2f8523f2f6feb451, []int{18} + return fileDescriptor_2f8523f2f6feb451, []int{20} } func (m *ContractCallExecutedEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1086,7 +1176,7 @@ func (m *ERC20DeployedEvent) Reset() { *m = ERC20DeployedEvent{} } func (m *ERC20DeployedEvent) String() string { return proto.CompactTextString(m) } func (*ERC20DeployedEvent) ProtoMessage() {} func (*ERC20DeployedEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_2f8523f2f6feb451, []int{19} + return fileDescriptor_2f8523f2f6feb451, []int{21} } func (m *ERC20DeployedEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1177,7 +1267,7 @@ func (m *SignerSetTxExecutedEvent) Reset() { *m = SignerSetTxExecutedEve func (m *SignerSetTxExecutedEvent) String() string { return proto.CompactTextString(m) } func (*SignerSetTxExecutedEvent) ProtoMessage() {} func (*SignerSetTxExecutedEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_2f8523f2f6feb451, []int{20} + return fileDescriptor_2f8523f2f6feb451, []int{22} } func (m *SignerSetTxExecutedEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1251,6 +1341,8 @@ func init() { proto.RegisterType((*MsgDelegateKeys)(nil), "gravity.v1.MsgDelegateKeys") proto.RegisterType((*MsgDelegateKeysResponse)(nil), "gravity.v1.MsgDelegateKeysResponse") proto.RegisterType((*DelegateKeysSignMsg)(nil), "gravity.v1.DelegateKeysSignMsg") + proto.RegisterType((*MsgEthereumHeightVote)(nil), "gravity.v1.MsgEthereumHeightVote") + proto.RegisterType((*MsgEthereumHeightVoteResponse)(nil), "gravity.v1.MsgEthereumHeightVoteResponse") proto.RegisterType((*SendToCosmosEvent)(nil), "gravity.v1.SendToCosmosEvent") proto.RegisterType((*BatchExecutedEvent)(nil), "gravity.v1.BatchExecutedEvent") proto.RegisterType((*ContractCallExecutedEvent)(nil), "gravity.v1.ContractCallExecutedEvent") @@ -1261,88 +1353,91 @@ func init() { func init() { proto.RegisterFile("gravity/v1/msgs.proto", fileDescriptor_2f8523f2f6feb451) } var fileDescriptor_2f8523f2f6feb451 = []byte{ - // 1292 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x16, 0x25, 0xd9, 0x81, 0x47, 0xfe, 0xa5, 0xdd, 0x44, 0x56, 0x12, 0xc9, 0x51, 0x90, 0xc6, - 0x69, 0x20, 0x32, 0x56, 0x02, 0xb4, 0x48, 0xd1, 0x02, 0x96, 0xec, 0x20, 0x45, 0xe1, 0x1c, 0x24, - 0x07, 0x08, 0x7a, 0x11, 0x28, 0x72, 0x42, 0x31, 0x11, 0xb9, 0x2a, 0x77, 0x25, 0x58, 0xd7, 0x9e, - 0x8a, 0x9e, 0xda, 0x43, 0xef, 0x39, 0x04, 0x7d, 0x82, 0xbc, 0x40, 0x6e, 0x69, 0x4e, 0x01, 0x7a, - 0x29, 0x7a, 0x08, 0x8a, 0xf8, 0x52, 0xf4, 0x11, 0x0a, 0x14, 0x28, 0xb8, 0xbb, 0x94, 0x49, 0x8a, - 0xfe, 0x03, 0x7a, 0x32, 0x77, 0xe6, 0xdb, 0xd9, 0x6f, 0x66, 0x3f, 0xcd, 0xac, 0xe1, 0x23, 0xdb, - 0x37, 0x46, 0x0e, 0x1b, 0xeb, 0xa3, 0x2d, 0xdd, 0xa5, 0x36, 0xd5, 0x06, 0x3e, 0x61, 0x44, 0x05, - 0x69, 0xd6, 0x46, 0x5b, 0xa5, 0xb2, 0x49, 0xa8, 0x4b, 0xa8, 0xde, 0x35, 0x28, 0xea, 0xa3, 0xad, - 0x2e, 0x32, 0x63, 0x4b, 0x37, 0x89, 0xe3, 0x09, 0x6c, 0x69, 0x5d, 0xf8, 0x3b, 0x7c, 0xa5, 0x8b, - 0x85, 0x74, 0x15, 0x23, 0xd1, 0xc3, 0x88, 0xc2, 0xb3, 0x66, 0x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xf1, 0xcf, 0x8d, 0xee, 0x12, 0x6b, 0xd8, 0x47, - 0x7d, 0x54, 0xd7, 0x0f, 0x42, 0x97, 0x98, 0x6c, 0xdd, 0x59, 0xfe, 0x28, 0xba, 0xfb, 0x5f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x3a, 0x7b, 0x38, 0x24, 0x99, 0x0e, 0x00, 0x00, + // 1341 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4f, 0x8f, 0xd3, 0x46, + 0x14, 0x8f, 0x93, 0xec, 0xa2, 0x7d, 0xd9, 0xbf, 0xde, 0x05, 0xb2, 0x01, 0x92, 0xc5, 0x88, 0xb2, + 0x14, 0xc5, 0x66, 0x03, 0x52, 0x2b, 0xaa, 0x56, 0xda, 0x64, 0x17, 0x51, 0x55, 0xcb, 0x21, 0x59, + 0x2a, 0xd4, 0x4b, 0xe4, 0x38, 0x0f, 0xc7, 0x10, 0x7b, 0x52, 0xcf, 0x24, 0xda, 0x5c, 0x7b, 0xaa, + 0x7a, 0x6a, 0x0f, 0xbd, 0x73, 0x40, 0xfd, 0x04, 0x7c, 0x01, 0x6e, 0x94, 0x13, 0x52, 0xa5, 0xaa, + 0xea, 0x01, 0x55, 0x70, 0xe9, 0x67, 0xa8, 0x54, 0xa9, 0xf2, 0xcc, 0x38, 0x6b, 0x3b, 0xde, 0x7f, + 0x52, 0x4f, 0xf1, 0xbc, 0xf7, 0x9b, 0xf7, 0x6f, 0x7e, 0x33, 0xef, 0x05, 0xce, 0xdb, 0xbe, 0x39, + 0x72, 0xd8, 0xd8, 0x18, 0x6d, 0x19, 0x2e, 0xb5, 0xa9, 0x3e, 0xf0, 0x09, 0x23, 0x2a, 0x48, 0xb1, + 0x3e, 0xda, 0x2a, 0x95, 0x2d, 0x42, 0x5d, 0x42, 0x8d, 0x8e, 0x49, 0xd1, 0x18, 0x6d, 0x75, 0x90, + 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 0xa5, + 0x16, 0xb2, 0xd8, 0x14, 0x72, 0x29, 0x61, 0x20, 0xaa, 0x2c, 0x5d, 0x3b, 0x46, 0x19, 0xa3, 0x42, + 0x31, 0xee, 0x37, 0xd2, 0xa7, 0xaf, 0x26, 0x4c, 0x4c, 0x43, 0x4a, 0x37, 0x4f, 0x84, 0x1c, 0xfa, + 0xaa, 0x3f, 0x7a, 0xfd, 0xbe, 0xac, 0xbc, 0x7d, 0x5f, 0x56, 0xfe, 0x7a, 0x5f, 0x56, 0x7e, 0xfc, + 0x50, 0xce, 0xbc, 0xfd, 0x50, 0xce, 0xfc, 0xf1, 0xa1, 0x9c, 0xf9, 0xe6, 0xb3, 0xc8, 0x9b, 0x3b, + 0x40, 0xdb, 0x1e, 0x3f, 0x1d, 0x85, 0xff, 0x78, 0xab, 0xe2, 0x0f, 0x9d, 0xe1, 0x92, 0xee, 0xb0, + 0x8f, 0xc6, 0xa8, 0x66, 0x1c, 0x84, 0x2a, 0xd1, 0x45, 0x3b, 0xb3, 0x7c, 0x10, 0xbc, 0xf3, 0x5f, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0xf2, 0xa4, 0xb7, 0x8d, 0x0f, 0x00, 0x00, } func (this *SendToCosmosEvent) Equal(that interface{}) bool { @@ -1403,6 +1498,7 @@ type MsgClient interface { SubmitEthereumTxConfirmation(ctx context.Context, in *MsgSubmitEthereumTxConfirmation, opts ...grpc.CallOption) (*MsgSubmitEthereumTxConfirmationResponse, error) SubmitEthereumEvent(ctx context.Context, in *MsgSubmitEthereumEvent, opts ...grpc.CallOption) (*MsgSubmitEthereumEventResponse, error) SetDelegateKeys(ctx context.Context, in *MsgDelegateKeys, opts ...grpc.CallOption) (*MsgDelegateKeysResponse, error) + SubmitEthereumHeightVote(ctx context.Context, in *MsgEthereumHeightVote, opts ...grpc.CallOption) (*MsgEthereumHeightVoteResponse, error) } type msgClient struct { @@ -1467,6 +1563,15 @@ func (c *msgClient) SetDelegateKeys(ctx context.Context, in *MsgDelegateKeys, op return out, nil } +func (c *msgClient) SubmitEthereumHeightVote(ctx context.Context, in *MsgEthereumHeightVote, opts ...grpc.CallOption) (*MsgEthereumHeightVoteResponse, error) { + out := new(MsgEthereumHeightVoteResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Msg/SubmitEthereumHeightVote", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { SendToEthereum(context.Context, *MsgSendToEthereum) (*MsgSendToEthereumResponse, error) @@ -1475,6 +1580,7 @@ type MsgServer interface { SubmitEthereumTxConfirmation(context.Context, *MsgSubmitEthereumTxConfirmation) (*MsgSubmitEthereumTxConfirmationResponse, error) SubmitEthereumEvent(context.Context, *MsgSubmitEthereumEvent) (*MsgSubmitEthereumEventResponse, error) SetDelegateKeys(context.Context, *MsgDelegateKeys) (*MsgDelegateKeysResponse, error) + SubmitEthereumHeightVote(context.Context, *MsgEthereumHeightVote) (*MsgEthereumHeightVoteResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1499,6 +1605,9 @@ func (*UnimplementedMsgServer) SubmitEthereumEvent(ctx context.Context, req *Msg func (*UnimplementedMsgServer) SetDelegateKeys(ctx context.Context, req *MsgDelegateKeys) (*MsgDelegateKeysResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetDelegateKeys not implemented") } +func (*UnimplementedMsgServer) SubmitEthereumHeightVote(ctx context.Context, req *MsgEthereumHeightVote) (*MsgEthereumHeightVoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitEthereumHeightVote not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1612,6 +1721,24 @@ func _Msg_SetDelegateKeys_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Msg_SubmitEthereumHeightVote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgEthereumHeightVote) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SubmitEthereumHeightVote(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Msg/SubmitEthereumHeightVote", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SubmitEthereumHeightVote(ctx, req.(*MsgEthereumHeightVote)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "gravity.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -1640,6 +1767,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "SetDelegateKeys", Handler: _Msg_SetDelegateKeys_Handler, }, + { + MethodName: "SubmitEthereumHeightVote", + Handler: _Msg_SubmitEthereumHeightVote_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "gravity/v1/msgs.proto", @@ -2227,6 +2358,62 @@ func (m *DelegateKeysSignMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgEthereumHeightVote) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgEthereumHeightVote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEthereumHeightVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CosmosHeight != 0 { + i = encodeVarintMsgs(dAtA, i, uint64(m.CosmosHeight)) + i-- + dAtA[i] = 0x10 + } + if m.EthereumHeight != 0 { + i = encodeVarintMsgs(dAtA, i, uint64(m.EthereumHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgEthereumHeightVoteResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgEthereumHeightVoteResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEthereumHeightVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *SendToCosmosEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2764,6 +2951,30 @@ func (m *DelegateKeysSignMsg) Size() (n int) { return n } +func (m *MsgEthereumHeightVote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EthereumHeight != 0 { + n += 1 + sovMsgs(uint64(m.EthereumHeight)) + } + if m.CosmosHeight != 0 { + n += 1 + sovMsgs(uint64(m.CosmosHeight)) + } + return n +} + +func (m *MsgEthereumHeightVoteResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *SendToCosmosEvent) Size() (n int) { if m == nil { return 0 @@ -4603,6 +4814,144 @@ func (m *DelegateKeysSignMsg) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgEthereumHeightVote) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgEthereumHeightVote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEthereumHeightVote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EthereumHeight", wireType) + } + m.EthereumHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EthereumHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CosmosHeight", wireType) + } + m.CosmosHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CosmosHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMsgs(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsgs + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgEthereumHeightVoteResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgEthereumHeightVoteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEthereumHeightVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsgs(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsgs + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *SendToCosmosEvent) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From d7f6991f0953cd8478281c31ead47d975a1c53c4 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Wed, 27 Apr 2022 20:12:04 -0700 Subject: [PATCH 08/20] Implement periodic ethereum height updates --- module/proto/gravity/v1/msgs.proto | 2 +- module/x/gravity/abci.go | 74 ++++++ module/x/gravity/handler.go | 4 + .../x/gravity/keeper/ethereum_event_vote.go | 7 +- module/x/gravity/keeper/keeper.go | 50 +++++ module/x/gravity/keeper/msg_server.go | 13 ++ module/x/gravity/keeper/msg_server_test.go | 36 +++ module/x/gravity/types/codec.go | 1 + module/x/gravity/types/key.go | 7 + module/x/gravity/types/msgs.go | 43 ++++ module/x/gravity/types/msgs.pb.go | 212 ++++++++++-------- 11 files changed, 349 insertions(+), 100 deletions(-) diff --git a/module/proto/gravity/v1/msgs.proto b/module/proto/gravity/v1/msgs.proto index ebe56c3a3..de482788b 100644 --- a/module/proto/gravity/v1/msgs.proto +++ b/module/proto/gravity/v1/msgs.proto @@ -146,7 +146,7 @@ message DelegateKeysSignMsg { // orchestrator message MsgEthereumHeightVote { uint64 ethereum_height = 1; - uint64 cosmos_height = 2; + string signer = 2; } message MsgEthereumHeightVoteResponse {} diff --git a/module/x/gravity/abci.go b/module/x/gravity/abci.go index 9b4f9f21f..e23f654fa 100644 --- a/module/x/gravity/abci.go +++ b/module/x/gravity/abci.go @@ -28,6 +28,7 @@ func BeginBlocker(ctx sdk.Context, k keeper.Keeper) { func EndBlocker(ctx sdk.Context, k keeper.Keeper) { outgoingTxSlashing(ctx, k) eventVoteRecordTally(ctx, k) + updateObservedEthereumHeight(ctx, k) } func createBatchTxs(ctx sdk.Context, k keeper.Keeper) { @@ -150,6 +151,79 @@ func eventVoteRecordTally(ctx sdk.Context, k keeper.Keeper) { } } +// Periodically, every orchestrator will submit their latest observed Ethereum and Cosmos heights in +// order to keep this information current regardless of the level of bridge activity. +// +// We determine if we should update the latest heights based on the following criteria: +// 1. A consensus of validators agrees that the proposed height is equal to or less than their +// last observed height, in order to reconcile the many different heights that will be submitted. +// The highest height that meets this criteria will be the proposed height. +// 2. The proposed consensus heights from this process are greater than the values stored from the last time +// we observed an Ethereum event from the bridge +func updateObservedEthereumHeight(ctx sdk.Context, k keeper.Keeper) { + if ctx.BlockHeight()%10 != 0 { + return + } + + ethereumHeightPowers := make(map[uint64]sdk.Int) + cosmosHeightPowers := make(map[uint64]sdk.Int) + // we can use the same value as event vote records for this threshold + requiredPower := types.EventVoteRecordPowerThreshold(k.StakingKeeper.GetLastTotalPower(ctx)) + + // populate the list + k.IterateEthereumHeightVotes(ctx, func(valAddres sdk.ValAddress, height types.LatestEthereumBlockHeight) bool { + if _, ok := ethereumHeightPowers[height.EthereumHeight]; !ok { + ethereumHeightPowers[height.EthereumHeight] = sdk.NewInt(0) + } + + if _, ok := cosmosHeightPowers[height.CosmosHeight]; !ok { + cosmosHeightPowers[height.CosmosHeight] = sdk.NewInt(0) + } + + return false + }) + + // vote on acceptable height values (less than or equal to the validator's observed value) + k.IterateEthereumHeightVotes(ctx, func(valAddress sdk.ValAddress, height types.LatestEthereumBlockHeight) bool { + validatorPower := sdk.NewInt(k.StakingKeeper.GetLastValidatorPower(ctx, valAddress)) + + for ethereumVoteHeight, ethereumPower := range ethereumHeightPowers { + if ethereumVoteHeight <= height.EthereumHeight { + ethereumHeightPowers[ethereumVoteHeight] = ethereumPower.Add(validatorPower) + } + } + + for cosmosVoteHeight, cosmosPower := range cosmosHeightPowers { + if cosmosVoteHeight <= height.CosmosHeight { + cosmosHeightPowers[cosmosVoteHeight] = cosmosPower.Add(validatorPower) + } + } + + return false + }) + + // find the highest height submitted that a consensus of validators agreed was acceptable + ethereumHeight := uint64(0) + cosmosHeight := uint64(0) + + for ethereumVoteHeight, ethereumPower := range ethereumHeightPowers { + if ethereumVoteHeight > ethereumHeight && ethereumPower.GTE(requiredPower) { + ethereumHeight = ethereumVoteHeight + } + } + + for cosmosVoteHeight, cosmosPower := range cosmosHeightPowers { + if cosmosVoteHeight > cosmosHeight && cosmosPower.GTE(requiredPower) { + cosmosHeight = cosmosVoteHeight + } + } + + lastObservedHeights := k.GetLastObservedEthereumBlockHeight(ctx) + if ethereumHeight > lastObservedHeights.EthereumHeight && cosmosHeight > lastObservedHeights.CosmosHeight { + k.SetLastObservedEthereumBlockHeightWithCosmos(ctx, ethereumHeight, cosmosHeight) + } +} + // cleanupTimedOutBatchTxs deletes batches that have passed their expiration on Ethereum // keep in mind several things when modifying this function // A) unlike nonces timeouts are not monotonically increasing, meaning batch 5 can have a later timeout than batch 6 diff --git a/module/x/gravity/handler.go b/module/x/gravity/handler.go index b33b7d0d6..11461b7e5 100644 --- a/module/x/gravity/handler.go +++ b/module/x/gravity/handler.go @@ -41,6 +41,10 @@ func NewHandler(k keeper.Keeper) sdk.Handler { res, err := msgServer.SetDelegateKeys(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) + case *types.MsgEthereumHeightVote: + res, err := msgServer.SubmitEthereumHeightVote(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + default: return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized %s message type: %T", types.ModuleName, msg) } diff --git a/module/x/gravity/keeper/ethereum_event_vote.go b/module/x/gravity/keeper/ethereum_event_vote.go index 7b817973a..5c42349a7 100644 --- a/module/x/gravity/keeper/ethereum_event_vote.go +++ b/module/x/gravity/keeper/ethereum_event_vote.go @@ -214,10 +214,15 @@ func (k Keeper) GetLastObservedEthereumBlockHeight(ctx sdk.Context) types.Latest // SetLastObservedEthereumBlockHeight sets the block height in the store. func (k Keeper) SetLastObservedEthereumBlockHeight(ctx sdk.Context, ethereumHeight uint64) { + k.SetLastObservedEthereumBlockHeightWithCosmos(ctx, ethereumHeight, uint64(ctx.BlockHeight())) +} + +// SetLastObservedEthereumBlockHeight sets the block height in the store, specifying the cosmos height +func (k Keeper) SetLastObservedEthereumBlockHeightWithCosmos(ctx sdk.Context, ethereumHeight uint64, cosmosHeight uint64) { store := ctx.KVStore(k.storeKey) height := types.LatestEthereumBlockHeight{ EthereumHeight: ethereumHeight, - CosmosHeight: uint64(ctx.BlockHeight()), + CosmosHeight: cosmosHeight, } store.Set([]byte{types.LastEthereumBlockHeightKey}, k.cdc.MustMarshal(&height)) } diff --git a/module/x/gravity/keeper/keeper.go b/module/x/gravity/keeper/keeper.go index 4755c4838..64dc92156 100644 --- a/module/x/gravity/keeper/keeper.go +++ b/module/x/gravity/keeper/keeper.go @@ -592,6 +592,56 @@ func (k Keeper) CreateContractCallTx(ctx sdk.Context, invalidationNonce uint64, return newContractCallTx } +////////////////////////////////////// +// Observed Ethereum/Cosmos heights // +////////////////////////////////////// + +// GetEthereumHeightVoteRecord gets the latest observed heights per validator +func (k Keeper) GetEthereumHeightVote(ctx sdk.Context, valAddress sdk.ValAddress) types.LatestEthereumBlockHeight { + store := ctx.KVStore(k.storeKey) + key := types.MakeEthereumHeightVoteKey(valAddress) + bytes := store.Get(key) + + if len(bytes) == 0 { + return types.LatestEthereumBlockHeight{ + CosmosHeight: 0, + EthereumHeight: 0, + } + } + + height := types.LatestEthereumBlockHeight{} + k.cdc.MustUnmarshal(bytes, &height) + return height +} + +// SetEthereumHeightVoteRecord sets the latest observed heights per validator +func (k Keeper) SetEthereumHeightVote(ctx sdk.Context, valAddress sdk.ValAddress, ethereumHeight uint64) { + store := ctx.KVStore(k.storeKey) + height := types.LatestEthereumBlockHeight{ + EthereumHeight: ethereumHeight, + CosmosHeight: uint64(ctx.BlockHeight()), + } + key := types.MakeEthereumHeightVoteKey(valAddress) + store.Set(key, k.cdc.MustMarshal(&height)) +} + +func (k Keeper) IterateEthereumHeightVotes(ctx sdk.Context, cb func(val sdk.ValAddress, height types.LatestEthereumBlockHeight) (stop bool)) { + store := ctx.KVStore(k.storeKey) + iter := sdk.KVStorePrefixIterator(store, []byte{types.EthereumHeightVoteKey}) + defer iter.Close() + + for ; iter.Valid(); iter.Next() { + var height types.LatestEthereumBlockHeight + key := bytes.NewBuffer(bytes.TrimPrefix(iter.Key(), []byte{types.EthereumHeightVoteKey})) + val := sdk.ValAddress(key.Next(20)) + + k.cdc.MustUnmarshal(iter.Value(), &height) + if cb(val, height) { + break + } + } +} + ///////////////// // MIGRATE // ///////////////// diff --git a/module/x/gravity/keeper/msg_server.go b/module/x/gravity/keeper/msg_server.go index 07704c49d..149761dc9 100644 --- a/module/x/gravity/keeper/msg_server.go +++ b/module/x/gravity/keeper/msg_server.go @@ -295,6 +295,19 @@ func (k msgServer) CancelSendToEthereum(c context.Context, msg *types.MsgCancelS return &types.MsgCancelSendToEthereumResponse{}, nil } +func (k msgServer) SubmitEthereumHeightVote(c context.Context, msg *types.MsgEthereumHeightVote) (*types.MsgEthereumHeightVoteResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + val, err := k.getSignerValidator(ctx, msg.Signer) + if err != nil { + return nil, err + } + + k.Keeper.SetEthereumHeightVote(ctx, val, msg.EthereumHeight) + + return &types.MsgEthereumHeightVoteResponse{}, nil +} + // getSignerValidator takes an sdk.AccAddress that represents either a validator or orchestrator address and returns // the assoicated validator address func (k Keeper) getSignerValidator(ctx sdk.Context, signerString string) (sdk.ValAddress, error) { diff --git a/module/x/gravity/keeper/msg_server_test.go b/module/x/gravity/keeper/msg_server_test.go index 95095d213..71f75b256 100644 --- a/module/x/gravity/keeper/msg_server_test.go +++ b/module/x/gravity/keeper/msg_server_test.go @@ -425,6 +425,42 @@ func TestMsgServer_SetDelegateKeys(t *testing.T) { require.NoError(t, err) } +func TestMsgServer_SubmitEthereumHeightVote(t *testing.T) { + var ( + env = CreateTestEnv(t) + ctx = env.Context + gk = env.GravityKeeper + + orcAddr1, _ = sdk.AccAddressFromBech32("cosmos1dg55rtevlfxh46w88yjpdd08sqhh5cc3xhkcej") + valAddr1 = sdk.ValAddress(orcAddr1) + + orcAddr2, _ = sdk.AccAddressFromBech32("cosmos164knshrzuuurf05qxf3q5ewpfnwzl4gj4m4dfy") + valAddr2 = sdk.ValAddress(orcAddr2) + + orcAddr3, _ = sdk.AccAddressFromBech32("cosmos193fw83ynn76328pty4yl7473vg9x86alq2cft7") + valAddr3 = sdk.ValAddress(orcAddr3) + ) + + { // setup for getSignerValidator + gk.StakingKeeper = NewStakingKeeperMock(valAddr1, valAddr2, valAddr3) + gk.SetOrchestratorValidatorAddress(ctx, valAddr1, orcAddr1) + gk.SetOrchestratorValidatorAddress(ctx, valAddr2, orcAddr2) + gk.SetOrchestratorValidatorAddress(ctx, valAddr3, orcAddr3) + } + + msgServer := NewMsgServerImpl(gk) + + msg := &types.MsgEthereumHeightVote{ + EthereumHeight: 5, + Signer: orcAddr1.String(), + } + + _, err := msgServer.SubmitEthereumHeightVote(sdk.WrapSDKContext(ctx), msg) + + require.NoError(t, err) + require.Equal(t, gk.GetEthereumHeightVote(ctx, valAddr1).EthereumHeight, uint64(5)) +} + func TestEthVerify(t *testing.T) { // Replace privKeyHexStr and addrHexStr with your own private key and address // HEX values. diff --git a/module/x/gravity/types/codec.go b/module/x/gravity/types/codec.go index a7d88ca61..01a1963ea 100644 --- a/module/x/gravity/types/codec.go +++ b/module/x/gravity/types/codec.go @@ -45,6 +45,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &MsgSubmitEthereumEvent{}, &MsgSubmitEthereumTxConfirmation{}, &MsgDelegateKeys{}, + &MsgEthereumHeightVote{}, ) registry.RegisterInterface( diff --git a/module/x/gravity/types/key.go b/module/x/gravity/types/key.go index 6db74f4e5..5ec349c54 100644 --- a/module/x/gravity/types/key.go +++ b/module/x/gravity/types/key.go @@ -59,6 +59,9 @@ const ( LastUnBondingBlockHeightKey LastObservedSignerSetKey + + // EthereumHeightVoteKey indexes the latest heights observed by each validator + EthereumHeightVoteKey ) //////////////////// @@ -156,3 +159,7 @@ func MakeBatchTxKey(addr common.Address, nonce uint64) []byte { func MakeContractCallTxKey(invalscope []byte, invalnonce uint64) []byte { return bytes.Join([][]byte{{ContractCallTxPrefixByte}, invalscope, sdk.Uint64ToBigEndian(invalnonce)}, []byte{}) } + +func MakeEthereumHeightVoteKey(validator sdk.ValAddress) []byte { + return append([]byte{EthereumHeightVoteKey}, validator.Bytes()...) +} diff --git a/module/x/gravity/types/msgs.go b/module/x/gravity/types/msgs.go index 157b39046..6c07e3714 100644 --- a/module/x/gravity/types/msgs.go +++ b/module/x/gravity/types/msgs.go @@ -16,6 +16,7 @@ var ( _ sdk.Msg = &MsgRequestBatchTx{} _ sdk.Msg = &MsgSubmitEthereumEvent{} _ sdk.Msg = &MsgSubmitEthereumTxConfirmation{} + _ sdk.Msg = &MsgEthereumHeightVote{} _ cdctypes.UnpackInterfacesMessage = &MsgSubmitEthereumEvent{} _ cdctypes.UnpackInterfacesMessage = &MsgSubmitEthereumTxConfirmation{} @@ -287,3 +288,45 @@ func (msg MsgCancelSendToEthereum) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{acc} } + +// NewMsgEthereumHeightVote returns a new MsgEthereumHeightVote +func NewMsgEthereumHeightVote(ethereumHeight uint64, signer sdk.AccAddress) *MsgEthereumHeightVote { + return &MsgEthereumHeightVote{ + EthereumHeight: ethereumHeight, + Signer: signer.String(), + } +} + +// Route should return the name of the module +func (msg MsgEthereumHeightVote) Route() string { return RouterKey } + +// Type should return the action +func (msg MsgEthereumHeightVote) Type() string { return "ethereum_height_vote" } + +// ValidateBasic performs stateless checks +func (msg MsgEthereumHeightVote) ValidateBasic() error { + if msg.EthereumHeight == 0 { + return sdkerrors.Wrap(ErrInvalid, "ethereum height cannot be 0") + } + + if _, err := sdk.AccAddressFromBech32(msg.Signer); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer) + } + + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgEthereumHeightVote) GetSignBytes() []byte { + panic(fmt.Errorf("deprecated")) +} + +// GetSigners defines whose signature is required +func (msg MsgEthereumHeightVote) GetSigners() []sdk.AccAddress { + acc, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{acc} +} diff --git a/module/x/gravity/types/msgs.pb.go b/module/x/gravity/types/msgs.pb.go index fe75dd085..1ab00596e 100644 --- a/module/x/gravity/types/msgs.pb.go +++ b/module/x/gravity/types/msgs.pb.go @@ -854,7 +854,7 @@ func (m *DelegateKeysSignMsg) GetNonce() uint64 { // orchestrator type MsgEthereumHeightVote struct { EthereumHeight uint64 `protobuf:"varint,1,opt,name=ethereum_height,json=ethereumHeight,proto3" json:"ethereum_height,omitempty"` - CosmosHeight uint64 `protobuf:"varint,2,opt,name=cosmos_height,json=cosmosHeight,proto3" json:"cosmos_height,omitempty"` + Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgEthereumHeightVote) Reset() { *m = MsgEthereumHeightVote{} } @@ -897,11 +897,11 @@ func (m *MsgEthereumHeightVote) GetEthereumHeight() uint64 { return 0 } -func (m *MsgEthereumHeightVote) GetCosmosHeight() uint64 { +func (m *MsgEthereumHeightVote) GetSigner() string { if m != nil { - return m.CosmosHeight + return m.Signer } - return 0 + return "" } type MsgEthereumHeightVoteResponse struct { @@ -1353,91 +1353,91 @@ func init() { func init() { proto.RegisterFile("gravity/v1/msgs.proto", fileDescriptor_2f8523f2f6feb451) } var fileDescriptor_2f8523f2f6feb451 = []byte{ - // 1341 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4f, 0x8f, 0xd3, 0x46, - 0x14, 0x8f, 0x93, 0xec, 0xa2, 0x7d, 0xd9, 0xbf, 0xde, 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, 0x9b, 0x3b, - 0x40, 0xdb, 0x1e, 0x3f, 0x1d, 0x85, 0xff, 0x78, 0xab, 0xe2, 0x0f, 0x9d, 0xe1, 0x92, 0xee, 0xb0, - 0x8f, 0xc6, 0xa8, 0x66, 0x1c, 0x84, 0x2a, 0xd1, 0x45, 0x3b, 0xb3, 0x7c, 0x10, 0xbc, 0xf3, 0x5f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0xf2, 0xa4, 0xb7, 0x8d, 0x0f, 0x00, 0x00, + // 1335 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4d, 0x6f, 0xdb, 0x46, + 0x13, 0x16, 0x25, 0xd9, 0x81, 0x47, 0xfe, 0xa4, 0x9d, 0x44, 0x56, 0x12, 0xc9, 0x51, 0x90, 0x37, + 0xce, 0x1b, 0x88, 0x8c, 0x95, 0x00, 0xef, 0x8b, 0x14, 0x2d, 0x60, 0xc9, 0x0e, 0x52, 0x14, 0xce, + 0x41, 0x72, 0x0a, 0xa3, 0x17, 0x81, 0x22, 0x27, 0x14, 0x13, 0x91, 0xab, 0x72, 0x57, 0x82, 0x75, + 0xed, 0xa9, 0xe8, 0xa9, 0x3d, 0xf4, 0x9e, 0x43, 0xd0, 0x5f, 0x90, 0x3f, 0x90, 0x5b, 0x9a, 0x53, + 0x80, 0x02, 0x45, 0xd1, 0x43, 0x50, 0x24, 0x97, 0xfe, 0x86, 0x02, 0x05, 0x0a, 0xee, 0x2e, 0x65, + 0x92, 0xa2, 0xbf, 0x80, 0x9e, 0xc4, 0x9d, 0x79, 0x76, 0xbe, 0xf6, 0xd9, 0x9d, 0x11, 0x5c, 0xb4, + 0x7d, 0x63, 0xe4, 0xb0, 0xb1, 0x3e, 0xda, 0xd2, 0x5d, 0x6a, 0x53, 0x6d, 0xe0, 0x13, 0x46, 0x54, + 0x90, 0x62, 0x6d, 0xb4, 0x55, 0x2a, 0x9b, 0x84, 0xba, 0x84, 0xea, 0x5d, 0x83, 0xa2, 0x3e, 0xda, + 0xea, 0x22, 0x33, 0xb6, 0x74, 0x93, 0x38, 0x9e, 0xc0, 0x96, 0xd6, 0x85, 0xbe, 0xc3, 0x57, 0xba, + 0x58, 0x48, 0x55, 0x31, 0x62, 0x3d, 0xb4, 0x28, 0x34, 0x6b, 0x36, 0xb1, 0x89, 0xd8, 0x11, 0x7c, + 0x49, 0xe9, 0x55, 0x9b, 0x10, 0xbb, 0x8f, 0xba, 0x31, 0x70, 0x74, 0xc3, 0xf3, 0x08, 0x33, 0x98, + 0x43, 0xbc, 0xd0, 0xda, 0xba, 0xd4, 0xf2, 0x55, 0x77, 0xf8, 0x54, 0x37, 0x3c, 0x69, 0xae, 0xfa, + 0x8b, 0x02, 0x2b, 0x7b, 0xd4, 0x6e, 0xa3, 0x67, 0xed, 0x93, 0x5d, 0xd6, 0x43, 0x1f, 0x87, 0xae, + 0x7a, 0x09, 0x66, 0x29, 0x7a, 0x16, 0xfa, 0x45, 0x65, 0x43, 0xd9, 0x9c, 0x6b, 0xc9, 0x95, 0x5a, + 0x03, 0x15, 0x25, 0xa6, 0xe3, 0xa3, 0xe9, 0x0c, 0x1c, 0xf4, 0x58, 0x31, 0xcb, 0x31, 0x2b, 0xa1, + 0xa6, 0x15, 0x2a, 0xd4, 0xff, 0xc1, 0xac, 0xe1, 0x92, 0xa1, 0xc7, 0x8a, 0xb9, 0x0d, 0x65, 0xb3, + 0x50, 0x5f, 0xd7, 0x64, 0x92, 0x41, 0x45, 0x34, 0x59, 0x11, 0xad, 0x49, 0x1c, 0xaf, 0x91, 0x7f, + 0xf3, 0xbe, 0x92, 0x69, 0x49, 0xb8, 0xfa, 0x19, 0x40, 0xd7, 0x77, 0x2c, 0x1b, 0x3b, 0x4f, 0x11, + 0x8b, 0xf9, 0xb3, 0x6d, 0x9e, 0x13, 0x5b, 0x1e, 0x22, 0x56, 0xef, 0xc0, 0xfa, 0x54,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, 0xa8, 0xe9, 0xd8, 0xed, 0x92, 0xbe, 0xa4, 0x67, + 0x81, 0xcb, 0xda, 0x5c, 0x14, 0x38, 0x12, 0x10, 0x0b, 0x4d, 0xc7, 0x35, 0xfa, 0x54, 0x52, 0x73, + 0x81, 0x4b, 0x77, 0xa4, 0x30, 0xad, 0x26, 0x17, 0x52, 0x6b, 0xf2, 0xb3, 0x02, 0xc5, 0x48, 0xa3, + 0x3b, 0x27, 0x25, 0x6a, 0xb0, 0x1a, 0x69, 0x85, 0xec, 0x30, 0x46, 0xe2, 0x65, 0x7a, 0x64, 0xf7, + 0x9c, 0x54, 0xbe, 0x0f, 0x17, 0x5c, 0x74, 0xbb, 0xe8, 0xd3, 0x62, 0x7e, 0x23, 0xb7, 0x59, 0xa8, + 0x97, 0xb4, 0xa3, 0x3f, 0x03, 0xda, 0x6e, 0xac, 0x79, 0xb6, 0x42, 0x68, 0xfd, 0xd7, 0x19, 0xc8, + 0x05, 0xaf, 0xee, 0x01, 0x2c, 0x26, 0x86, 0xcf, 0x6b, 0xd1, 0xed, 0x53, 0xe3, 0x6c, 0xe9, 0xe6, + 0x89, 0xea, 0xc9, 0x7b, 0x98, 0x51, 0x9f, 0xc1, 0x5a, 0xea, 0x70, 0x7b, 0x23, 0x61, 0x20, 0x0d, + 0x54, 0xba, 0x73, 0x06, 0x50, 0xc4, 0xd7, 0x01, 0x2c, 0x26, 0x46, 0xdc, 0x64, 0x16, 0x71, 0xf5, + 0x54, 0x16, 0xc7, 0x4c, 0xb7, 0x19, 0xf5, 0x1b, 0x05, 0xae, 0x9e, 0x38, 0xdc, 0x26, 0x23, 0x3d, + 0x09, 0x5c, 0xba, 0x77, 0x0e, 0x70, 0x24, 0x08, 0x1b, 0x56, 0xd3, 0xc6, 0x94, 0xea, 0x89, 0xd6, + 0x38, 0xa6, 0xf4, 0xdf, 0xd3, 0x31, 0x11, 0x47, 0x4f, 0x60, 0xa9, 0x8d, 0x2c, 0x36, 0x78, 0x5c, + 0x49, 0x18, 0x88, 0x2a, 0x4b, 0x37, 0x4e, 0x50, 0xc6, 0xa8, 0x50, 0x8c, 0xfb, 0x8d, 0xb4, 0xe6, + 0xeb, 0x09, 0x13, 0xd3, 0x90, 0xd2, 0xed, 0x53, 0x21, 0x47, 0xbe, 0x1a, 0x4f, 0xde, 0x7c, 0x28, + 0x2b, 0xef, 0x3e, 0x94, 0x95, 0x3f, 0x3e, 0x94, 0x95, 0xef, 0x3f, 0x96, 0x33, 0xef, 0x3e, 0x96, + 0x33, 0xbf, 0x7d, 0x2c, 0x67, 0xbe, 0xfa, 0x24, 0xf2, 0xe6, 0x0e, 0xd0, 0xb6, 0xc7, 0xcf, 0x46, + 0xe1, 0x9f, 0xdc, 0x9a, 0xf8, 0x0f, 0xa7, 0xbb, 0xc4, 0x1a, 0xf6, 0x51, 0x1f, 0xd5, 0xf5, 0xc3, + 0x50, 0x25, 0xba, 0x68, 0x77, 0x96, 0xcf, 0x7e, 0xf7, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x19, + 0x83, 0xff, 0x28, 0x80, 0x0f, 0x00, 0x00, } func (this *SendToCosmosEvent) Equal(that interface{}) bool { @@ -2378,10 +2378,12 @@ func (m *MsgEthereumHeightVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.CosmosHeight != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.CosmosHeight)) + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.Signer))) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } if m.EthereumHeight != 0 { i = encodeVarintMsgs(dAtA, i, uint64(m.EthereumHeight)) @@ -2960,8 +2962,9 @@ func (m *MsgEthereumHeightVote) Size() (n int) { if m.EthereumHeight != 0 { n += 1 + sovMsgs(uint64(m.EthereumHeight)) } - if m.CosmosHeight != 0 { - n += 1 + sovMsgs(uint64(m.CosmosHeight)) + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovMsgs(uint64(l)) } return n } @@ -4863,10 +4866,10 @@ func (m *MsgEthereumHeightVote) Unmarshal(dAtA []byte) error { } } case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CosmosHeight", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - m.CosmosHeight = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMsgs @@ -4876,11 +4879,24 @@ func (m *MsgEthereumHeightVote) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CosmosHeight |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMsgs(dAtA[iNdEx:]) From e810cd65c4cab78c4b8ba44a3de612c095c430b7 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Wed, 27 Apr 2022 20:13:31 -0700 Subject: [PATCH 09/20] Update rust protos for EthereumHeightVote --- .../gravity_proto/src/prost/gravity.v1.rs | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/orchestrator/gravity_proto/src/prost/gravity.v1.rs b/orchestrator/gravity_proto/src/prost/gravity.v1.rs index b8b181b95..bd4f879f6 100644 --- a/orchestrator/gravity_proto/src/prost/gravity.v1.rs +++ b/orchestrator/gravity_proto/src/prost/gravity.v1.rs @@ -264,6 +264,17 @@ pub struct DelegateKeysSignMsg { #[prost(uint64, tag = "2")] pub nonce: u64, } +/// Periodic update of latest observed Ethereum and Cosmos heights from the +/// orchestrator +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgEthereumHeightVote { + #[prost(uint64, tag = "1")] + pub ethereum_height: u64, + #[prost(string, tag = "2")] + pub signer: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgEthereumHeightVoteResponse {} //////////// // Events // //////////// @@ -469,6 +480,21 @@ pub mod msg_client { let path = http::uri::PathAndQuery::from_static("/gravity.v1.Msg/SetDelegateKeys"); self.inner.unary(request.into_request(), path, codec).await } + pub async fn submit_ethereum_height_vote( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/gravity.v1.Msg/SubmitEthereumHeightVote"); + self.inner.unary(request.into_request(), path, codec).await + } } impl Clone for MsgClient { fn clone(&self) -> Self { From ce35ea16600d5bef65b38882593d029fa381b7b0 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Wed, 27 Apr 2022 20:29:53 -0700 Subject: [PATCH 10/20] Add eth height recording to the orchestrator --- orchestrator/cosmos_gravity/src/build.rs | 19 +++++++++++++++++++ orchestrator/orchestrator/src/main_loop.rs | 17 +++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/orchestrator/cosmos_gravity/src/build.rs b/orchestrator/cosmos_gravity/src/build.rs index d898192b3..04502c803 100644 --- a/orchestrator/cosmos_gravity/src/build.rs +++ b/orchestrator/cosmos_gravity/src/build.rs @@ -110,6 +110,25 @@ pub async fn contract_call_tx_confirmation_messages( msgs } +pub async fn ethereum_vote_height_messages( + contact: &Contact, + cosmos_key: CosmosPrivateKey, + ethereum_height: U64, +) -> Vec { + let cosmos_address = cosmos_key.to_address(&contact.get_prefix()).unwrap(); + + let msg = proto::MsgEthereumHeightVote { + ethereum_height: ethereum_height.as_u64(), + signer: cosmos_address.to_string(), + }; + let msg = Msg::new("/gravity.v1.MsgSubmitEthereumHeightVote", msg); + + let mut msgs = Vec::new(); + msgs.push(msg); + + msgs +} + pub fn ethereum_event_messages( contact: &Contact, cosmos_key: CosmosPrivateKey, diff --git a/orchestrator/orchestrator/src/main_loop.rs b/orchestrator/orchestrator/src/main_loop.rs index fc2a5e0da..f1ab3283a 100644 --- a/orchestrator/orchestrator/src/main_loop.rs +++ b/orchestrator/orchestrator/src/main_loop.rs @@ -140,6 +140,7 @@ pub async fn eth_oracle_main_loop( .await; info!("Oracle resync complete, Oracle now operational"); let mut grpc_client = grpc_client; + let mut loop_count = 0; loop { let (async_resp, _) = tokio::join!( @@ -155,6 +156,20 @@ pub async fn eth_oracle_main_loop( latest_eth_block, block_height, ); + + // send latest Ethereum height to the Cosmos chain every 5 loops + if loop_count % 5 == 0 { + let messages = build::ethereum_vote_height_messages( + &contact, + cosmos_key, + latest_eth_block, + ).await; + + msg_sender + .send(messages) + .await + .expect("Could not send Ethereum height votes"); + } } (Ok(_latest_eth_block), Ok(ChainStatus::Syncing)) => { warn!("Cosmos node syncing, Eth oracle paused"); @@ -210,6 +225,8 @@ pub async fn eth_oracle_main_loop( }, delay_for(ETH_ORACLE_LOOP_SPEED) ); + + loop_count += 1; } } From ba093e503bfa3bdd99d6db783ee5dba1501474b8 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Wed, 27 Apr 2022 20:38:34 -0700 Subject: [PATCH 11/20] Add query endpoint for last observed Ethereum height --- module/proto/gravity/v1/query.proto | 12 + module/x/gravity/types/query.pb.go | 561 ++++++++++++++++++++++------ 2 files changed, 462 insertions(+), 111 deletions(-) diff --git a/module/proto/gravity/v1/query.proto b/module/proto/gravity/v1/query.proto index c9b11e657..a51fe090d 100644 --- a/module/proto/gravity/v1/query.proto +++ b/module/proto/gravity/v1/query.proto @@ -148,6 +148,12 @@ service Query { // option (google.api.http).get = // "/gravity/v1/delegate_keys"; } + + rpc LastObservedEthereumHeight(LastObservedEthereumHeightRequest) + returns (LastObservedEthereumHeightResponse) { + // option (google.api.http).get = + // "/gravity/v1/last_observed_ethereum_height" + } } // rpc Params @@ -315,7 +321,13 @@ message UnbatchedSendToEthereumsRequest { string sender_address = 1; cosmos.base.query.v1beta1.PageRequest pagination = 2; } + message UnbatchedSendToEthereumsResponse { repeated SendToEthereum send_to_ethereums = 1; cosmos.base.query.v1beta1.PageResponse pagination = 2; } + +message LastObservedEthereumHeightRequest {} +message LastObservedEthereumHeightResponse { + LatestEthereumBlockHeight last_observed_ethereum_height = 1; +} \ No newline at end of file diff --git a/module/x/gravity/types/query.pb.go b/module/x/gravity/types/query.pb.go index 8b10103ab..de752a868 100644 --- a/module/x/gravity/types/query.pb.go +++ b/module/x/gravity/types/query.pb.go @@ -2308,6 +2308,86 @@ func (m *UnbatchedSendToEthereumsResponse) GetPagination() *query.PageResponse { return nil } +type LastObservedEthereumHeightRequest struct { +} + +func (m *LastObservedEthereumHeightRequest) Reset() { *m = LastObservedEthereumHeightRequest{} } +func (m *LastObservedEthereumHeightRequest) String() string { return proto.CompactTextString(m) } +func (*LastObservedEthereumHeightRequest) ProtoMessage() {} +func (*LastObservedEthereumHeightRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{49} +} +func (m *LastObservedEthereumHeightRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LastObservedEthereumHeightRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LastObservedEthereumHeightRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LastObservedEthereumHeightRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LastObservedEthereumHeightRequest.Merge(m, src) +} +func (m *LastObservedEthereumHeightRequest) XXX_Size() int { + return m.Size() +} +func (m *LastObservedEthereumHeightRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LastObservedEthereumHeightRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_LastObservedEthereumHeightRequest proto.InternalMessageInfo + +type LastObservedEthereumHeightResponse struct { + LastObservedEthereumHeight *LatestEthereumBlockHeight `protobuf:"bytes,1,opt,name=last_observed_ethereum_height,json=lastObservedEthereumHeight,proto3" json:"last_observed_ethereum_height,omitempty"` +} + +func (m *LastObservedEthereumHeightResponse) Reset() { *m = LastObservedEthereumHeightResponse{} } +func (m *LastObservedEthereumHeightResponse) String() string { return proto.CompactTextString(m) } +func (*LastObservedEthereumHeightResponse) ProtoMessage() {} +func (*LastObservedEthereumHeightResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{50} +} +func (m *LastObservedEthereumHeightResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LastObservedEthereumHeightResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LastObservedEthereumHeightResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LastObservedEthereumHeightResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_LastObservedEthereumHeightResponse.Merge(m, src) +} +func (m *LastObservedEthereumHeightResponse) XXX_Size() int { + return m.Size() +} +func (m *LastObservedEthereumHeightResponse) XXX_DiscardUnknown() { + xxx_messageInfo_LastObservedEthereumHeightResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_LastObservedEthereumHeightResponse proto.InternalMessageInfo + +func (m *LastObservedEthereumHeightResponse) GetLastObservedEthereumHeight() *LatestEthereumBlockHeight { + if m != nil { + return m.LastObservedEthereumHeight + } + return nil +} + func init() { proto.RegisterType((*ParamsRequest)(nil), "gravity.v1.ParamsRequest") proto.RegisterType((*ParamsResponse)(nil), "gravity.v1.ParamsResponse") @@ -2358,122 +2438,129 @@ func init() { proto.RegisterType((*BatchedSendToEthereumsResponse)(nil), "gravity.v1.BatchedSendToEthereumsResponse") proto.RegisterType((*UnbatchedSendToEthereumsRequest)(nil), "gravity.v1.UnbatchedSendToEthereumsRequest") proto.RegisterType((*UnbatchedSendToEthereumsResponse)(nil), "gravity.v1.UnbatchedSendToEthereumsResponse") + proto.RegisterType((*LastObservedEthereumHeightRequest)(nil), "gravity.v1.LastObservedEthereumHeightRequest") + proto.RegisterType((*LastObservedEthereumHeightResponse)(nil), "gravity.v1.LastObservedEthereumHeightResponse") } func init() { proto.RegisterFile("gravity/v1/query.proto", fileDescriptor_29a9d4192703013c) } var fileDescriptor_29a9d4192703013c = []byte{ - // 1761 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x4b, 0x6f, 0xdb, 0xc6, - 0x16, 0x16, 0x1d, 0x3b, 0x89, 0x8f, 0xdf, 0x63, 0x25, 0x51, 0x64, 0x47, 0xb2, 0xc7, 0x79, 0x38, - 0xf1, 0xb5, 0x64, 0x3b, 0xc0, 0x7d, 0xbf, 0xe2, 0x57, 0x70, 0x91, 0xe7, 0x95, 0x9c, 0x20, 0xbe, - 0xb8, 0x17, 0xbc, 0x94, 0x38, 0xa1, 0x59, 0x4b, 0xa4, 0x42, 0x52, 0x6a, 0x54, 0xa0, 0x40, 0xd1, - 0x02, 0x5d, 0x74, 0x95, 0x45, 0x37, 0xdd, 0x77, 0xd5, 0x6d, 0xff, 0x44, 0x96, 0x59, 0x76, 0xd5, - 0x16, 0xce, 0x1f, 0x29, 0x38, 0x1c, 0x52, 0x33, 0xd4, 0x90, 0x52, 0x5c, 0x77, 0x95, 0xe8, 0x3c, - 0xbe, 0xf3, 0xe0, 0x37, 0xc3, 0x73, 0x68, 0xb8, 0x6c, 0x38, 0x5a, 0xc7, 0xf4, 0xba, 0xe5, 0xce, - 0x66, 0xf9, 0x55, 0x9b, 0x38, 0xdd, 0x52, 0xcb, 0xb1, 0x3d, 0x1b, 0x01, 0x93, 0x97, 0x3a, 0x9b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23, 0x0f, 0x48, 0xd7, - 0xdd, 0xee, 0x3e, 0x0f, 0xce, 0xb1, 0xed, 0x84, 0x29, 0xad, 0xc1, 0x5c, 0x27, 0x94, 0xa9, 0x22, - 0xed, 0x66, 0x23, 0xc5, 0x3d, 0xc6, 0xbf, 0x36, 0x14, 0x13, 0xe1, 0x38, 0xf2, 0x79, 0x47, 0x31, - 0x24, 0x20, 0xde, 0x11, 0xc3, 0x40, 0x9b, 0x90, 0xb5, 0x1d, 0xff, 0x9e, 0xf7, 0x1c, 0x21, 0x66, - 0xf0, 0x34, 0xe6, 0x79, 0x5d, 0x18, 0xf6, 0x31, 0xac, 0x88, 0x61, 0x43, 0xde, 0x07, 0x6f, 0xb0, - 0xb0, 0x94, 0x5b, 0x30, 0x43, 0x98, 0x42, 0x0d, 0x5e, 0x67, 0x2c, 0xfc, 0x34, 0x11, 0xec, 0xf1, - 0x97, 0x0a, 0x5c, 0x4f, 0x07, 0x64, 0xc5, 0x7c, 0x48, 0x73, 0x4e, 0x53, 0xd8, 0x73, 0x58, 0x16, - 0xf3, 0x78, 0xc2, 0x19, 0x85, 0x65, 0x25, 0xe1, 0x2a, 0xc9, 0xb8, 0x9f, 0x00, 0x4e, 0xc3, 0x3d, - 0x4d, 0x75, 0x92, 0xe6, 0x8e, 0x48, 0x9b, 0x7b, 0xc9, 0xa7, 0x7e, 0x2f, 0x76, 0xf8, 0xb6, 0x7c, - 0xe1, 0x93, 0x9c, 0x17, 0xb3, 0x24, 0xfe, 0x09, 0x53, 0x3a, 0x93, 0xab, 0xc7, 0xa4, 0x1b, 0xde, - 0xaa, 0x0b, 0xfc, 0xad, 0xfa, 0xc8, 0x35, 0x04, 0xdf, 0x49, 0x9d, 0xfb, 0x85, 0xf7, 0xe1, 0x1a, - 0xbd, 0x76, 0x89, 0x5e, 0x25, 0x96, 0x7e, 0x60, 0x87, 0xcf, 0xd2, 0xe5, 0xd6, 0x48, 0x97, 0x58, - 0x3a, 0x89, 0x17, 0x39, 0x15, 0x48, 0xc3, 0xa6, 0x1d, 0x41, 0x21, 0x09, 0x27, 0x7a, 0x9b, 0xcd, - 0xf9, 0x2e, 0xaa, 0x67, 0xab, 0x61, 0xd1, 0xd2, 0x29, 0x42, 0xf4, 0xaf, 0xcc, 0xb8, 0x22, 0x1e, - 0x7e, 0xa3, 0xf8, 0x53, 0x4a, 0xed, 0x0c, 0x92, 0x8e, 0x4d, 0xc7, 0x23, 0xa7, 0x9e, 0x8e, 0xbf, - 0x57, 0x60, 0x29, 0x39, 0xa5, 0xb3, 0xad, 0xff, 0xcc, 0x86, 0xe7, 0xad, 0x93, 0x79, 0x18, 0xfb, - 0xb7, 0x6f, 0x8a, 0xee, 0xc1, 0xf9, 0xe0, 0x55, 0x80, 0xae, 0xf6, 0x7f, 0x13, 0x61, 0x05, 0xe7, - 0xf3, 0x32, 0x55, 0x00, 0x8b, 0x33, 0xe8, 0x29, 0x4c, 0x70, 0x13, 0x31, 0x2a, 0x24, 0x8d, 0xca, - 0x0c, 0xac, 0x98, 0xa8, 0x8f, 0x10, 0xff, 0x0b, 0x73, 0x7d, 0x1f, 0x4f, 0xd0, 0x75, 0xde, 0x2f, - 0xe9, 0xdb, 0xca, 0x30, 0xe8, 0xbb, 0x70, 0x81, 0x8d, 0x1b, 0x28, 0x2f, 0x9b, 0xa7, 0x19, 0xd2, - 0x82, 0x54, 0x17, 0xa1, 0x1c, 0xc2, 0xb4, 0x38, 0x83, 0xa1, 0xe5, 0x94, 0x81, 0x98, 0x61, 0xe2, - 0x34, 0x93, 0x08, 0xba, 0x0a, 0x93, 0xfc, 0x66, 0x82, 0x92, 0x6a, 0x8a, 0x9e, 0xcf, 0x52, 0xb2, - 0x41, 0x04, 0x7a, 0x1f, 0x2e, 0x86, 0xfb, 0x05, 0x92, 0x95, 0x16, 0x81, 0x2d, 0xca, 0x95, 0xdc, - 0xc3, 0x99, 0x89, 0x6d, 0x08, 0x28, 0xa5, 0xac, 0x08, 0x76, 0x25, 0xd5, 0x26, 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, 0x06, 0xdd, 0xee, 0xeb, 0x66, 0xd2, 0x48, 0x92, 0xbf, 0x33, 0x8c, 0x29, 0x7f, - 0x03, 0x26, 0x0d, 0x14, 0x28, 0xc6, 0xcf, 0xd4, 0x49, 0x48, 0xbc, 0x01, 0x07, 0xcd, 0x28, 0xc1, - 0x19, 0x4a, 0x58, 0x52, 0xc4, 0x33, 0x94, 0xbe, 0x18, 0x89, 0x67, 0x68, 0xc0, 0xd6, 0x83, 0x33, - 0xe8, 0x0b, 0x05, 0x16, 0xd3, 0x76, 0x0a, 0x54, 0x4e, 0xc6, 0x93, 0xae, 0x33, 0xf9, 0x8d, 0xe1, - 0x1d, 0xf8, 0x93, 0x9c, 0x3c, 0xf8, 0x8b, 0x27, 0x79, 0xe0, 0xe2, 0x21, 0x9e, 0xe4, 0xc1, 0xfb, - 0x44, 0xc8, 0xdd, 0x9e, 0x5d, 0x9c, 0xbb, 0x7d, 0x5b, 0x41, 0x9c, 0xbb, 0xfd, 0xfb, 0x01, 0xce, - 0x6c, 0x3f, 0x7b, 0x7b, 0x52, 0x50, 0xde, 0x9d, 0x14, 0x94, 0x9f, 0x4f, 0x0a, 0xca, 0x9b, 0xf7, - 0x85, 0xcc, 0xbb, 0xf7, 0x85, 0xcc, 0x0f, 0xef, 0x0b, 0x99, 0xff, 0xfc, 0x85, 0xfb, 0x72, 0xd6, - 0x22, 0x86, 0xd1, 0xfd, 0xa8, 0x13, 0xfe, 0xa9, 0x6d, 0xbd, 0xe6, 0x98, 0xba, 0x41, 0xca, 0x4d, - 0x5b, 0x6f, 0x37, 0x48, 0xb9, 0xb3, 0x55, 0x7e, 0x1d, 0xaa, 0x82, 0x4f, 0x6a, 0xb5, 0xf3, 0xf4, - 0xaf, 0x6e, 0x77, 0x7f, 0x09, 0x00, 0x00, 0xff, 0xff, 0xa7, 0x9a, 0x2d, 0xfe, 0x66, 0x1c, 0x00, + // 1841 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0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x1f, 0xfc, 0x37, 0x00, 0x00, 0xff, 0xff, 0xbd, 0xaf, 0xe5, 0x30, 0x9b, 0x1d, 0x00, 0x00, } @@ -2530,6 +2617,7 @@ type QueryClient interface { DelegateKeysByEthereumSigner(ctx context.Context, in *DelegateKeysByEthereumSignerRequest, opts ...grpc.CallOption) (*DelegateKeysByEthereumSignerResponse, error) DelegateKeysByOrchestrator(ctx context.Context, in *DelegateKeysByOrchestratorRequest, opts ...grpc.CallOption) (*DelegateKeysByOrchestratorResponse, error) DelegateKeys(ctx context.Context, in *DelegateKeysRequest, opts ...grpc.CallOption) (*DelegateKeysResponse, error) + LastObservedEthereumHeight(ctx context.Context, in *LastObservedEthereumHeightRequest, opts ...grpc.CallOption) (*LastObservedEthereumHeightResponse, error) } type queryClient struct { @@ -2765,6 +2853,15 @@ func (c *queryClient) DelegateKeys(ctx context.Context, in *DelegateKeysRequest, return out, nil } +func (c *queryClient) LastObservedEthereumHeight(ctx context.Context, in *LastObservedEthereumHeightRequest, opts ...grpc.CallOption) (*LastObservedEthereumHeightResponse, error) { + out := new(LastObservedEthereumHeightResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/LastObservedEthereumHeight", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Module parameters query @@ -2808,6 +2905,7 @@ type QueryServer interface { DelegateKeysByEthereumSigner(context.Context, *DelegateKeysByEthereumSignerRequest) (*DelegateKeysByEthereumSignerResponse, error) DelegateKeysByOrchestrator(context.Context, *DelegateKeysByOrchestratorRequest) (*DelegateKeysByOrchestratorResponse, error) DelegateKeys(context.Context, *DelegateKeysRequest) (*DelegateKeysResponse, error) + LastObservedEthereumHeight(context.Context, *LastObservedEthereumHeightRequest) (*LastObservedEthereumHeightResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -2889,6 +2987,9 @@ func (*UnimplementedQueryServer) DelegateKeysByOrchestrator(ctx context.Context, func (*UnimplementedQueryServer) DelegateKeys(ctx context.Context, req *DelegateKeysRequest) (*DelegateKeysResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DelegateKeys not implemented") } +func (*UnimplementedQueryServer) LastObservedEthereumHeight(ctx context.Context, req *LastObservedEthereumHeightRequest) (*LastObservedEthereumHeightResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LastObservedEthereumHeight not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -3344,6 +3445,24 @@ func _Query_DelegateKeys_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _Query_LastObservedEthereumHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LastObservedEthereumHeightRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).LastObservedEthereumHeight(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/LastObservedEthereumHeight", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LastObservedEthereumHeight(ctx, req.(*LastObservedEthereumHeightRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "gravity.v1.Query", HandlerType: (*QueryServer)(nil), @@ -3448,6 +3567,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "DelegateKeys", Handler: _Query_DelegateKeys_Handler, }, + { + MethodName: "LastObservedEthereumHeight", + Handler: _Query_LastObservedEthereumHeight_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "gravity/v1/query.proto", @@ -5153,6 +5276,64 @@ func (m *UnbatchedSendToEthereumsResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } +func (m *LastObservedEthereumHeightRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LastObservedEthereumHeightRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LastObservedEthereumHeightRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *LastObservedEthereumHeightResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LastObservedEthereumHeightResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LastObservedEthereumHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LastObservedEthereumHeight != nil { + { + size, err := m.LastObservedEthereumHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -5867,6 +6048,28 @@ func (m *UnbatchedSendToEthereumsResponse) Size() (n int) { return n } +func (m *LastObservedEthereumHeightRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *LastObservedEthereumHeightResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.LastObservedEthereumHeight != nil { + l = m.LastObservedEthereumHeight.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -10254,6 +10457,142 @@ func (m *UnbatchedSendToEthereumsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *LastObservedEthereumHeightRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LastObservedEthereumHeightRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LastObservedEthereumHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LastObservedEthereumHeightResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LastObservedEthereumHeightResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LastObservedEthereumHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastObservedEthereumHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LastObservedEthereumHeight == nil { + m.LastObservedEthereumHeight = &LatestEthereumBlockHeight{} + } + if err := m.LastObservedEthereumHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From d8d6b6dbc7365c0a867c888e0f1fa492de8f5068 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Wed, 27 Apr 2022 20:43:24 -0700 Subject: [PATCH 12/20] Query code for LastObservedEthereumHeight --- module/x/gravity/client/cli/query.go | 25 +++++++++++++++++++++++++ module/x/gravity/keeper/grpc_query.go | 11 +++++++++++ 2 files changed, 36 insertions(+) diff --git a/module/x/gravity/client/cli/query.go b/module/x/gravity/client/cli/query.go index 542da2182..27f42d6ba 100644 --- a/module/x/gravity/client/cli/query.go +++ b/module/x/gravity/client/cli/query.go @@ -45,6 +45,7 @@ func GetQueryCmd() *cobra.Command { CmdDelegateKeysByEthereumSigner(), CmdDelegateKeysByOrchestrator(), CmdDelegateKeys(), + CmdLastObservedEthereumHeight(), ) return gravityQueryCmd @@ -805,6 +806,30 @@ func CmdDelegateKeys() *cobra.Command { return cmd } +func CmdLastObservedEthereumHeight() *cobra.Command { + cmd := &cobra.Command{ + Use: "last-observed-ethereum-height", + Args: cobra.NoArgs, + Short: "query the last observed ethereum and cosmos heights", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, queryClient, err := newContextAndQueryClient(cmd) + if err != nil { + return err + } + + res, err := queryClient.LastObservedEthereumHeight(cmd.Context(), &types.LastObservedEthereumHeightRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + func newContextAndQueryClient(cmd *cobra.Command) (client.Context, types.QueryClient, error) { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { diff --git a/module/x/gravity/keeper/grpc_query.go b/module/x/gravity/keeper/grpc_query.go index f3c42d2c3..4ee0ada4e 100644 --- a/module/x/gravity/keeper/grpc_query.go +++ b/module/x/gravity/keeper/grpc_query.go @@ -460,3 +460,14 @@ func (k Keeper) DelegateKeys(c context.Context, req *types.DelegateKeysRequest) } return res, nil } + +func (k Keeper) LastObservedEthereumHeight(c context.Context, req *types.LastObservedEthereumHeightRequest) (*types.LastObservedEthereumHeightResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + lastObservedEthereumHeight := k.GetLastObservedEthereumBlockHeight(ctx) + + res := &types.LastObservedEthereumHeightResponse{ + LastObservedEthereumHeight: &lastObservedEthereumHeight, + } + + return res, nil +} From 077dfc53694eaa81be2adab0b18fbed9692a055f Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Wed, 27 Apr 2022 21:04:36 -0700 Subject: [PATCH 13/20] Update rust version in orchestrator Dockerfile --- orchestrator/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orchestrator/Dockerfile b/orchestrator/Dockerfile index 145257e5c..ab075681f 100644 --- a/orchestrator/Dockerfile +++ b/orchestrator/Dockerfile @@ -1,6 +1,6 @@ # Reference: https://www.lpalmieri.com/posts/fast-rust-docker-builds/ -FROM rust:1.56 as cargo-chef-rust +FROM rust:1.58 as cargo-chef-rust RUN cargo install cargo-chef FROM cargo-chef-rust as planner @@ -28,4 +28,4 @@ RUN cargo build --release --bin gorc FROM cargo-chef-rust as runtime WORKDIR app COPY --from=builder /app/target/release/gorc /usr/local/bin -CMD gorc \ No newline at end of file +CMD gorc From b67464efddbcdb6f159b1d96ee7c0aa131e08aba Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Wed, 27 Apr 2022 21:04:50 -0700 Subject: [PATCH 14/20] Fix MsgEthereumHeightVote type URL --- orchestrator/cosmos_gravity/src/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchestrator/cosmos_gravity/src/build.rs b/orchestrator/cosmos_gravity/src/build.rs index 04502c803..764b8a2c9 100644 --- a/orchestrator/cosmos_gravity/src/build.rs +++ b/orchestrator/cosmos_gravity/src/build.rs @@ -121,7 +121,7 @@ pub async fn ethereum_vote_height_messages( ethereum_height: ethereum_height.as_u64(), signer: cosmos_address.to_string(), }; - let msg = Msg::new("/gravity.v1.MsgSubmitEthereumHeightVote", msg); + let msg = Msg::new("/gravity.v1.MsgEthereumHeightVote", msg); let mut msgs = Vec::new(); msgs.push(msg); From ef82616d65b1e596658a24a0606779915e9f7cb1 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Wed, 27 Apr 2022 21:41:48 -0700 Subject: [PATCH 15/20] Add height update test and orchestrator comment --- module/x/gravity/abci_test.go | 51 ++++++++++++++++++++++ orchestrator/ethereum_gravity/src/utils.rs | 2 + 2 files changed, 53 insertions(+) diff --git a/module/x/gravity/abci_test.go b/module/x/gravity/abci_test.go index 046d32c68..bb9c670d7 100644 --- a/module/x/gravity/abci_test.go +++ b/module/x/gravity/abci_test.go @@ -307,6 +307,57 @@ func TestBatchTxTimeout(t *testing.T) { require.NotNil(t, gotThirdBatch) } +func TestUpdateObservedEthereumHeight(t *testing.T) { + input, ctx := keeper.SetupFiveValChain(t) + gravityKeeper := input.GravityKeeper + + gravityKeeper.SetLastObservedEthereumBlockHeightWithCosmos(ctx, 2, 5) + + // update runs on mod 10 block heights, no votes have been sent so it + // shoudl leave the set values alone + ctx = ctx.WithBlockHeight(10) + gravity.EndBlocker(ctx, gravityKeeper) + + lastHeight := gravityKeeper.GetLastObservedEthereumBlockHeight(ctx) + require.Equal(t, lastHeight.EthereumHeight, uint64(2)) + require.Equal(t, lastHeight.CosmosHeight, uint64(5)) + + ctx = ctx.WithBlockHeight(3) + input.GravityKeeper.SetEthereumHeightVote(ctx, keeper.ValAddrs[0], 10) + + ctx = ctx.WithBlockHeight(33) + input.GravityKeeper.SetEthereumHeightVote(ctx, keeper.ValAddrs[1], 20) + + ctx = ctx.WithBlockHeight(63) + input.GravityKeeper.SetEthereumHeightVote(ctx, keeper.ValAddrs[2], 30) + + ctx = ctx.WithBlockHeight(93) + input.GravityKeeper.SetEthereumHeightVote(ctx, keeper.ValAddrs[3], 40) + + ctx = ctx.WithBlockHeight(123) + input.GravityKeeper.SetEthereumHeightVote(ctx, keeper.ValAddrs[4], 50) + + // run endblocker on a non-mod 10 block to ensure the update isn't being + // called and changing the set values + gravity.EndBlocker(ctx, gravityKeeper) + + lastHeight = gravityKeeper.GetLastObservedEthereumBlockHeight(ctx) + require.Equal(t, lastHeight.EthereumHeight, uint64(2)) + require.Equal(t, lastHeight.CosmosHeight, uint64(5)) + + // run update in endblocker and verify that 4/5 validators agree that + // block height 33 for cosmos and 20 for ethereum are possible, since they + // are equal to or less than their own observed block height, and since + // those are the highest heights with a consensus of validator power, they + // should be set + ctx = ctx.WithBlockHeight(130) + gravity.EndBlocker(ctx, gravityKeeper) + + lastHeight = gravityKeeper.GetLastObservedEthereumBlockHeight(ctx) + require.Equal(t, lastHeight.EthereumHeight, uint64(20)) + require.Equal(t, lastHeight.CosmosHeight, uint64(33)) +} + func fundAccount(ctx sdk.Context, bankKeeper types.BankKeeper, addr sdk.AccAddress, amounts sdk.Coins) error { if err := bankKeeper.MintCoins(ctx, types.ModuleName, amounts); err != nil { return err diff --git a/orchestrator/ethereum_gravity/src/utils.rs b/orchestrator/ethereum_gravity/src/utils.rs index 2b038625e..fb4acca31 100644 --- a/orchestrator/ethereum_gravity/src/utils.rs +++ b/orchestrator/ethereum_gravity/src/utils.rs @@ -190,6 +190,8 @@ impl GasCost { } } +// returns a bool indicating whether or not this error means we should permanently +// skip this logic call pub fn handle_contract_error(gravity_error: GravityError) -> bool { let error_string = format!("LogicCall error: {:?}", gravity_error); let gravity_contract_error = extract_gravity_contract_error(gravity_error); From 57a1fc83238fde9ce9b716c103f08f42e0108f4e Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Tue, 3 May 2022 07:57:00 -0700 Subject: [PATCH 16/20] Longer block times between height checks --- module/x/gravity/abci.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/x/gravity/abci.go b/module/x/gravity/abci.go index e23f654fa..1f3a2f720 100644 --- a/module/x/gravity/abci.go +++ b/module/x/gravity/abci.go @@ -161,7 +161,8 @@ func eventVoteRecordTally(ctx sdk.Context, k keeper.Keeper) { // 2. The proposed consensus heights from this process are greater than the values stored from the last time // we observed an Ethereum event from the bridge func updateObservedEthereumHeight(ctx sdk.Context, k keeper.Keeper) { - if ctx.BlockHeight()%10 != 0 { + // wait some minutes before checking the height votes + if ctx.BlockHeight()%50 != 0 { return } From df57b5d282cb223631c565c94726c02959b20ddc Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Tue, 3 May 2022 08:08:14 -0700 Subject: [PATCH 17/20] Less frequent height updates, subtract block delay --- orchestrator/orchestrator/src/main_loop.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/orchestrator/orchestrator/src/main_loop.rs b/orchestrator/orchestrator/src/main_loop.rs index f1ab3283a..f61c7e398 100644 --- a/orchestrator/orchestrator/src/main_loop.rs +++ b/orchestrator/orchestrator/src/main_loop.rs @@ -105,8 +105,12 @@ pub async fn orchestrator_main_loop( } } +// the amount of time to wait when encountering error conditions const DELAY: Duration = Duration::from_secs(5); +// the number of loop iterations to wait between sending height update messages +const HEIGHT_UPDATE_INTERVAL: u32 = 50; + /// This function is responsible for making sure that Ethereum events are retrieved from the Ethereum blockchain /// and ferried over to Cosmos where they will be used to issue tokens or process batches. #[allow(unused_variables)] @@ -140,7 +144,7 @@ pub async fn eth_oracle_main_loop( .await; info!("Oracle resync complete, Oracle now operational"); let mut grpc_client = grpc_client; - let mut loop_count = 0; + let mut loop_count: u32 = 0; loop { let (async_resp, _) = tokio::join!( @@ -157,12 +161,14 @@ pub async fn eth_oracle_main_loop( block_height, ); - // send latest Ethereum height to the Cosmos chain every 5 loops - if loop_count % 5 == 0 { + // send latest Ethereum height to the Cosmos chain periodically + // subtract the block delay based on the environment, in order to have + // more confidence we are attesting to a height that has not been re-orged + if loop_count % HEIGHT_UPDATE_INTERVAL == 0 { let messages = build::ethereum_vote_height_messages( &contact, cosmos_key, - latest_eth_block, + latest_eth_block - block_delay, ).await; msg_sender From daf8f8183a1dc25a1e71a6c855b9a29dbed00bb9 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Tue, 3 May 2022 08:17:09 -0700 Subject: [PATCH 18/20] Fix endblocker height update test --- module/x/gravity/abci_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/x/gravity/abci_test.go b/module/x/gravity/abci_test.go index bb9c670d7..c75f49d8b 100644 --- a/module/x/gravity/abci_test.go +++ b/module/x/gravity/abci_test.go @@ -313,9 +313,9 @@ func TestUpdateObservedEthereumHeight(t *testing.T) { gravityKeeper.SetLastObservedEthereumBlockHeightWithCosmos(ctx, 2, 5) - // update runs on mod 10 block heights, no votes have been sent so it + // update runs on mod 50 block heights, no votes have been sent so it // shoudl leave the set values alone - ctx = ctx.WithBlockHeight(10) + ctx = ctx.WithBlockHeight(50) gravity.EndBlocker(ctx, gravityKeeper) lastHeight := gravityKeeper.GetLastObservedEthereumBlockHeight(ctx) @@ -337,7 +337,7 @@ func TestUpdateObservedEthereumHeight(t *testing.T) { ctx = ctx.WithBlockHeight(123) input.GravityKeeper.SetEthereumHeightVote(ctx, keeper.ValAddrs[4], 50) - // run endblocker on a non-mod 10 block to ensure the update isn't being + // run endblocker on a non-mod 50 block to ensure the update isn't being // called and changing the set values gravity.EndBlocker(ctx, gravityKeeper) @@ -350,7 +350,7 @@ func TestUpdateObservedEthereumHeight(t *testing.T) { // are equal to or less than their own observed block height, and since // those are the highest heights with a consensus of validator power, they // should be set - ctx = ctx.WithBlockHeight(130) + ctx = ctx.WithBlockHeight(150) gravity.EndBlocker(ctx, gravityKeeper) lastHeight = gravityKeeper.GetLastObservedEthereumBlockHeight(ctx) From 0ca9c0955b7dcfd79a4c1cd49de19043d733f7e1 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Tue, 3 May 2022 09:10:10 -0700 Subject: [PATCH 19/20] Add more detail to permanent skip message --- orchestrator/relayer/src/logic_call_relaying.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchestrator/relayer/src/logic_call_relaying.rs b/orchestrator/relayer/src/logic_call_relaying.rs index 89d52d0fa..174ceaf15 100644 --- a/orchestrator/relayer/src/logic_call_relaying.rs +++ b/orchestrator/relayer/src/logic_call_relaying.rs @@ -40,7 +40,7 @@ pub async fn relay_logic_calls( let mut oldest_signatures: Option> = None; for call in latest_calls { if logic_call_skips.permanently_skipped(&call) { - info!("LogicCall {}/{} permanently skipped, on-chain timeout after eth height {}", + info!("LogicCall {}/{} permanently skipped until oracle confirms or on-chain timeout after eth height {}", bytes_to_hex_str(&call.invalidation_id), call.invalidation_nonce, call.timeout ); continue; From 96109fd2c22a87ffebae89403fc7aaa479c55ffc Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Tue, 3 May 2022 12:06:40 -0700 Subject: [PATCH 20/20] Sort logic calls by nonce in orchestrator --- orchestrator/cosmos_gravity/src/query.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/orchestrator/cosmos_gravity/src/query.rs b/orchestrator/cosmos_gravity/src/query.rs index 24ccb8a2f..2c1e4ef4b 100644 --- a/orchestrator/cosmos_gravity/src/query.rs +++ b/orchestrator/cosmos_gravity/src/query.rs @@ -155,6 +155,13 @@ pub async fn get_latest_logic_calls( for call in calls { out.push(LogicCall::from_proto(call)?); } + + // as these calls are expected to be in oldest -> newest order, but + // the chain does not provide them as such, we will sort using the + // invalidation nonces as keys such that for any given scope, calls will + // be processed in nonce order + out.sort_by_key(|call| call.invalidation_nonce); + Ok(out) }