Skip to content

Commit

Permalink
Merge branch 'main' into 2372-stake-table-add-tests-to-the-withdrawfu…
Browse files Browse the repository at this point in the history
…nds-function
  • Loading branch information
alysiahuggins authored Jan 6, 2025
2 parents 3ad4a14 + f68a58e commit 63f7be7
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 15 deletions.
26 changes: 24 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,32 @@ updates:

- package-ecosystem: "cargo"
directory: "/"
# Group all updates together
groups:
# The `all` group should include mainly updates from crates.io which are
# more likely to succeed without intervention.
all:
patterns:
- "*"
- "*"
exclude-patterns:
- "ark-*"
- "cdn-*"
- "hotshot-*"
- "jf-*"
- "marketplace-*"
ark:
patterns:
- "ark-*"
cdn:
patterns:
- "cdn-*"
hotshot:
patterns:
- "hotshot-*"
jf:
patterns:
- "jf-*"
marketplace:
patterns:
- "marketplace-*"
schedule:
interval: "daily"
2 changes: 1 addition & 1 deletion .github/workflows/typos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
name: Checkout Repository

- name: typos-action
uses: crate-ci/[email protected].0
uses: crate-ci/[email protected].3
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.

13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ and robust infrastructure.
[Official Documentation](https://docs.espressosys.com/sequencer/espresso-sequencer-architecture/readme)

### Architecture
The diagram below shows how the Espresso Confirmation Layer fits into the rollup
centric Ethereum ecosystem. See [Architecture](./doc/architecture.md) for details.

![Architecture](./doc/espresso-overview.svg)
The diagram below shows how the Espresso Confirmation Layer fits into the rollup centric Ethereum ecosystem. See
[Architecture](./doc/architecture.md) for details.

![Architecture](./doc/espresso-overview.svg)

#### ZK rollups integration

Expand All @@ -43,9 +43,8 @@ a dockerized Espresso Sequencer network with an example Layer 2 rollup applicati

## Documentation

The rust code documentation can be found at
[sequencer.docs.espressosys.com](https://sequencer.docs.espressosys.com). Please note the disclaimer about API
stability at the end of the readme.
The rust code documentation can be found at [sequencer.docs.espressosys.com](https://sequencer.docs.espressosys.com).
Please note the disclaimer about API stability at the end of the readme.

To generate the documentation locally and view it in the browser, run

Expand Down Expand Up @@ -120,7 +119,7 @@ forge build
To run the tests

```shell
forge test
just sol-test
```

In order to avoid constant warnings about checksum mismatches with [svm-rs](https://github.com/roynalnaruto/svm-rs)
Expand Down
2 changes: 1 addition & 1 deletion doc/espresso-dev-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ docker run ghcr.io/espressosystems/espresso-sequencer/espresso-dev-node:main

| Name | Type | Environment Variable | Default Value | Description |
| ------------------------------- | --------------- | -------------------------------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rpc_url` | `Option<Url>` | `ESPRESSO_SEQUENCER_L1_PROVIDER` | Automatically launched Avil node if not provided. | The JSON-RPC endpoint of the L1. If not provided, an Avil node will be launched automatically. |
| `rpc_url` | `Option<Url>` | `ESPRESSO_SEQUENCER_L1_PROVIDER` | Automatically launched Anvil node if not provided. | The JSON-RPC endpoint of the L1. If not provided, an Anvil node will be launched automatically. |
| `mnemonic` | `String` | `ESPRESSO_SEQUENCER_ETH_MNEMONIC` | `test test test test test test test test test test test junk` | Mnemonic for an L1 wallet. This wallet is used to deploy the contracts, so the account indicated by`ACCOUNT_INDEX` must be funded with ETH. |
| `account_index` | `u32` | `ESPRESSO_DEPLOYER_ACCOUNT_INDEX` | `0` | Account index of the L1 wallet generated from`MNEMONIC`. Used when deploying contracts. |
| `sequencer_api_port` | `u16` | `ESPRESSO_SEQUENCER_API_PORT` | Required | Port that the HTTP API will use. |
Expand Down
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ sol-lint:
# Build diff-test binary and forge test
# Note: we use an invalid etherscan api key in order to avoid annoying warnings. See https://github.com/EspressoSystems/espresso-sequencer/issues/979
sol-test:
cargo build --bin diff-test --release
cargo build --profile test --bin diff-test
forge test

# Deploys the light client contract on Sepolia and call it for profiling purposes.
Expand All @@ -141,7 +141,7 @@ lc-contract-profiling-sepolia:
forge script contracts/script/LightClientCallNewFinalizedState.s.sol --sig "run(uint32 numInitValidators, address lcContractAddress)" {{NUM_INIT_VALIDATORS}} $LC_CONTRACT_ADDRESS --fork-url ${SEPOLIA_RPC_URL} --broadcast --chain-id sepolia

gas-benchmarks:
cargo build --bin diff-test --release
cargo build --profile test --bin diff-test
forge snapshot --mt "test_verify_succeeds|testCorrectUpdateBench"
@[ -n "$(git diff --name-only .gas-snapshot)" ] && echo "⚠️ Uncommitted gas benchmarks, please stage them before committing." && exit 1 || exit 0

Expand Down
4 changes: 3 additions & 1 deletion sequencer/src/api/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ async fn load_frontier<Mode: TransactionMode>(
) -> anyhow::Result<BlocksFrontier> {
tx.get_path(
Snapshot::<SeqTypes, BlockMerkleTree, { BlockMerkleTree::ARITY }>::Index(height),
height - 1,
height
.checked_sub(1)
.ok_or(anyhow::anyhow!("Subtract with overflow ({height})!"))?,
)
.await
.context(format!("fetching frontier at height {height}"))
Expand Down

0 comments on commit 63f7be7

Please sign in to comment.