Skip to content

Commit

Permalink
Merge branch 'fix-ibc-test' of https://github.com/ComposableFi/emulat…
Browse files Browse the repository at this point in the history
…ed-light-client into fix-ibc-test
  • Loading branch information
dhruvja committed Oct 13, 2023
2 parents 07167b9 + 304b680 commit 4ecf78b
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: cargo fmt --all --check

- name: Install cargo-deny
run: cargo install cargo-deny
run: cargo install --locked cargo-deny

- name: Check bans
run: cargo-deny --all-features check bans
Expand Down
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ anchor-client = "0.28.0"
anyhow = "1.0.32"

[patch.crates-io]
curve25519-dalek = { git = "https://github.com/dhruvja/curve25519-dalek", branch = "master" }
aes-gcm-siv = { git = "https://github.com/dhruvja/AEADs", branch = "main-aes-gcm-siv-v0.10.3" }
curve25519-dalek = { git = "https://github.com/dhruvja/curve25519-dalek", branch = "master" }

# eyre has a mutable global variable which is something Solana
# programs cannot have. tendermint crate enables eyre; patch it to
# version that doesn’t do that.
tendermint = { git = "https://github.com/mina86/tendermint-rs.git", branch = "33.2-sans-eyre" }
1 change: 1 addition & 0 deletions common/lib/src/varint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ impl borsh::BorshDeserialize for VarInt<u32> {
}
}


/// Small on-stack buffer.
///
/// # Example
Expand Down
1 change: 1 addition & 0 deletions common/sealable-trie/src/nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ impl<'a> ValueRef<'a, bool> {
pub fn sealed(self) -> Self { Self { is_sealed: true, hash: self.hash } }
}


// =============================================================================
// Conversions

Expand Down
1 change: 1 addition & 0 deletions common/sealable-trie/src/proof/serialisation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ fn invalid_data(msg: String) -> io::Error {
io::Error::new(io::ErrorKind::InvalidData, msg)
}


#[test]
fn test_item_borsh() {
#[track_caller]
Expand Down
1 change: 1 addition & 0 deletions common/sealable-trie/src/trie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ impl<A: memory::Allocator<Value = Value>> Trie<A> {
}
}


#[cfg(test)]
impl Trie<memory::test_utils::TestAllocator<Value>> {
/// Creates a test trie using a TestAllocator with given capacity.
Expand Down
1 change: 1 addition & 0 deletions solana/trie-example/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ impl<T> TrieResultExt for Result<T, sealable_trie::trie::Error> {
}
}


/// Instruction to execute.
pub(crate) enum Instruction<'a> {
// Encoding: <include-proof> <key>
Expand Down
3 changes: 3 additions & 0 deletions solana/trie-example/src/trie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ impl<'a, 'b> memory::Allocator for Allocator<'a, 'b> {
}
}



impl<'a, 'b> core::ops::Deref for AccountTrie<'a, 'b> {
type Target = sealable_trie::Trie<Allocator<'a, 'b>>;
fn deref(&self) -> &Self::Target { &self.0 }
Expand Down Expand Up @@ -247,6 +249,7 @@ fn write<const L: usize, const R: usize, const N: usize>(
right
}


#[test]
fn test_header_encoding() {
const ONE: CryptoHash = CryptoHash([1; 32]);
Expand Down

0 comments on commit 4ecf78b

Please sign in to comment.