Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into ma/sequencer-catchup
Browse files Browse the repository at this point in the history
  • Loading branch information
sveitser committed Mar 12, 2024
2 parents 25d1585 + 6267bbe commit 7cbf7d5
Show file tree
Hide file tree
Showing 42 changed files with 592 additions and 463 deletions.
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ ESPRESSO_ORCHESTRATOR_PORT=40001
ESPRESSO_ORCHESTRATOR_NUM_NODES=5
ESPRESSO_ORCHESTRATOR_START_DELAY=5s
ESPRESSO_ORCHESTRATOR_NEXT_VIEW_TIMEOUT=30s
ESPRESSO_ORCHESTRATOR_MIN_TRANSACTIONS=1
ESPRESSO_ORCHESTRATOR_MIN_PROPOSE_TIME=0s
ESPRESSO_ORCHESTRATOR_MAX_PROPOSE_TIME=1s
ESPRESSO_ORCHESTRATOR_MIN_TRANSACTIONS=50
ESPRESSO_ORCHESTRATOR_MIN_PROPOSE_TIME=1s
ESPRESSO_ORCHESTRATOR_MAX_PROPOSE_TIME=2s
ESPRESSO_CONSENSUS_SERVER_PORT=40002
ESPRESSO_DA_SERVER_PORT=40003
ESPRESSO_SEQUENCER_DA_SERVER_URL=http://da-server:$ESPRESSO_WEB_SERVER_PORT
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v25
uses: cachix/install-nix-action@v26

- name: Enable Cachix
uses: cachix/cachix-action@v14
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ env:

jobs:
contracts:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- name: Install Nix
uses: cachix/install-nix-action@v25
uses: cachix/install-nix-action@v26

- name: Enable Cachix
uses: cachix/cachix-action@v14
Expand Down Expand Up @@ -70,9 +71,19 @@ jobs:
git status
git diff
- name: Run tests
- name: Build diff-test
run: |
nix develop --accept-flake-config -c cargo build --bin diff-test --release
- name: Run tests (quick version for PR)
if: ${{ github.event_name == 'pull_request' }}
run: |
export FOUNDRY_PROFILE=quick
nix develop --accept-flake-config -c forge test -vvv
- name: Run tests (full version for main)
if: ${{ github.event_name != 'pull_request' }}
run: |
nix develop --accept-flake-config -c forge test -vvv
- name: Gas Report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-demo-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1

- name: Install Nix
uses: cachix/install-nix-action@v25
uses: cachix/install-nix-action@v26

- name: Install process-compose
run: |
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/ubuntu-install-without-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,16 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:
build:
ubuntu:
runs-on: ubuntu-latest
container:
image: ubuntu:latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

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

- name: Install and test
# Execute all lines that start with four spaces, and remove leading 'sudo '
# because we're in a container and already root.
run: |
grep '^ ' doc/ubuntu.md \
| sed 's/^ //' \
| sed 's/^sudo //' \
| bash -exo pipefail
run: scripts/ubuntu-install-test-no-nix
26 changes: 26 additions & 0 deletions .github/workflows/unused-deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on: [push]

name: udeps

env:
RUSTFLAGS: '--cfg async_executor_impl="async-std" --cfg async_channel_impl="async-std"'

jobs:
check:
name: Rust project
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true

- name: Run cargo-udeps
uses: aig787/cargo-udeps-action@v1
with:
version: 'latest'
args: '--all-targets'
2 changes: 1 addition & 1 deletion .github/workflows/update_nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v25
uses: cachix/install-nix-action@v26

- uses: cachix/cachix-action@v14
with:
Expand Down
50 changes: 27 additions & 23 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ async-compatibility-layer = { git = "https://github.com/EspressoSystems/async-co
] }
async-std = "1.12.0"
async-trait = "0.1.77"
base64 = "0.22"
clap = { version = "4.4", features = ["derive", "env"] }
cld = "0.5"
derive_more = "0.99.17"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![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)

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
Expand Down
4 changes: 0 additions & 4 deletions contracts/rust/adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ ark-poly = { workspace = true }
ark-serialize = { workspace = true }
ark-std = { workspace = true }
contract-bindings = { path = "../../../contract-bindings" }
crs = { git = "https://github.com/alxiong/crs" }
diff-test-bn254 = { git = "https://github.com/EspressoSystems/solidity-bn254.git" }
ethers = { version = "2.0.4" }
hotshot-types = { workspace = true }
Expand All @@ -25,9 +24,6 @@ jf-utils = { workspace = true }
num-bigint = { version = "0.4", default-features = false }
num-traits = { version = "0.2", default-features = false }

[dev-dependencies]
hotshot-stake-table = { workspace = true }

