Skip to content

Commit

Permalink
Merge pull request #217 from EspressoSystems/hotshot/rc-0.5.79
Browse files Browse the repository at this point in the history
[WEEKLY RELEASE] HotShot - rc-0.5.79
  • Loading branch information
dailinsubjam authored Oct 30, 2024
2 parents 7623029 + 85e108d commit efdf2cc
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 38 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"'
Expand Down
57 changes: 35 additions & 22 deletions Cargo.lock

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

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
23 changes: 15 additions & 8 deletions crates/legacy/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
},
Expand Down Expand Up @@ -1423,7 +1423,10 @@ impl<Types: NodeType> HandleReceivedTxns<Types> {
}
}

impl<Types: NodeType> Iterator for HandleReceivedTxns<Types> {
impl<Types: NodeType> Iterator for HandleReceivedTxns<Types>
where
Types::Transaction: Transaction,
{
type Item =
Result<Commitment<<Types as NodeType>::Transaction>, HandleReceivedTxnsError<Types>>;

Expand All @@ -1446,7 +1449,7 @@ impl<Types: NodeType> Iterator for HandleReceivedTxns<Types> {
// 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");
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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());
Expand All @@ -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);
Expand Down Expand Up @@ -4396,7 +4403,7 @@ mod test {
tx_sender,
txns.clone(),
TransactionSource::HotShot,
10,
TEST_MAX_TX_LEN,
);

match handle_received_txns_iter.next() {
Expand Down Expand Up @@ -4441,7 +4448,7 @@ mod test {
tx_sender,
txns.clone(),
TransactionSource::HotShot,
10,
TEST_MAX_TX_LEN,
);

for iteration in handle_received_txns_iter {
Expand Down

0 comments on commit efdf2cc

Please sign in to comment.