Skip to content
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

versioning #1637

Merged
merged 52 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
0555b0b
Replace public header fields with getters
jbearer May 23, 2024
f605483
WIP upgradable types
jbearer May 28, 2024
8adbdfd
v2
imabdulbasit Jun 24, 2024
365d884
merge origin/main
imabdulbasit Jun 24, 2024
0f225bb
Merge branch 'main' into ab/ver
imabdulbasit Jun 24, 2024
9896587
cargo sort
imabdulbasit Jun 24, 2024
6e2e9e6
block impls
imabdulbasit Jun 25, 2024
ad046c3
remove unused imports
imabdulbasit Jun 25, 2024
278f1fb
export types
imabdulbasit Jun 25, 2024
82ec12f
group imports
imabdulbasit Jun 25, 2024
bcff34a
v3 header
imabdulbasit Jun 25, 2024
eac798d
lint
imabdulbasit Jun 25, 2024
69fce8b
remove v2 header definition
imabdulbasit Jun 25, 2024
8819268
move crates to workspace
imabdulbasit Jun 25, 2024
4dae934
remove types from sequencer crate
imabdulbasit Jun 26, 2024
26876bc
group imports
imabdulbasit Jun 26, 2024
aaa6f11
serialization
imabdulbasit Jul 1, 2024
0fc4398
fix test
imabdulbasit Jul 1, 2024
df2b9b5
fix deserialization
imabdulbasit Jul 2, 2024
0dbc44b
Merge remote-tracking branch 'origin/main' into ab/ver
imabdulbasit Jul 2, 2024
43d9331
cargo sort
imabdulbasit Jul 2, 2024
d68d146
lint
imabdulbasit Jul 2, 2024
013a32c
fix payload::empty()
imabdulbasit Jul 2, 2024
2c28e6c
fix: visit_map deserialization
imabdulbasit Jul 2, 2024
daeb6c4
use serde_json map
imabdulbasit Jul 2, 2024
4815708
cargo sort
imabdulbasit Jul 2, 2024
7d197dd
Merge branch 'main' into ab/ver
imabdulbasit Jul 2, 2024
420af73
fix ResolvableChainConfigOrVersion deserialization
imabdulbasit Jul 2, 2024
41d0bd9
Merge remote-tracking branch 'origin/main' into ab/ver
imabdulbasit Jul 3, 2024
179d80a
move out traits and errors
imabdulbasit Jul 3, 2024
639a903
fix imports
imabdulbasit Jul 3, 2024
7fa7f20
move errors into impls
imabdulbasit Jul 8, 2024
d0ac37b
Merge remote-tracking branch 'origin/main' into ab/ver
imabdulbasit Jul 8, 2024
1dc9da5
remove ResolvableChainConfig and generic parameters from EitherOrVersion
imabdulbasit Jul 9, 2024
18531d2
remove committable trait implementation for v1 Header
imabdulbasit Jul 9, 2024
faf5f1f
add comments for VersionedHeader
imabdulbasit Jul 9, 2024
7f3b541
remove StructFields enum
imabdulbasit Jul 10, 2024
02c9c0e
add reference tests for v1, v2, and v3 header
imabdulbasit Jul 10, 2024
95b06ab
move reference_tests to types crate
imabdulbasit Jul 10, 2024
c7d93df
fix: v2 and v3 reference test
imabdulbasit Jul 10, 2024
8c8b193
Merge remote-tracking branch 'origin/main' into ab/ver
imabdulbasit Jul 10, 2024
e7a2926
fix comments
imabdulbasit Jul 10, 2024
5a5a4da
add comments for Header::genesis()
imabdulbasit Jul 10, 2024
bfbf42f
add comments for Header::create panic
imabdulbasit Jul 10, 2024
2676df2
add comment for global error issue
imabdulbasit Jul 10, 2024
27e928f
add comment for global error issue
imabdulbasit Jul 10, 2024
1127c84
build genesis header for the current sequencer version
imabdulbasit Jul 10, 2024
bfa3d9c
version sub-directories for data dir
imabdulbasit Jul 10, 2024
4aad7ba
move messages.json and messages.bin to data dir
imabdulbasit Jul 10, 2024
be85894
update data readme
imabdulbasit Jul 10, 2024
a6cec5e
cargo update
imabdulbasit Jul 10, 2024
d2b7b51
include sub dirs binaries in gitignore
imabdulbasit Jul 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cargo/config
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[net]
git-fetch-with-cli = true
git-fetch-with-cli = true
56 changes: 56 additions & 0 deletions Cargo.lock

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

10 changes: 9 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ members = [
"contracts/rust/gen-vk-contract",
"hotshot-state-prover",
"sequencer",
"types",
"utils",
]

