diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d99b1534..e1577cfc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,6 +43,7 @@ jobs: timeout-minutes: 60 test-ignored: + if: false runs-on: ubuntu-latest env: RUSTFLAGS: '--cfg async_executor_impl="async-std" --cfg async_channel_impl="async-std"' diff --git a/Cargo.lock b/Cargo.lock index cc5099dc..9572817c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3004,8 +3004,8 @@ dependencies = [ [[package]] name = "hotshot" -version = "0.5.78" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.78-patch4#e8abb17d990560d6c92489522d218b99d2089db3" +version = "0.5.79" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.79#f942200b8ae31038d55cc1a45d2f780bc13de458" dependencies = [ "anyhow", "async-broadcast", @@ -3046,13 +3046,14 @@ dependencies = [ "tokio", "tracing", "url", + "utils", "vbs", ] [[package]] name = "hotshot-builder-api" version = "0.1.7" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.78-patch4#e8abb17d990560d6c92489522d218b99d2089db3" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.79#f942200b8ae31038d55cc1a45d2f780bc13de458" dependencies = [ "async-trait", "clap", @@ -3105,7 +3106,7 @@ dependencies = [ [[package]] name = "hotshot-events-service" version = "0.1.49" -source = "git+https://github.com/EspressoSystems/hotshot-events-service.git?tag=0.1.51#8d4092ef01a5a6c9151df4a29fa3218726f91016" +source = "git+https://github.com/EspressoSystems/hotshot-events-service.git?tag=0.1.52#95ef82a7f5ffeab18df34a697bef35f2319971d0" dependencies = [ "async-broadcast", "async-compatibility-layer", @@ -3130,8 +3131,8 @@ dependencies = [ [[package]] name = "hotshot-example-types" -version = "0.5.78" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.78-patch4#e8abb17d990560d6c92489522d218b99d2089db3" +version = "0.5.79" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.79#f942200b8ae31038d55cc1a45d2f780bc13de458" dependencies = [ "anyhow", "async-broadcast", @@ -3145,6 +3146,7 @@ dependencies = [ "ethereum-types", "futures", "hotshot", + "hotshot-builder-api", "hotshot-task", "hotshot-task-impls", "hotshot-types", @@ -3163,8 +3165,8 @@ dependencies = [ [[package]] name = "hotshot-fakeapi" -version = "0.5.78" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.78-patch4#e8abb17d990560d6c92489522d218b99d2089db3" +version = "0.5.79" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.79#f942200b8ae31038d55cc1a45d2f780bc13de458" dependencies = [ "anyhow", "async-compatibility-layer", @@ -3183,8 +3185,8 @@ dependencies = [ [[package]] name = "hotshot-macros" -version = "0.5.78" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.78-patch4#e8abb17d990560d6c92489522d218b99d2089db3" +version = "0.5.79" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.79#f942200b8ae31038d55cc1a45d2f780bc13de458" dependencies = [ "derive_builder", "proc-macro2", @@ -3194,8 +3196,8 @@ dependencies = [ [[package]] name = "hotshot-orchestrator" -version = "0.5.78" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.78-patch4#e8abb17d990560d6c92489522d218b99d2089db3" +version = "0.5.79" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.79#f942200b8ae31038d55cc1a45d2f780bc13de458" dependencies = [ "anyhow", "async-compatibility-layer", @@ -3223,8 +3225,8 @@ dependencies = [ [[package]] name = "hotshot-task" -version = "0.5.78" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.78-patch4#e8abb17d990560d6c92489522d218b99d2089db3" +version = "0.5.79" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.79#f942200b8ae31038d55cc1a45d2f780bc13de458" dependencies = [ "anyhow", "async-broadcast", @@ -3234,12 +3236,13 @@ dependencies = [ "futures", "tokio", "tracing", + "utils", ] [[package]] name = "hotshot-task-impls" -version = "0.5.78" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.78-patch4#e8abb17d990560d6c92489522d218b99d2089db3" +version = "0.5.79" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.79#f942200b8ae31038d55cc1a45d2f780bc13de458" dependencies = [ "anyhow", "async-broadcast", @@ -3269,14 +3272,15 @@ dependencies = [ "tokio", "tracing", "url", + "utils", "vbs", "vec1", ] [[package]] name = "hotshot-testing" -version = "0.5.78" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.78-patch4#e8abb17d990560d6c92489522d218b99d2089db3" +version = "0.5.79" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.79#f942200b8ae31038d55cc1a45d2f780bc13de458" dependencies = [ "anyhow", "async-broadcast", @@ -3322,7 +3326,7 @@ dependencies = [ [[package]] name = "hotshot-types" version = "0.1.11" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.78-patch4#e8abb17d990560d6c92489522d218b99d2089db3" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.79#f942200b8ae31038d55cc1a45d2f780bc13de458" dependencies = [ "anyhow", "ark-bn254", @@ -3374,6 +3378,7 @@ dependencies = [ "tracing", "typenum", "url", + "utils", "vbs", "vec1", ] @@ -3503,7 +3508,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite 0.2.14", - "socket2 0.4.10", + "socket2 0.5.7", "tokio", "tower-service", "tracing", @@ -4387,8 +4392,8 @@ dependencies = [ [[package]] name = "libp2p-networking" -version = "0.5.78" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.78-patch4#e8abb17d990560d6c92489522d218b99d2089db3" +version = "0.5.79" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.79#f942200b8ae31038d55cc1a45d2f780bc13de458" dependencies = [ "anyhow", "async-compatibility-layer", @@ -8202,6 +8207,14 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "utils" +version = "0.5.79" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.79#f942200b8ae31038d55cc1a45d2f780bc13de458" +dependencies = [ + "tracing", +] + [[package]] name = "uuid" version = "1.10.0" diff --git a/Cargo.toml b/Cargo.toml index e2850c96..4aa5c12d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,14 +3,14 @@ resolver = "2" members = ["crates/*"] [workspace.dependencies] -hotshot = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78-patch4" } -hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78-patch4" } -hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", tag = "0.1.51" } -hotshot-macros = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78-patch4" } -hotshot-task-impls = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78-patch4" } -hotshot-testing = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78-patch4" } -hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78-patch4" } -hotshot-example-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78-patch4" } +hotshot = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.79" } +hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.79" } +hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", tag = "0.1.52" } +hotshot-macros = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.79" } +hotshot-task-impls = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.79" } +hotshot-testing = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.79" } +hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.79" } +hotshot-example-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.79" } anyhow = "1" async-broadcast = "0.7" diff --git a/crates/legacy/src/service.rs b/crates/legacy/src/service.rs index 8a42e2fa..9c7ad22a 100644 --- a/crates/legacy/src/service.rs +++ b/crates/legacy/src/service.rs @@ -9,7 +9,7 @@ use hotshot_types::{ event::EventType, message::Proposal, traits::{ - block_contents::BlockPayload, + block_contents::{BlockPayload, Transaction}, node_implementation::{ConsensusTime, NodeType}, signature_key::{BuilderSignatureKey, SignatureKey}, }, @@ -1423,7 +1423,10 @@ impl HandleReceivedTxns { } } -impl Iterator for HandleReceivedTxns { +impl Iterator for HandleReceivedTxns +where + Types::Transaction: Transaction, +{ type Item = Result::Transaction>, HandleReceivedTxnsError>; @@ -1446,7 +1449,7 @@ impl Iterator for HandleReceivedTxns { // encoded transaction length. Luckily, this being roughly proportional // to encoded length is enough, because we only use this value to estimate // our limitations on computing the VID in time. - let len = bincode::serialized_size(&tx).unwrap_or_default(); + let len = tx.minimum_block_size(); let max_txn_len = self.max_txn_len; if len > max_txn_len { tracing::warn!(%commit, %len, %max_txn_len, "Transaction too big"); @@ -1540,6 +1543,10 @@ mod test { HandleQuorumEventError, HandleReceivedTxns, ProxyGlobalState, }; + /// A const number on `max_tx_len` to be used consistently spanning all the tests + /// It is set to 1 as current estimation on `TestTransaction` is 1 + const TEST_MAX_TX_LEN: u64 = 1; + // GlobalState Tests // GlobalState::new Tests @@ -4290,7 +4297,7 @@ mod test { tx_sender, txns.clone(), TransactionSource::HotShot, - 10, + TEST_MAX_TX_LEN, ); assert!(handle_received_txns_iter.next().is_some()); @@ -4338,7 +4345,7 @@ mod test { tx_sender, txns.clone(), TransactionSource::HotShot, - 10, + TEST_MAX_TX_LEN, ); assert!(handle_received_txns_iter.next().is_some()); @@ -4350,7 +4357,7 @@ mod test { })) => { // This is expected, assert!(estimated_length >= 256); - assert_eq!(max_txn_len, 10); + assert_eq!(max_txn_len, TEST_MAX_TX_LEN); } Some(Err(err)) => { panic!("Unexpected error: {:?}", err); @@ -4396,7 +4403,7 @@ mod test { tx_sender, txns.clone(), TransactionSource::HotShot, - 10, + TEST_MAX_TX_LEN, ); match handle_received_txns_iter.next() { @@ -4441,7 +4448,7 @@ mod test { tx_sender, txns.clone(), TransactionSource::HotShot, - 10, + TEST_MAX_TX_LEN, ); for iteration in handle_received_txns_iter {