[[bin]]
name = "eval-domain"
path = "src/bin/eval_domain.rs"
2 changes: 1 addition & 1 deletion contracts/rust/diff-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ ark-ec = { workspace = true }
ark-ed-on-bn254 = { workspace = true }
ark-ff = { workspace = true }
ark-poly = { workspace = true }
ark-srs = { git = "https://github.com/alxiong/ark-srs", tag = "v0.1.0" }
ark-std = { workspace = true }
clap = { version = "^4.4", features = ["derive"] }
crs = { git = "https://github.com/alxiong/crs" }
diff-test-bn254 = { git = "https://github.com/EspressoSystems/solidity-bn254.git" }
digest = { version = "0.10", default-features = false, features = ["alloc"] }
ethers = { version = "2.0.4" }
Expand Down
2 changes: 1 addition & 1 deletion contracts/rust/gen-vk-contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = { workspace = true }
edition = { workspace = true }

[dependencies]
crs = { git = "https://github.com/alxiong/crs" }
ark-srs = { git = "https://github.com/alxiong/ark-srs", tag = "v0.1.0" }
hotshot-contract-adapter = { path = "../adapter" }
hotshot-stake-table = { workspace = true }
hotshot-state-prover = { path = "../../../hotshot-state-prover" }
Expand Down
4 changes: 2 additions & 2 deletions contracts/rust/gen-vk-contract/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use jf_primitives::pcs::prelude::UnivariateUniversalParams;
fn main() {
let srs = {
// load SRS from Aztec's ceremony
let srs =
crs::aztec20::kzg10_setup(2u64.pow(20) as usize + 2).expect("Aztec SRS fail to load");
let srs = ark_srs::aztec20::kzg10_setup(2u64.pow(20) as usize + 2)
.expect("Aztec SRS fail to load");
// convert to Jellyfish type
// TODO: (alex) use constructor instead https://github.com/EspressoSystems/jellyfish/issues/440
UnivariateUniversalParams {
Expand Down
2 changes: 2 additions & 0 deletions contracts/test/LightClient.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ contract LightClient_newFinalizedState_Test is LightClientCommonTest {

/// @dev Test happy path for (BLOCK_PER_EPOCH + 1) consecutive new finalized blocks
/// forge-config: default.fuzz.runs = 1
/// forge-config: quick.fuzz.runs = 1
/// forge-config: ci.fuzz.runs = 10
function testFuzz_ConsecutiveUpdate(
uint64 numInitValidators,
Expand Down Expand Up @@ -191,6 +192,7 @@ contract LightClient_newFinalizedState_Test is LightClientCommonTest {

/// @dev Test happy path for updating after skipping a few blocks (but not an epoch)
/// forge-config: default.fuzz.runs = 4
/// forge-config: quick.fuzz.runs = 1
/// forge-config: ci.fuzz.runs = 10
function test_UpdateAfterSkippedBlocks(uint32 numBlockSkipped, uint32 numBlockPerEpoch)
external
Expand Down
1 change: 1 addition & 0 deletions contracts/test/PolynomialEval.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ contract PolynomialEval_domainElements_Test is Test {
/// @dev Test if the domain elements are generated correctly
function testFuzz_domainElements_matches(uint256 logSize, uint256 length) external {
logSize = bound(logSize, 16, 20);
length = bound(length, 0, 10000);
Poly.EvalDomain memory domain = Poly.newEvalDomain(2 ** logSize);

if (length > domain.size) {
Expand Down
2 changes: 1 addition & 1 deletion data/header.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"payload_commitment": "HASH~1yS-KEtL3oDZDBJdsW51Pd7zywIiHesBZsTbpOzrxOfu",
"ns_table": {
"bytes": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
"bytes": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
},
"block_merkle_tree_root":"MERKLE_COMM~yB4_Aqa35_PoskgTpcCR1oVLh6BUdLHIs7erHKWi-usUAAAAAAAAAAEAAAAAAAAAJg",
"fee_merkle_tree_root":"MERKLE_COMM~VJ9z239aP9GZDrHp3VxwPd_0l28Hc5KEAB1pFeCIxhYgAAAAAAAAAAIAAAAAAAAAdA",
Expand Down
2 changes: 1 addition & 1 deletion data/ns_table.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"bytes": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
"bytes": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
}
4 changes: 4 additions & 0 deletions data/transaction.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"namespace": 12648430,
"payload": "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdC4gRG9uZWMgbGVjdHVzIHZlbGl0LCBjb21tb2RvIGVnZXQgdGVsbHVzIHZpdGFlLCBtb2xlc3RpZSBtYXhpbXVzIHR1cnBpcy4gTWFlY2VuYXMgbGFjdXMgbWF1cmlzLCBhdWN0b3IgcXVpcyBsYWN1cyBhdCwgYXVjdG9yIHZvbHV0cGF0IG5pc2kuIEZ1c2NlIG1vbGVzdGllIHVybmEgc2l0IGFtZXQgcXVhbSBpbXBlcmRpZXQgc3VzY2lwaXQuIERvbmVjIGVsaXQgbGVjdHVzLCBkYXBpYnVzIGluIGlwc3VtIGV0LCB2aXZlcnJhIHBoYXJldHJhIGZlbGlzLiBTZWQgc2VkIHNlbSBzZWQgbGliZXJvIHNlbXBlciBwb3N1ZXJlLiBVdCBld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