-
Notifications
You must be signed in to change notification settings - Fork 827
Firehose EVM tracer addition #1344
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
Open
maoueh
wants to merge
133
commits into
sei-protocol:main
Choose a base branch
from
streamingfast:feature/firehose-tracer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+9,145
−36
Open
Changes from all commits
Commits
Show all changes
133 commits
Select commit
Hold shift + click to select a range
e73963a
Firehose tracer addition
maoueh aa512a8
Merge tag 'v5.1.2' into release/firehose
maoueh e6bdc65
Merge tag 'v5.2.0' into release/firehose
maoueh e05ef46
Firehose tracer addition
maoueh ad9f914
Merge tag 'v5.5.2' into feature/firehose-tracer
maoueh 16f73c4
Merge branch 'feature/firehose-tracer' into release/firehose
maoueh cccdf48
Improved panic handling ensuring we always print a stack trace when F…
maoueh ab01128
Improved caller reporting when there is an invalid state
maoueh 67bd0af
Fixed bug with system call not correctly wired leading to panics when…
maoueh 8418897
The tracing in `precompiles/bank/bank.go` needs to use `GetEVMAddress…
maoueh a13290a
Dockerfile to build Docker version for StreamingFast version
maoueh ec72741
Merge tag 'v5.5.5' into feature/firehose-tracer
maoueh f7dee2a
Merge branch 'feature/firehose-tracer' into release/firehose
maoueh 60c3ad3
Improved Docker to pull `libwasmvm` dependency
maoueh 9128e48
Added StreamingFast readme
maoueh a03050c
Adjusted a bit the instructions
maoueh bb6f115
Use v5.5.6 everywhere
maoueh 98994b7
Fix seidb default config value for KeepLastVersion
yzang2019 9612ef1
Fix unit test
yzang2019 9dd002e
Update go mod
yzang2019 6bad612
Add upgrade handler for v5.6.2
udpatil 2cc7a28
Merge tag 'v5.6.2' into feature/firehose-tracer-at-latest-release-tag
maoueh e7096af
Fixed a bug on parallel execution
maoueh ebbaa2e
Fixed missing handling of some system calls when running using the pa…
maoueh dbd9193
Fixed bug when re-ordering multiple system calls
maoueh 8a8244d
Go mod tidy
maoueh c8c9246
Enabling Docker package building (trying at least)
maoueh 6ba8ea3
More fixed to caching and general build
maoueh 9612038
Fixed GitHub Actions tag push
maoueh 7ae491f
GitHub release allow for any tags
maoueh 7780d40
Merge branch 'feature/firehose-tracer-at-latest-release-tag' into rel…
maoueh 92ee5ae
Add v5.7.0 upgrade
philipsu522 ca362fd
Merge remote-tracking branch 'origin/v5.7.0-release' into feature/fir…
maoueh e41491b
First pass in supporting new logs/receipt added on some transaction
maoueh 05a0e9a
Merge tag 'v5.7.1' into feature/firehose-tracer-at-latest-release-tag
maoueh 0349552
Added integration tests to simulate multiple CW20 synthetic logs
maoueh 25caefc
Removed leftover debugging statements
maoueh 7d79e0a
Fix seidb default config value for KeepLastVersion
yzang2019 50d87a5
Fix unit test
yzang2019 fead719
remove serialize/deserialize for accesslist
codchen e3f67a0
disable accesslist
codchen 93b3431
Revert "disable accesslist"
codchen fd2aade
optimize
codchen c2ff353
add cleanup
codchen d531f88
rebase
codchen 83f9ec5
remove excess line
udpatil 7e7a9ce
v5.7.5 release
udpatil 8a92aa9
Fix log index on synthetic receipt (#1784)
codchen 020f5be
Added possibility in `seid tx evm deploy` to pass constructor's payload
maoueh d6ece2c
Fixed ERC/CW bridge for both EVM and CoWasm cases and added Firehose …
maoueh fee9a06
Merge tag 'v5.7.5' into feature/firehose-tracer-at-latest-release-tag
maoueh cf1d6b5
Updated how the instance is detected to be ready
maoueh c08751e
Removed CoWasm signature extraction when creating corresponding EVM t…
maoueh 118555e
Merge branch 'feature/firehose-tracer-at-latest-release-tag' into rel…
maoueh f7d899d
Bump tendermint for high gas patch
yzang2019 5b43a0b
Fixed when transaction is processed on synchronous algorithm and has …
maoueh 80e74b4
Fixed previous fix by ensuring we do not tweak the state in serial ex…
maoueh dd69edd
Fixed Firehose integration to catch the bug that happened when OCC (p…
maoueh ec7dabb
Added Cosmvisor to built Docker image
maoueh d1ee82f
Fixed when transaction is processed on synchronous algorithm and has …
maoueh af0daed
Fixed previous fix by ensuring we do not tweak the state in serial ex…
maoueh a565f91
Fixed Firehose integration to catch the bug that happened when OCC (p…
maoueh ea58032
Fixed `OnSeiPostTxCosmosEvents` when EVM transaction but it was actua…
maoueh 6859793
Bump seidb to fix receipt missing on restart issue (#1817)
yzang2019 740bfe8
Merge tag 'v5.6.3' into feature/firehose-tracer-at-latest-release-tag
maoueh b58ab5d
Merge tag 'v5.7.6' into feature/firehose-tracer-at-latest-release-tag
maoueh 08963c6
Merge tag 'v5.8.0' into feature/firehose-tracer-at-latest-release-tag
maoueh 1c8055f
Merge branch 'feature/firehose-tracer-at-latest-release-tag' into rel…
maoueh 887fa1e
Fixed parallel execution tracing
maoueh 8c2d04e
Updated to WASMVM 1.5.4
maoueh 771d7da
Fix broken CoWasm interop tracing
maoueh 2304d5e
v5.9.0-release changelog
philipsu522 aae700c
Add upgrade version
philipsu522 e742d5e
fix tx byte arr in synthetic endpoints (#1872)
jewei1997 f3e5fdf
Exclude only shell receipts from eth endpoints v5.9.0 (#1879)
jewei1997 58b6724
Merge tag 'v5.9.0' into feature/firehose-tracer-at-latest-release-tag
maoueh 895159d
use infinite gas meter for wasm query context
udpatil 7343a09
Merge tag 'v5.9.0-hotfix' into release/firehose
maoueh 63b4f3c
Re-worked Dockerfile.sf to download `libwasmvm` as defined in `go.mod…
maoueh 0c4d398
Merge tag 'v6.0.0' into feature/firehose-tracer-at-latest-release-tag
maoueh 04bd71c
Fixed test and improved `bootstrap.sh` script
maoueh 74bc411
Merge branch 'feature/firehose-tracer-at-latest-release-tag' into rel…
maoueh b13818b
v6.0.1 release
philipsu522 221b19e
Add upgrade
philipsu522 129a0ee
Fix max base fee upgrade (#1965)
jewei1997 04f19a2
revert: 150% gasUsed refund limit policy (#1967)
blindchaser bd696e9
Merge branch 'main' into v6.0.1-release
philipsu522 a5aba95
Ignore Version during Set Earliest Version (#1968)
Kbhat1 710256a
Merge branch 'main' into v6.0.1-release
philipsu522 c936a98
Merge tag 'v6.0.1' into feature/firehose-tracer-at-latest-release-tag
maoueh 20ebfbc
Merge branch 'feature/firehose-tracer-at-latest-release-tag' into rel…
maoueh 341e626
Fixed tracing adding billable gas to transaction which would have led…
maoueh f0d1173
Merge branch 'feature/firehose-tracer-at-latest-release-tag' into rel…
maoueh 1c87c2b
Fixed two more location where we could have consumed gas when tracing
maoueh d080d7a
Correctly handle out of gas panics leading to problem in defer
maoueh f65257d
Remove panic that was used for testing
maoueh 6e9df77
Force a fake receipt for recovered panic
maoueh 458a8cd
Remove the panic
maoueh 9e69395
Fixed failed receipt to fit with RCP output
maoueh a592801
Preparing for re-starting Sei sync
maoueh ce76d86
Fixed complete transaction on failed trx via panic
maoueh adef7fb
Remove panic preparing for release
maoueh c3a5d5e
Last quick verification
maoueh b52c826
Getting ready for re-sync, fingers crossed for this time
maoueh ff362ca
Tweaked again to show block output
maoueh ef82a26
Preparing for release (sic)
maoueh 7dee649
fix race condition
codchen d7575be
rebase
philipsu522 9289f1d
Add changelog
philipsu522 fe7f265
Bump tm
philipsu522 7bf5478
Fix 1155 events ctx
philipsu522 d9d6b08
Revert "Fix 1155 events ctx"
philipsu522 067ab50
Revert "Pointers contracts: support for ERC1155 and CW1155 contracts …
philipsu522 f17ec67
fix changelog
philipsu522 8a46488
Merge tag 'v6.0.2' into feature/firehose-tracer-at-latest-release-tag
maoueh 233d4bd
Add v6.0.3 upgrade
philipsu522 b15ca2c
Changelog
philipsu522 47e2778
Properly encode ERC1155 translated batch event data
codchen de5a748
update changelog
philipsu522 dba2420
Avoid panic tx error message in debug trace (#2057)
jewei1997 0de12b3
Revert "fix changelog"
maoueh 1c582b9
Reapply "Pointers contracts: support for ERC1155 and CW1155 contracts…
maoueh 0742c87
Reapply "Fix 1155 events ctx"
maoueh dd289be
Revert "Fix 1155 events ctx"
maoueh ccf20c1
Revert "Bump tm"
maoueh 46d4e8e
Revert "Add changelog"
maoueh b651afe
Revert "rebase"
maoueh 70ddbd8
Revert "fix race condition"
maoueh 810eff4
Merge tag 'v6.0.3' into HEAD
maoueh 42eff8a
Fixed detection of Firehose being ready
maoueh f73d927
Merge tag 'v6.0.4' into feature/firehose-tracer-at-latest-release-tag
maoueh 7e55a4a
Re-write how we run Firehose test reducing bootstrap problem and re-u…
maoueh ffb9e34
Merge tag 'v6.0.5' into feature/firehose-tracer-at-latest-release-tag
maoueh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,9 @@ release/ | |
build/ | ||
cache/ | ||
|
||
/seid-* | ||
/libwasmvm.x86_64.so | ||
|
||
# Local .terraform directories | ||
**/.terraform | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
FROM ubuntu:22.04 AS base | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update && apt-get install -y apt-transport-https ca-certificates curl gnupg tar jq vim wget | ||
|
||
RUN curl -LO https://github.com/chmln/sd/releases/download/v1.0.0/sd-v1.0.0-x86_64-unknown-linux-gnu.tar.gz \ | ||
&& tar -xzf sd-v1.0.0-x86_64-unknown-linux-gnu.tar.gz \ | ||
&& cp sd-v1.0.0-x86_64-unknown-linux-gnu/sd /usr/local/bin/sd \ | ||
&& rm -rf sd-v1.0.0-x86_64-unknown-linux-gnu sd-v1.0.0-x86_64-unknown-linux-gnu.tar.gz | ||
|
||
ENV PATH="/app:${PATH}" | ||
|
||
FROM base AS fireeth_download | ||
|
||
ARG FIREETH="v2.6.7" | ||
|
||
# Download and extract the binary file | ||
RUN curl -LO https://github.com/streamingfast/firehose-ethereum/releases/download/${FIREETH}/firehose-ethereum_linux_x86_64.tar.gz \ | ||
&& tar -xzf firehose-ethereum_linux_x86_64.tar.gz \ | ||
&& rm firehose-ethereum_linux_x86_64.tar.gz | ||
|
||
FROM golang:1.22-alpine AS libwasmvm_download | ||
|
||
COPY ./go.mod /work/go.mod | ||
COPY ./go.sum /work/go.sum | ||
|
||
# FIXME: Handle multi-arch build, for now we have hard-coded the x86_64 part, but we should be able to build for arm64 as well | ||
RUN apk add --no-cache wget && cd /work; \ | ||
export ARCH=$(uname -m); \ | ||
export WASM_VERSION="$(go list -m all | grep github.com/CosmWasm/wasmvm | awk '{print $2}')"; \ | ||
wget -O "/lib/libwasmvm.x86_64.${WASM_VERSION}.so" https://github.com/CosmWasm/wasmvm/releases/download/${WASM_VERSION}/libwasmvm.x86_64.so && \ | ||
printf "${WASM_VERSION}" > /lib/libwasmvm.x86_64.so.version | ||
|
||
FROM base AS cosmovisor_download | ||
|
||
ARG COSMOVISOR="v1.5.0" | ||
|
||
# Download and extract the binary file | ||
RUN curl -LO https://github.com/cosmos/cosmos-sdk/releases/download/cosmovisor%2F${COSMOVISOR}/cosmovisor-${COSMOVISOR}-linux-amd64.tar.gz \ | ||
&& tar -xzf cosmovisor-${COSMOVISOR}-linux-amd64.tar.gz \ | ||
&& rm cosmovisor-${COSMOVISOR}-linux-amd64.tar.gz | ||
|
||
FROM base AS base_with_gcloud | ||
|
||
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \ | ||
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg \ | ||
&& apt-get update -y \ | ||
&& apt-get install google-cloud-sdk -y | ||
|
||
FROM base_with_gcloud | ||
|
||
ARG SEID_BIN="seid" | ||
|
||
COPY --from=fireeth_download /app/fireeth /app/fireeth | ||
COPY --from=libwasmvm_download /lib/libwasmvm.x86_64.*.so /lib/ | ||
COPY --from=libwasmvm_download /lib/libwasmvm.x86_64.so.version /lib/ | ||
|
||
COPY ./${SEID_BIN} /app/seid | ||
|
||
RUN chmod +x /app/fireeth && \ | ||
export WASM_VERSION=$(cat /lib/libwasmvm.x86_64.so.version) && \ | ||
ln -s /lib/libwasmvm.x86_64.${WASM_VERSION}.so /lib/libwasmvm.x86_64.so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
## StreamingFast Sei Fork Notes | ||
|
||
### Remotes & Branches | ||
|
||
```bash | ||
git remote set-url origin https://github.com/sei-protocol/sei-chain.git | ||
git remote add sf git@github.com:streamingfast/sei-chain.git | ||
``` | ||
|
||
We maintain 3 branches: | ||
|
||
- `feature/firehose-tracer` | ||
- `feature/firehose-tracer-at-latest-release-tag` | ||
- `release/firehose` | ||
|
||
The `release/firehose` contains Dockerfile and instructions how to build images, this is the branch that should be used to make releases. | ||
|
||
The `feature/firehose-tracer` is the PR branch that tracks `origin/main` branch, `feature/firehose-tracer-at-latest-release-tag` is the same as `feature/firehose-tracer` but tracks the latest release tag, which as of time of writing is `v5.5.5`. | ||
|
||
### Bumping to new version | ||
|
||
```bash | ||
git fetch origin | ||
|
||
# Found correct tag to bump to, we will use `v5.5.6` | ||
export VERSION=v5.5.6 | ||
|
||
git checkout feature/firehose-tracer-at-latest-release-tag | ||
git pull | ||
|
||
git merge "${VERSION:?}" | ||
# Fix any conflicts | ||
go test ./... | ||
git commit | ||
|
||
git checkout release/firehose | ||
git pull | ||
|
||
git merge feature/firehose-tracer-at-latest-release-tag | ||
# Fix any conflicts and merge, but there is usually no conflicts in this step | ||
|
||
git tag "${VERSION:?}-fh3.0" | ||
|
||
git push feature/firehose-tracer-at-latest-release-tag release/firehose "${VERSION:?}-fh3.0" | ||
``` | ||
|
||
#### Building Binary & Docker | ||
|
||
Built manually for now on the GCP VM, here the commands we use to build it in our VM. | ||
|
||
> [!IMPORTANT] | ||
> The instructions below **must** be run on the VM itself and not on your developer's machine. | ||
|
||
```bash | ||
export SEID_REF=v5.5.6-fh3.0 \ | ||
&& sudo -u sei git -C /data/build/seid/ fetch origin \ | ||
&& sudo -u sei git -C /data/build/seid/ checkout "${SEID_REF:?}" \ | ||
&& sudo -u sei bash -c 'source /etc/profile.d/02-golang.sh && cd /data/build/seid && make install' \ | ||
&& sudo cp /home/sei/go/bin/seid /usr/local/bin/seid-"${SEID_REF:?}" | ||
``` | ||
|
||
Then from your developer machine now, run the following commands which download from the VM the binary locally and then build a Docker image from it. | ||
|
||
Adjust the `TAG` export to use a repository you control, the `SEID_REF` to fit with the correct version. | ||
|
||
``` | ||
# Assumed to be in `sei-chain` root folder, replace `sei0` in scp command to fit your own machine's name | ||
|
||
export SEID_REF=v5.5.6-fh3.0 \ | ||
&& export FIREETH=v2.6.2 \ | ||
&& export TAG="ghcr.io/streamingfast/firehose-ethereum:${FIREETH:?}-sei-${SEID_REF:?}" \ | ||
&& scp sei0:/usr/local/bin/seid-${SEID_REF:?} . \ | ||
&& docker build --platform=linux/amd64 --build-arg="FIREETH=${FIREETH:?}" --build-arg="SEID_BIN=seid-${SEID_REF:?}" -t "${TAG:?}" -f Dockerfile.sf . \ | ||
&& docker run --platform=linux/amd64 --rm -it "${TAG:?}" seid version \ | ||
&& docker push "${TAG:?}" | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's put this config under either https://github.com/sei-protocol/sei-chain/blob/main/x/evm/querier/config.go or a new config section, since it's used in the actual processing and not an RPC-side thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about:
Does that sounds good?