Skip to content

Commit

Permalink
Merge branch 'main' into bf/quick-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bfish713 authored Mar 10, 2025
2 parents 47a84fd + 844b398 commit 23e16ab
Show file tree
Hide file tree
Showing 305 changed files with 5,077 additions and 3,668 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/cargo-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,33 @@ concurrency:
jobs:
cargo-features:
runs-on: ubuntu-latest
strategy:
matrix:
command:
- just check-features-ci
- just check-features-ci --tests
steps:
- uses: taiki-e/install-action@cargo-hack
- uses: taiki-e/install-action@just

- name: Checkout Repository
uses: actions/checkout@v4

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
tool-cache: false
dotnet: false
haskell: false
large-packages: false
docker-images: false
swap-storage: false

# Note: this job doesn't use a cache on purpose because it mostly compiles
# the crates in this repo over and over again with different feature
# combinations. Adding caching would not speed it up much and further
# contribute to our cache usage.

# Includes checks for `--no-default-features` and `--all-features` as well
# as each individual feature enabled.
- name: Check compilation for feature combinations
run: |
cargo hack check --feature-powerset --exclude hotshot --exclude hotshot-builder-api --exclude hotshot-task-impls --exclude hotshot-macros --exclude hotshot-events-service --exclude hotshot-utils --exclude hotshot-orchestrator --exclude hotshot-query-service --exclude hotshot-stake-table --exclude hotshot-state-prover --exclude hotshot-task --exclude hotshot-testing --exclude hotshot-types --exclude hotshot-libp2p-networking --exclude hotshot-contract-adapter --exclude hotshot-example-types --exclude vid
- name: Check compilation for feature combinations (--tests)
# combinations. The target directory gets really large. Adding caching
# would not speed it up much and further contribute to our cache usage.
- name: Check compilation feature combinations
run: |
cargo hack check --feature-powerset --tests --exclude hotshot --exclude hotshot-builder-api --exclude hotshot-task-impls --exclude hotshot-macros --exclude hotshot-events-service --exclude hotshot-utils --exclude hotshot-orchestrator --exclude hotshot-query-service --exclude hotshot-stake-table --exclude hotshot-state-prover --exclude hotshot-task --exclude hotshot-testing --exclude hotshot-types --exclude hotshot-libp2p-networking --exclude hotshot-contract-adapter --exclude hotshot-example-types --exclude vid
${{ matrix.command }}
2 changes: 1 addition & 1 deletion .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
name: Enable Rust Caching
with:
prefix-key: v2-rust
prefix-key: v2-rust-${{ hashFiles('flake.*') }}

- name: Check toolchain versions
run: nix develop --accept-flake-config -c ./scripts/show-toolchain-versions
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ jobs:
- uses: actions/checkout@v4
name: Checkout Repository

- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt

- uses: Swatinem/rust-cache@v2
name: Enable Rust Caching

- name: Format Check
run: cargo fmt -- --check
run: cargo +nightly fmt -- --check

- name: Check (embedded-db)
run: |
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,11 @@ jobs:
version: [02,99]
include:
- version: 02
compose: "-f process-compose.yaml -D"
test-name: test_native_demo_basic

- version: 99
compose: "-f process-compose.yaml -f process-compose-mp.yml -D"
test-name: test_native_demo_upgrade

fail-fast: false
runs-on: ubuntu-latest
steps:
Expand All @@ -242,26 +243,29 @@ jobs:
- name: Install process-compose
run: nix profile install nixpkgs#process-compose

- name: Run Demo-Native ${{matrix.version}}
run: bash -x scripts/demo-native ${{matrix.compose}} --tui=false > ${{ env.PC_LOGS }} 2>&1 &

- name: Test Integration
env:
RUST_LOG: debug
NEXTEST_PROFILE: integration
INTEGRATION_TEST_SEQUENCER_VERSION: ${{ matrix.version }}
run: |
cargo nextest run --archive-file nextest-archive-postgres.tar.zst --verbose --no-fail-fast --nocapture \
--workspace-remap $PWD $(if [ "${{ matrix.version }}" == "2" ]; then echo " smoke"; fi)
--workspace-remap $PWD ${{ matrix.test-name }}
timeout-minutes: 10

- name: Show end of logs
if: always()
run: |
tail -n 1000 ${{ env.PC_LOGS }}
- name: Upload process compose logs
if: always()
uses: actions/upload-artifact@v4
with:
name: process-compose-logs-integration-v${{ matrix.version }}
path: ${{ env.PC_LOGS }}


