Skip to content

Commit

Permalink
Reexport useful traits and types (#500)
Browse files Browse the repository at this point in the history
  • Loading branch information
timorleph authored Nov 29, 2024
1 parent 1173cf6 commit 2581824
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ More details are available [in the book][reference-link-implementation-details].
- Import AlephBFT in your crate
```toml
[dependencies]
aleph-bft = "^0.38"
aleph-bft = "^0.39"
```
- The main entry point is the `run_session` function, which returns a Future that runs the
consensus algorithm.
Expand Down
2 changes: 1 addition & 1 deletion consensus/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aleph-bft"
version = "0.38.2"
version = "0.39.0"
edition = "2021"
authors = ["Cardinal Cryptography"]
categories = ["algorithms", "data-structures", "cryptography", "database"]
Expand Down
3 changes: 1 addition & 2 deletions consensus/src/extension/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
use crate::{dag::DagUnit, MultiKeychain};
use crate::{dag::DagUnit, MultiKeychain, UnitFinalizationHandler};

mod election;
mod extender;
mod units;

use aleph_bft_types::UnitFinalizationHandler;
use extender::Extender;

/// A struct responsible for executing the Consensus protocol on a local copy of the Dag.
Expand Down
9 changes: 5 additions & 4 deletions consensus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ mod task_queue;
mod testing;

pub use aleph_bft_types::{
Data, DataProvider, Hasher, IncompleteMultisignatureError, Index, Indexed, Keychain,
MultiKeychain, Multisigned, Network, NodeCount, NodeIndex, NodeMap, NodeSubset,
PartialMultisignature, PartiallyMultisigned, Recipient, Round, SessionId, Signable, Signature,
SignatureError, SignatureSet, Signed, SpawnHandle, TaskHandle, UncheckedSigned,
Data, DataProvider, FinalizationHandler, Hasher, IncompleteMultisignatureError, Index, Indexed,
Keychain, MultiKeychain, Multisigned, Network, NodeCount, NodeIndex, NodeMap, NodeSubset,
OrderedUnit, PartialMultisignature, PartiallyMultisigned, Recipient, Round, SessionId,
Signable, Signature, SignatureError, SignatureSet, Signed, SpawnHandle, TaskHandle,
UncheckedSigned, UnitFinalizationHandler,
};
pub use config::{
create_config, default_config, default_delay_config, exponential_slowdown, Config, DelayConfig,
Expand Down
7 changes: 4 additions & 3 deletions consensus/src/member.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ use crate::{
},
task_queue::TaskQueue,
units::{UncheckedSignedUnit, Unit, UnitCoord},
Config, Data, DataProvider, Hasher, MultiKeychain, Network, NodeIndex, Receiver, Recipient,
Round, Sender, Signature, SpawnHandle, Terminator, UncheckedSigned,
Config, Data, DataProvider, FinalizationHandler, Hasher, MultiKeychain, Network, NodeIndex,
OrderedUnit, Receiver, Recipient, Round, Sender, Signature, SpawnHandle, Terminator,
UncheckedSigned, UnitFinalizationHandler,
};
use aleph_bft_types::{FinalizationHandler, NodeMap, OrderedUnit, UnitFinalizationHandler};
use aleph_bft_types::NodeMap;
use codec::{Decode, Encode};
use futures::{channel::mpsc, pin_mut, AsyncRead, AsyncWrite, FutureExt, StreamExt};
use futures_timer::Delay;
Expand Down
6 changes: 3 additions & 3 deletions consensus/src/runway/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ use crate::{
SignedUnit, UncheckedSignedUnit, Unit, UnitCoord, UnitStore, UnitStoreStatus, Validator,
WrappedUnit,
},
Config, Data, DataProvider, Hasher, Index, Keychain, MultiKeychain, NodeIndex, Receiver, Round,
Sender, Signature, SpawnHandle, Terminator, UncheckedSigned,
Config, Data, DataProvider, Hasher, Index, Keychain, MultiKeychain, NodeIndex, Receiver,
Recipient, Round, Sender, Signature, SpawnHandle, Terminator, UncheckedSigned,
UnitFinalizationHandler,
};
use aleph_bft_types::{Recipient, UnitFinalizationHandler};
use futures::{
channel::{mpsc, oneshot},
future::pending,
Expand Down
3 changes: 1 addition & 2 deletions consensus/src/testing/dag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ use crate::{
ControlHash, FullUnit, PreUnit, SignedUnit as GenericSignedUnit, Unit, UnitStore,
UnitWithParents as _, Validator,
},
NodeCount, NodeIndex, NodeMap, NodeSubset, Round, Signed,
NodeCount, NodeIndex, NodeMap, NodeSubset, OrderedUnit, Round, Signed, UnitFinalizationHandler,
};
use aleph_bft_mock::{Data, Hash64, Hasher64, Keychain};
use aleph_bft_types::{OrderedUnit, UnitFinalizationHandler};
use log::debug;
use parking_lot::Mutex;
use rand::{distributions::Open01, prelude::*};
Expand Down

0 comments on commit 2581824

Please sign in to comment.