Skip to content

Commit

Permalink
log verification errors in grandpa client
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege committed Jan 27, 2025
1 parent 65fa7a7 commit 90fc50a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions evm/src/hosts/Soneium.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ pragma solidity ^0.8.17;
import {EvmHost, HostParams} from "./EvmHost.sol";

/**
* @title The ArbitrumHost
* @title The SoneiumHost
* @author Polytope Labs (hello@polytope.technology)
*
* @notice The IsmpHost and IsmpDispatcher implementation for the Arbitrum state machine.
* @notice The IsmpHost and IsmpDispatcher implementation for the Soneium state machine.
* Refer to the official ISMP specification. https://docs.hyperbridge.network/protocol/ismp
*/
contract SoneiumHost is EvmHost {
constructor(HostParams memory params) EvmHost(params) {}

/// chainId for the Aoneium mainnet
/// chainId for the Soneium mainnet
uint256 public constant CHAIN_ID = 1868;

function chainId() public pure override returns (uint256) {
Expand Down
8 changes: 6 additions & 2 deletions modules/ismp/clients/grandpa/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ where
consensus_state,
headers_with_finality_proof,
)
.map_err(|_| Error::Custom("Error verifying parachain headers".into()))?;
.map_err(|err| {
Error::Custom(format!("Error verifying parachain headers: {err:#?}"))
})?;

let parachain_headers = parachain_headers
.into_iter()
Expand Down Expand Up @@ -171,7 +173,9 @@ where
consensus_state,
standalone_chain_message.finality_proof,
)
.map_err(|_| Error::Custom("Error verifying grandpa header".parse().unwrap()))?;
.map_err(|err| {
Error::Custom(format!("Error verifying grandpa header: {err:#?}"))
})?;
let digest_result = fetch_overlay_root_and_timestamp(
header.digest(),
consensus_state.slot_duration,
Expand Down
2 changes: 1 addition & 1 deletion parachain/runtimes/nexus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("nexus"),
impl_name: create_runtime_str!("nexus"),
authoring_version: 1,
spec_version: 2_000,
spec_version: 2_100,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down

0 comments on commit 90fc50a

Please sign in to comment.