-
Notifications
You must be signed in to change notification settings - Fork 992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge 0.9.0 into eth-bridge-integration #723
Merge 0.9.0 into eth-bridge-integration #723
Conversation
Update Namada Specs
This adds a new feature "async-client" and "tendermint-rpc" to shared crate that if enabled generate async client code for all router's handler methods, and implements it for tendermint-rpc client, respectively.
…ker' (#678) * fraccaman/ci-docs-cache: ci: invalide cf cache * fraccaman/ci-linker: ci: use mold linker
…/merge-0.9.0 * tomas/storage-read-height-bug: changelog: add #706 config: add `shell.storage_read_past_height_limit`, use it for queries storage: fix block heights used in read, write and delete rocksdb: fix delete_subspace_val diff write rocksdb: fix read_subspace_val_with_height test/storage: add a test for reading from arbitrary block heights # Conflicts: # apps/src/lib/node/ledger/shell/mod.rs
…0.9.0 * eth-bridge-integration: (194 commits) [c hore]: rebasing Update shared/src/types/key/secp256k1.rs Update shared/src/types/vote_extensions/validator_set_update.rs [fix]: Adding changes from code review Update shared/src/types/eth_bridge_pool.rs [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs [fix]: Removed duplicated code block [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs [chore]: rebasing on eth-bridge-integration [chore]: Rebase on previous branches [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs rebasing [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs [fix]: Removed duplicated code block [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs [feat]: Added recovery ids to secp256k1 signatures [chore]: Upgrading to v0.8 [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs [chore]: rebasing on changes from previous feature prs [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs rebasing [feat]: Added val set args for relaying to ethereum [feat]: Corrected the abi encodings of bridge proofs [fix]: Fixed bug that produced proof for values not in the bridge pool and covered with test [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs [feat]: Updated bridge pool vp with the the new merklized storage [chore]: Rebased onto PR #573 [feat]: Changed the bridge pool vp to used the merklized storage [feat]: Updated bridge pool vp with the the new merklized storage [feat]: Changed the bridge pool vp to used the merklized storage [feat]: Updated bridge pool vp with the the new merklized storage [chore]: Rebasing on v0.8 [fix]: Tiny from code review [fix]: Some more error logging and formatting Update shared/src/ledger/eth_bridge/vp/mod.rs [feat]: Added checks the bridge pool vp that erc20 tokens are escrowed to its account [feat]: Bridge pool vp now checks that funds to be transferred are escrowed. Needs tests [fix]: Tiny from code review [fix]: Some more error logging and formatting Update shared/src/ledger/eth_bridge/vp/mod.rs [feat]: Added a nomralized voting power type Update shared/src/types/key/secp256k1.rs Update shared/src/types/vote_extensions/validator_set_update.rs [fix]: Adding changes from code review Update shared/src/types/eth_bridge_pool.rs [feat]: Added checks the bridge pool vp that erc20 tokens are escrowed to its account Rename fvp to voting_power [chore]: Formatting [feat]: Bridge pool vp now checks that funds to be transferred are escrowed. Needs tests [chore]: Formatting [chore]: rebasing on eth-bridge-integration Remove TODO item [chore]: Rebase on previous branches [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs [feat]: Added recovery ids to secp256k1 signatures [chore]: Added unit tests to the queries and fixed bugs it found [feat]: Added query end points to get the contents of the eth bridge pool and request merkle proofs ... # Conflicts: # Cargo.lock # apps/src/lib/node/ledger/rpc.rs # apps/src/lib/node/ledger/shell/queries.rs # shared/src/ledger/eth_bridge/bridge_pool_vp.rs # shared/src/ledger/protocol/transactions/ethereum_events/eth_msgs.rs # shared/src/ledger/protocol/transactions/ethereum_events/mod.rs # shared/src/ledger/protocol/transactions/votes.rs # shared/src/ledger/storage/mod.rs # wasm/checksums.json
Current status: refactoring of bridge pool query endpoints to work with the new RPC router is WIP, some tests are still broken. There are still some conflicts with latest |
Compiling with |
pls update wasm |
ed55261
to
25c3a3e
Compare
shared/src/ledger/events.rs
Outdated
@@ -153,7 +162,7 @@ impl From<ProposalEvent> for Event { | |||
} | |||
|
|||
/// Convert our custom event into the necessary tendermint proto type | |||
impl From<Event> for crate::facade::tendermint_proto::abci::Event { | |||
impl From<Event> for tendermint_proto::abci::Event { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be crate::facade::tendermint_proto::abci::Event
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no facade
module in shared
(currently), though there is something similar in shared/lib.rs
Lines 9 to 16 in 6cbce4a
#[cfg(not(feature = "abcipp"))] | |
pub use {ibc, ibc_proto, tendermint, tendermint_proto}; | |
#[cfg(feature = "abcipp")] | |
pub use { | |
ibc_abcipp as ibc, ibc_proto_abcipp as ibc_proto, | |
tendermint_abcipp as tendermint, | |
tendermint_proto_abcipp as tendermint_proto, | |
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh right, this isn't in apps
... yeah, we can use crate::<dep>
inside of shared/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, this should be using that, will update
// use `storage_has_key` instead of `storage_value`, because `storage_value` | ||
// returns 0 bytes when the key is not found. | ||
let maybe_unit = T::try_from_slice(&[]); | ||
if let Ok(unit) = maybe_unit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow. what a hack 😆
@@ -103,13 +104,48 @@ pub fn keccak_hash(bytes: &[u8]) -> KeccakHash { | |||
|
|||
/// This module defines encoding methods compatible with Ethereum | |||
/// smart contracts. | |||
// TODO: relocate this sub-module to a new home |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been thinking about this for a while too. Maybe we should just have an ABI mod which has both encode and keccak submods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question really.
_marker: PhantomData<*const T>, | ||
} | ||
|
||
impl<T> EncodeCell<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is interesting. Should we change the return type of the Encode::encode
method to return an instance of this struct? @sug0 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, we could do that, and introduce an encode_raw()
that simply "unwraps" the cell
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it.
@@ -148,6 +149,63 @@ pub fn get_epoch(test: &Test, ledger_address: &str) -> Result<Epoch> { | |||
Ok(Epoch(epoch)) | |||
} | |||
|
|||
/// Get the last committed block height. | |||
pub fn get_height(test: &Test, ledger_address: &str) -> Result<u64> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wip, still needs rpc reimplemented