Skip to content

Commit

Permalink
feat(sequencer)!: update to ABCI v0.38 (#831)
Browse files Browse the repository at this point in the history
## Summary

updates the sequencer app to use ABCI v0.38, which replaces
`begin_block`/`deliver_tx`/`end_block` with one call, `finalize_block`.

relevant penumbra PRs:

- update penumbra-tower-trace to re-add instrumentation to the ABCI
methods (done in penumbra-zone/penumbra#4160)
- update cnidarium to be able to get the root hash of the state without
calling `commit` (done in
penumbra-zone/penumbra#4122)

## Background
this was inevitable, also it cleans up the block execution flow inside
the sequencer application. (removed `processed_txs` and
`current_sequencer_block_builder` from the app)

## Changes
- implement `finalize_block`; for the most part, I left the
`begin_block`/`deliver_tx`/`end_block` as they are but called them
inside `finalize_block`
- however the block execution flow is cleaned up as we no longer need to
track how many txs have been delivered (for the commitments) and we can
construct the `SequencerBlock` at the end of `finalize_block` without
needing to track things between calls

## Testing
unit tests 

ran it with cometbft release
[v0.38.6](https://github.com/cometbft/cometbft/releases/tag/v0.38.6)

## Breaking Changelist
- the sequencer app will now only work with a cometbft version that
supports ABCI v0.38

## Related Issues

closes #679
  • Loading branch information
noot authored Apr 17, 2024
1 parent 6665948 commit 1684774
Show file tree
Hide file tree
Showing 13 changed files with 484 additions and 568 deletions.
231 changes: 88 additions & 143 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ serde_json = "1"
metrics = "0.22.1"
pbjson-types = "0.6"
# Note that when updating the penumbra versions, vendored types in `proto/sequencerapis/astria_vendored` may need to be updated as well.
penumbra-ibc = { git = "https://github.com/penumbra-zone/penumbra.git", tag = "v0.69.1", default-features = false }
penumbra-proto = { git = "https://github.com/penumbra-zone/penumbra.git", tag = "v0.69.1" }
penumbra-tower-trace = { git = "https://github.com/penumbra-zone/penumbra.git", tag = "v0.69.1" }
# update once https://github.com/penumbra-zone/penumbra/commit/8b06546af43bf073fd99f3f9d82b8afb51872489 makes it into a release
penumbra-ibc = { git = "https://github.com/penumbra-zone/penumbra.git", rev = "8b06546af43bf073fd99f3f9d82b8afb51872489", default-features = false }
penumbra-proto = { git = "https://github.com/penumbra-zone/penumbra.git", rev = "8b06546af43bf073fd99f3f9d82b8afb51872489" }
penumbra-tower-trace = { git = "https://github.com/penumbra-zone/penumbra.git", rev = "8b06546af43bf073fd99f3f9d82b8afb51872489" }
prost = "0.12"
rand = "0.8.5"
regex = "1.9"
Expand Down
2 changes: 1 addition & 1 deletion charts/sequencer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.11.5
version: 0.11.6

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
4 changes: 2 additions & 2 deletions charts/sequencer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ global:
images:
cometBFT:
repo: docker.io/cometbft/cometbft
tag: v0.37.x
devTag: v0.37.x
tag: v0.38.6
devTag: v0.38.6
sequencer:
repo: ghcr.io/astriaorg/sequencer
tag: "0.10.1"
Expand Down
6 changes: 3 additions & 3 deletions crates/astria-sequencer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ anyhow = "1"
borsh = { version = "1", features = ["derive"] }
matchit = "0.7.2"
tower = "0.4"
tower-abci = "0.11.0"
tower-abci = "0.12.0"
tower-actor = "0.1.0"
cnidarium = { git = "https://github.com/penumbra-zone/penumbra.git", tag = "v0.69.1" }
cnidarium-component = { git = "https://github.com/penumbra-zone/penumbra.git", tag = "v0.69.1" }
cnidarium = { git = "https://github.com/penumbra-zone/penumbra.git", rev = "8b06546af43bf073fd99f3f9d82b8afb51872489" }
cnidarium-component = { git = "https://github.com/penumbra-zone/penumbra.git", rev = "8b06546af43bf073fd99f3f9d82b8afb51872489" }

async-trait = { workspace = true }
bytes = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-sequencer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Ensure `~/go` is in your `PATH`, or `GOPATH` is set to some other place in your
```sh
git clone https://github.com/cometbft/cometbft
cd cometbft
git checkout origin/v0.37.x
git checkout origin/v0.38.6
export GOPATH=~/go
make install
```
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-sequencer/TESTNET.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Ensure `~/go` is in your `PATH`, or `GOPATH` is set to some other place in your
```sh
git clone https://github.com/cometbft/cometbft
cd cometbft
git checkout origin/v0.37.x
git checkout origin/v
export GOPATH=~/go
make install
```
Expand Down
Loading

0 comments on commit 1684774

Please sign in to comment.