Expand Down Expand Up @@ -106,14 +107,14 @@ surf-disco = "0.9"
tagged-base64 = "0.4"
tide-disco = "0.9"
thiserror = "1.0.61"
time = "0.3"
tracing = "0.1"
bytesize = "1.3"
itertools = "0.12"
rand_chacha = "0.3"
rand_distr = "0.4"
reqwest = "0.12"
serde = { version = "1.0.195", features = ["derive"] }
serde_json = "^1.0.113"
toml = "0.8"
url = "2.3"
vbs = "0.1"
Expand All @@ -123,3 +124,10 @@ zeroize = "1.7"
committable = "0.2"
portpicker = "0.1.1"
pretty_assertions = "1.4"
static_assertions = "1.1"
num-traits = "0.2"
derivative = "2.2"
paste = "1.0"
rand = "0.8.5"
time = "0.3"
trait-set = "0.3.0"
1 change: 1 addition & 0 deletions builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ cld = { workspace = true }
committable = { workspace = true }
dotenvy = { workspace = true }
es-version = { workspace = true }
espresso-types = { path = "../types", features = ["testing"] }
ethers = { workspace = true }
futures = { workspace = true }
hotshot = { workspace = true }
Expand Down
39 changes: 14 additions & 25 deletions builder/src/bin/permissioned-builder.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
use std::{
collections::HashMap, net::ToSocketAddrs, num::NonZeroUsize, path::PathBuf, time::Duration,
};

use anyhow::{bail, Context};
use async_compatibility_layer::logging::{setup_backtrace, setup_logging};
use builder::permissioned::init_node;
use clap::Parser;
use cld::ClDuration;
use es_version::SEQUENCER_VERSION;
use espresso_types::eth_signature_key::EthKeyPair;
use ethers::types::Address;
use hotshot_types::data::ViewNumber;
use hotshot_types::light_client::StateSignKey;
use hotshot_types::signature_key::BLSPrivKey;
use hotshot_types::traits::metrics::NoMetrics;
use hotshot_types::traits::node_implementation::ConsensusTime;
use hotshot_types::{
data::ViewNumber,
light_client::StateSignKey,
signature_key::BLSPrivKey,
traits::{metrics::NoMetrics, node_implementation::ConsensusTime},
};
use libp2p::Multiaddr;
use sequencer::persistence::no_storage::NoStorage;
use sequencer::{eth_signature_key::EthKeyPair, Genesis};
use sequencer::{L1Params, NetworkParams};
use snafu::Snafu;
use std::net::ToSocketAddrs;
use std::num::NonZeroUsize;
use std::{collections::HashMap, path::PathBuf, str::FromStr, time::Duration};
use sequencer::{
options::parse_duration, persistence::no_storage::NoStorage, Genesis, L1Params, NetworkParams,
};
use url::Url;

#[derive(Parser, Clone, Debug)]
Expand Down Expand Up @@ -189,18 +190,6 @@ pub struct PermissionedBuilderOptions {
pub is_da: bool,
}

#[derive(Clone, Debug, Snafu)]
pub struct ParseDurationError {
reason: String,
}

pub fn parse_duration(s: &str) -> Result<Duration, ParseDurationError> {
ClDuration::from_str(s)
.map(Duration::from)
.map_err(|err| ParseDurationError {
reason: err.to_string(),
})
}
impl PermissionedBuilderOptions {
pub fn private_keys(&self) -> anyhow::Result<(BLSPrivKey, StateSignKey)> {
if let Some(path) = &self.key_file {
Expand Down
10 changes: 5 additions & 5 deletions builder/src/bin/permissionless-builder.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use std::{num::NonZeroUsize, path::PathBuf, str::FromStr, time::Duration};

use async_compatibility_layer::logging::{setup_backtrace, setup_logging};
use builder::non_permissioned::{build_instance_state, BuilderConfig};
use clap::Parser;
use cld::ClDuration;
use es_version::SEQUENCER_VERSION;
use espresso_types::eth_signature_key::EthKeyPair;
use hotshot::traits::ValidatedState;
use hotshot_types::data::ViewNumber;
use hotshot_types::traits::node_implementation::ConsensusTime;
use sequencer::{eth_signature_key::EthKeyPair, Genesis, L1Params};
use hotshot_types::{data::ViewNumber, traits::node_implementation::ConsensusTime};
use sequencer::{Genesis, L1Params};
use snafu::Snafu;
use std::num::NonZeroUsize;
use std::{path::PathBuf, str::FromStr, time::Duration};
use url::Url;

#[derive(Parser, Clone, Debug)]
Expand Down
Loading
Loading