-
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
Update eth-bridge-integration
to v0.8.1
#704
Update eth-bridge-integration
to v0.8.1
#704
Conversation
…y won't start however
This inverts the wrapping of errors, storage_api::Error now wraps NativeVp:Error and some other IBC and PoS custom errors
eab5cad
to
bd1cdd8
Compare
…terop/ethbridge/merge-0.8.1 * james/mainline/dont-spawn-internal-account-vps: Remove comment Update spawn_accounts to ignore implicit addresses Add changelog TestTxEnv::spawn_accounts should ignore internal addresses
pls update wasm |
pls update wasm |
4e26648
to
8ae9563
Compare
# TODO temp patch for <https://github.com/near/borsh-rs/issues/82>, <https://github.com/near/borsh-rs/issues/84> and more tba. | ||
borsh = {git = "https://github.com/heliaxdev/borsh-rs.git", rev = "cd5223e5103c4f139e0c54cf8259b7ec5ec4073a"} | ||
borsh-derive = {git = "https://github.com/heliaxdev/borsh-rs.git", rev = "cd5223e5103c4f139e0c54cf8259b7ec5ec4073a"} | ||
borsh-derive-internal = {git = "https://github.com/heliaxdev/borsh-rs.git", rev = "cd5223e5103c4f139e0c54cf8259b7ec5ec4073a"} | ||
borsh-schema-derive-internal = {git = "https://github.com/heliaxdev/borsh-rs.git", rev = "cd5223e5103c4f139e0c54cf8259b7ec5ec4073a"} | ||
# The following 3 crates patch a work-around for https://github.com/smol-rs/polling/issues/38 breaking namada tooling build with nightly 2022-05-20 | ||
polling = {git = "https://github.com/heliaxdev/polling.git", rev = "02a655775282879459a3460e2646b60c005bca2c"} |
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'm so unhappy that this is how they decided to deal with this issue. If we had just frozen the minor version, we wouldn't need such a heavy handed workaround
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 it's a bit hacky
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 this can actually be dropped now since we removed the intent gossiper/matchmaker with libp2p that was pulling these in
ark-serialize = "0.3.0" | ||
ark-std = "0.3.0" | ||
# branch = "bat/arse-merkle-tree" | ||
arse-merkle-tree = {package = "sparse-merkle-tree", git = "https://github.com/heliaxdev/sparse-merkle-tree", rev = "04ad1eeb28901b57a7599bbe433b3822965dabe8", features = ["std", "borsh"]} |
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.
alphabetization stronk
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 should actually have this as a lint or something on our Cargo.toml
s. Would reduce merge conflicts in the future
@@ -191,17 +191,36 @@ fn address_list(ctx: Context) { | |||
} | |||
} | |||
|
|||
/// Find address by its alias. | |||
fn address_find(ctx: Context, args: args::AddressFind) { | |||
/// Find address (alias) by its alias (address). |
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.
perplexing docstring
@@ -345,10 +333,31 @@ pub async fn join_network( | |||
.await | |||
.unwrap(); | |||
} | |||
if !dont_prefetch_wasm { |
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.
Double negatives. Tsk tsk
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 have a style guide around this.
use namada::types::transaction::protocol::ProtocolTxType; | ||
|
||
use super::queries::QueriesExt; | ||
use super::governance::execute_governance_proposals; |
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.
super::*
should come first
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 actually gets reordered by rustfmt
if I try to put super::*
first. We should update the rustfmt
settings if we want to enforce this
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.
generally, anything that does a star import should come first in the list of imports, IMO
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.
Sure, we could PR a suggestion to change rustfmt
settings in main
to do this
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.
left a few comments. generally, I think it's fine to merge this, but some things should be changed after the merge IMO
@@ -56,7 +55,7 @@ fn run_ledger() -> Result<()> { | |||
let mut ledger = | |||
run_as!(test, Who::NonValidator, Bin::Node, args, Some(40))?; | |||
ledger.exp_string("Anoma ledger node started")?; | |||
ledger.exp_string("This node is a fullnode")?; | |||
ledger.exp_string("This node is not a validator")?; |
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 preferred This node is a fullnode
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.
no preference though we should have some helper func or something to centralize this check, atm these lines are duplicated in a few places
client.exp_string( | ||
"Invalid proposal end epoch: difference between proposal start and \ | ||
end epoch must be at least 3 and at max 27 and end epoch must be a \ | ||
multiple of 3", | ||
)?; |
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.
inb4 this test fails in the future because this specific log string changes
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 shouldn't be testing by asserting on log strings imo. Right now this is the way it currently is though
validator_0_copy.exp_string("Anoma ledger node started")?; | ||
validator_0_copy.exp_string("This node is a validator")?; | ||
let _bg_validator_0_copy = validator_0_copy.background(); | ||
|
||
// 5. Submit a valid token transfer tx to validator 0 | ||
let validator_one_rpc = get_actor_rpc(&test, &Who::Validator(0)); | ||
let tx_args = [ | ||
"transfer", | ||
"--source", | ||
BERTHA, | ||
"--target", | ||
ALBERT, | ||
"--token", | ||
XAN, | ||
"--amount", | ||
"10.1", | ||
"--fee-amount", | ||
"0", | ||
"--gas-limit", | ||
"0", | ||
"--fee-token", | ||
XAN, | ||
"--ledger-address", | ||
&validator_one_rpc, | ||
]; |
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 think this code allows you to run into #644
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.
we should check if the rpc server has started, no?
let mut client = run!(test, Bin::Client, tx_args, Some(40))?; | ||
client.exp_string("Transaction is valid.")?; | ||
client.assert_success(); |
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.
should be checking if the tx was applied. Transaction is valid
gets logged for accepted and applied txs
pub struct LazyMap<K, V, SON = super::Simple> { | ||
key: storage::Key, | ||
phantom_k: PhantomData<K>, | ||
phantom_v: PhantomData<V>, | ||
phantom_son: PhantomData<SON>, | ||
} |
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.
nice. this will be useful for some refactors
} | ||
Sub::SubscribeTopic(SubscribeTopic(args)) => { | ||
gossip::subscribe_topic(ctx, args).await; | ||
} | ||
} | ||
} | ||
cli::AnomaClient::WithoutContext(cmd, global_args) => match cmd { |
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.
cli::AnomaClient::WithoutContext(cmd, global_args) => match cmd { | |
cli::NamadaClient::WithoutContext(cmd, global_args) => match cmd { |
eventually we should update these idents
use namada::types::transaction::Fee; | ||
use tempfile::tempdir; | ||
use tokio::sync::mpsc::{Sender, UnboundedReceiver}; | ||
|
||
use super::*; | ||
#[cfg(feature = "abciplus")] |
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.
#[cfg(feature = "abciplus")] | |
#[cfg(not(feature = "abcipp"))] |
we should follow the general pattern of the shims. we don't use abciplus
anywhere else I don't think
@@ -28,7 +30,7 @@ pub const ENV_VAR_TM_STDOUT: &str = "ANOMA_TM_STDOUT"; | |||
|
|||
#[cfg(feature = "abciplus")] | |||
pub const VERSION_REQUIREMENTS: &str = ">= 0.37.0-alpha.2, <0.38.0"; | |||
#[cfg(feature = "abcipp")] | |||
#[cfg(not(feature = "abciplus"))] |
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.
same thing here
Closes #673
This PR merges v0.8.1 into
eth-bridge-integration
, and fixes things up.This PR also merges #694 to fix a wasm test that was failing in
eth-bridge-integration
, so that CI can pass on this PRPrebuilt
.anoma
that works with this PR:local.32dd1d2fd99d3dcdb3c159cd.prebuilt.tar.gz