Skip to content

Commit

Permalink
voyager progress (#3199)
Browse files Browse the repository at this point in the history
  • Loading branch information
benluelo authored Nov 5, 2024
2 parents 6b284b9 + 7fbbe33 commit b7f8e9e
Show file tree
Hide file tree
Showing 45 changed files with 1,078 additions and 684 deletions.
110 changes: 87 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ autocli
autocliv
autocorrect
autoplay
autoref
autotests
awkroot
axelar
Expand Down Expand Up @@ -1166,7 +1167,6 @@ smallvec
smoothstep
snapshotter
snapshottypes
soketto
solomachine
sonner
spearbit
Expand Down
56 changes: 28 additions & 28 deletions evm/contracts/Multicall.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pragma solidity ^0.8.27;

struct Call3 {
address target;
bool allowFailure;
// bool allowFailure;
bytes callData;
}

Expand All @@ -25,33 +25,33 @@ contract Multicall {
calli = calls[i];
(result.success, result.returnData) =
calli.target.call(calli.callData);
assembly {
// Revert if the call fails and failure is not allowed
// `allowFailure := calldataload(add(calli, 0x20))` and `success := mload(result)`
if iszero(or(calldataload(add(calli, 0x20)), mload(result))) {
// set "Error(string)" signature: bytes32(bytes4(keccak256("Error(string)")))
mstore(
0x00,
0x08c379a000000000000000000000000000000000000000000000000000000000
)
// set data offset
mstore(
0x04,
0x0000000000000000000000000000000000000000000000000000000000000020
)
// set length of revert string
mstore(
0x24,
0x0000000000000000000000000000000000000000000000000000000000000017
)
// set revert string: bytes32(abi.encodePacked("Multicall3: call failed"))
mstore(
0x44,
0x4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000
)
revert(0x00, 0x64)
}
}
// assembly {
// // Revert if the call fails and failure is not allowed
// // `allowFailure := calldataload(add(calli, 0x20))` and `success := mload(result)`
// if iszero(or(calldataload(add(calli, 0x20)), mload(result))) {
// // set "Error(string)" signature: bytes32(bytes4(keccak256("Error(string)")))
// mstore(
// 0x00,
// 0x08c379a000000000000000000000000000000000000000000000000000000000
// )
// // set data offset
// mstore(
// 0x04,
// 0x0000000000000000000000000000000000000000000000000000000000000020
// )
// // set length of revert string
// mstore(
// 0x24,
// 0x0000000000000000000000000000000000000000000000000000000000000017
// )
// // set revert string: bytes32(abi.encodePacked("Multicall3: call failed"))
// mstore(
// 0x44,
// 0x4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000
// )
// revert(0x00, 0x64)
// }
// }
unchecked {
++i;
}
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
./site/site.nix
./lib/near/near.nix
./typescript-sdk/typescript-sdk.nix
# ./light-clients/ethereum-light-client/ethereum-light-client.nix
./light-clients/ethereum-light-client/ethereum-light-client.nix
./light-clients/cometbls-light-client/cometbls-light-client.nix
./light-clients/tendermint-light-client/tendermint-light-client.nix
# ./light-clients/scroll-light-client/scroll-light-client.nix
Expand Down
3 changes: 1 addition & 2 deletions hubble/src/indexer/tm/create_client_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ pub fn schedule_create_client_checker(
let client_type = parse_wasm_client_type(wasm_blob).unwrap();

let counterparty_chain_id = match client_type.unwrap() {
WasmClientType::EthereumMinimal
| WasmClientType::EthereumMainnet => {
WasmClientType::Ethereum => {
let cs = match ethereum_light_client_types::ClientState::decode_as::<Proto>(&cs.data) {
Ok(cs) => cs,
// We changed the format of berachain client states, but union-testnet-8 still contains an old configuration which we need to ignore.
Expand Down
2 changes: 2 additions & 0 deletions lib/cometbft-types/src/abci/response_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ pub struct QueryResponse {
pub log: String,
/// nondeterministic
pub info: String,
#[serde(with = "::serde_utils::string")]
pub index: i64,
pub key: Option<Bytes<Base64>>,
pub value: Option<Bytes<Base64>>,
pub proof_ops: Option<ProofOps>,
#[serde(with = "::serde_utils::string")]
pub height: BoundedI64<0, { i64::MAX }>,
pub codespace: String,
}
Expand Down
Loading

0 comments on commit b7f8e9e

Please sign in to comment.