demo-native:
needs: build-test-bins
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ extend-exclude = [
"contract-bindings-alloy",
"contract-bindings-ethers",
"node-metrics/src/api/node_validator/v0/example_prometheus_metrics_output.txt",
"hotshot-orchestrator/run-config.toml"
"hotshot-orchestrator/run-config.toml",
"hotshot-macros/src/lib.rs"
]
6 changes: 1 addition & 5 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@
# later match takes precedence, they will be requested for review when someone
# opens a pull request.

* @nomaxg @philippecamacho @ImJeremyHe @sveitser @jbearer @tbro @imabdulbasit

# Dependabot PRs
*.toml @nomaxg @philippecamacho @ImJeremyHe @sveitser
*.lock @nomaxg @philippecamacho @ImJeremyHe @sveitser
* @sveitser @jbearer @tbro @imabdulbasit @ss-es @pls148 @bfish713 @rob-maron @lukaszrzasik
1 change: 1 addition & 0 deletions Cargo.lock

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

29 changes: 13 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
# Espresso Sequencer
# Espresso Network

[![Build](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/build.yml/badge.svg)](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/build.yml)
[![Test](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/test.yml/badge.svg)](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/test.yml)
[![Docs rust](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/doc-rust.yml/badge.svg)](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/doc-rust.yml)
[![Contracts](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/contracts.yml/badge.svg)](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/contracts.yml)
[![Lint](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/lint.yml/badge.svg)](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/lint.yml)
[![Audit](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/audit.yml/badge.svg)](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/audit.yml)
[![Ubuntu](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/ubuntu-install-without-nix.yml/badge.svg)](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/ubuntu-install-without-nix.yml)
[![Build without lockfile](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/build-without-lockfile.yml/badge.svg)](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/build-without-lockfile.yml)
[![Coverage Status](https://coveralls.io/repos/github/EspressoSystems/espresso-sequencer/badge.svg?branch=main)](https://coveralls.io/github/EspressoSystems/espresso-sequencer?branch=main)
[![Build](https://github.com/EspressoSystems/espresso-network/actions/workflows/build.yml/badge.svg)](https://github.com/EspressoSystems/espresso-network/actions/workflows/build.yml)
[![Test](https://github.com/EspressoSystems/espresso-network/actions/workflows/test.yml/badge.svg)](https://github.com/EspressoSystems/espresso-network/actions/workflows/test.yml)
[![Docs rust](https://github.com/EspressoSystems/espresso-network/actions/workflows/doc-rust.yml/badge.svg)](https://github.com/EspressoSystems/espresso-network/actions/workflows/doc-rust.yml)
[![Contracts](https://github.com/EspressoSystems/espresso-network/actions/workflows/contracts.yml/badge.svg)](https://github.com/EspressoSystems/espresso-network/actions/workflows/contracts.yml)
[![Lint](https://github.com/EspressoSystems/espresso-network/actions/workflows/lint.yml/badge.svg)](https://github.com/EspressoSystems/espresso-network/actions/workflows/lint.yml)
[![Audit](https://github.com/EspressoSystems/espresso-network/actions/workflows/audit.yml/badge.svg)](https://github.com/EspressoSystems/espresso-network/actions/workflows/audit.yml)
[![Ubuntu](https://github.com/EspressoSystems/espresso-network/actions/workflows/ubuntu-install-without-nix.yml/badge.svg)](https://github.com/EspressoSystems/espresso-network/actions/workflows/ubuntu-install-without-nix.yml)
[![Build without lockfile](https://github.com/EspressoSystems/espresso-network/actions/workflows/build-without-lockfile.yml/badge.svg)](https://github.com/EspressoSystems/espresso-network/actions/workflows/build-without-lockfile.yml)
[![Coverage Status](https://coveralls.io/repos/github/EspressoSystems/espresso-network/badge.svg?branch=main)](https://coveralls.io/github/EspressoSystems/espresso-network?branch=main)

The Espresso Sequencer offers rollups credible neutrality and enhanced interoperability, without compromising on scale.
Consisting of a data availability solution and a decentralized network of nodes that sequences transactions, layer-2
rollups can leverage the Espresso Sequencer to give developers and end users fast confirmations, low (and fair) fees,
and robust infrastructure.
The Espresso Network is the global confirmation layer for rollups in the Ethereum ecosystem. Espresso's [global confirmation layer(GCL)](https://docs.espressosys.com/network) provides agreement on inputs to a collection of composable blockchains, providing a high trust, fast, and verifiable way to process inputs on any chain, providing fast confirmations in return.

[Official Documentation](https://docs.espressosys.com/sequencer/espresso-sequencer-architecture/readme)
[Official Documentation](https://docs.espressosys.com/network/)

### Architecture

Expand All @@ -36,7 +33,7 @@ a dockerized Espresso Sequencer network with an example Layer 2 rollup applicati

# Development

- Obtain code: `git clone git@github.com:EspressoSystems/espresso-sequencer`.
- Obtain code: `git clone git@github.com:EspressoSystems/espresso-network`.
- Make sure [nix](https://nixos.org/download.html) is installed.
- Activate the environment with `nix-shell`, or `nix develop`, or `direnv allow` if using [direnv](https://direnv.net/).
- For installation without nix please see [ubuntu.md](./doc/ubuntu.md).
Expand Down
4 changes: 2 additions & 2 deletions builder/src/bin/permissionless-builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ async fn main() -> anyhow::Result<()> {
match (base, upgrade) {
(FeeVersion::VERSION, MarketplaceVersion::VERSION) => {
run::<SequencerVersions<FeeVersion, MarketplaceVersion>>(genesis, opt).await
}
},
(FeeVersion::VERSION, _) => run::<SequencerVersions<FeeVersion, V0_0>>(genesis, opt).await,
(MarketplaceVersion::VERSION, _) => {
run::<SequencerVersions<MarketplaceVersion, V0_0>>(genesis, opt).await
}
},
_ => panic!(
"Invalid base ({base}) and upgrade ({upgrade}) versions specified in the toml file."
),
Expand Down
21 changes: 11 additions & 10 deletions builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ pub fn run_builder_api_service(url: Url, source: ProxyGlobalState<SeqTypes>) {

#[cfg(test)]
pub mod testing {
use std::{
num::NonZeroUsize,
sync::Arc,
time::{Duration, Instant},
};

use async_lock::RwLock;
use committable::Committable;
use espresso_types::{
Expand Down Expand Up @@ -74,18 +80,13 @@ pub mod testing {
},
HotShotConfig, PeerConfig, ValidatorConfig,
};
use jf_signature::bls_over_bn254::VerKey;
use sequencer::{context::Consensus, network, SequencerApiVersion};
use std::{
num::NonZeroUsize,
sync::Arc,
time::{Duration, Instant},
};
use surf_disco::Client;
use vbs::version::StaticVersion;

use super::*;
use crate::non_permissioned::BuilderConfig;
use jf_signature::bls_over_bn254::VerKey;

#[derive(Clone)]
pub struct HotShotTestConfig {
Expand Down Expand Up @@ -414,10 +415,10 @@ pub mod testing {
{
Ok(response) => {
tracing::info!("Received txn submitted response : {:?}", response);
}
},
Err(e) => {
panic!("Error submitting private transaction {:?}", e);
}
},
}

let seed = [207_u8; 32];
Expand Down Expand Up @@ -514,10 +515,10 @@ pub mod testing {
Ok(response) => {
tracing::info!("Received Builder Key : {:?}", response);
assert_eq!(response, builder_pub_key);
}
},
Err(e) => {
panic!("Error getting builder key {:?}", e);
}
},
}
}
}
6 changes: 2 additions & 4 deletions builder/src/non_permissioned.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{collections::VecDeque, num::NonZeroUsize, time::Duration};
use std::{collections::VecDeque, num::NonZeroUsize, sync::Arc, time::Duration};

use anyhow::Context;
use async_broadcast::broadcast;
Expand All @@ -22,10 +22,8 @@ use hotshot_types::{
node_implementation::Versions, EncodeBytes,
},
};
use marketplace_builder_shared::block::ParentBlockReferences;
use marketplace_builder_shared::utils::EventServiceStream;
use marketplace_builder_shared::{block::ParentBlockReferences, utils::EventServiceStream};
use sequencer::{catchup::StatePeers, L1Params, SequencerApiVersion};
use std::sync::Arc;
use tide_disco::Url;
use tokio::spawn;
use vbs::version::StaticVersionType;
Expand Down
5 changes: 3 additions & 2 deletions client/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::time::Duration;

use anyhow::Context;
use espresso_types::{FeeAccount, FeeAmount, FeeMerkleTree, Header};
use ethers::types::Address;
Expand All @@ -6,7 +8,6 @@ use jf_merkle_tree::{
prelude::{MerkleProof, Sha3Node},
MerkleTreeScheme,
};
use std::time::Duration;
use surf_disco::{
error::ClientError,
socket::{Connection, Unsupported},
Expand Down Expand Up @@ -110,7 +111,7 @@ impl SequencerClient {
} else {
sleep(Duration::from_millis(200)).await;
}
}
},
}
};

Expand Down
Loading

0 comments on commit 23e16ab

Please sign in to comment.