Skip to content

Commit

Permalink
Merge pull request #88 from weaveVM/dev
Browse files Browse the repository at this point in the history
dev to main, alpha v2
  • Loading branch information
allnil authored Oct 21, 2024
2 parents 26f6113 + 44592d5 commit c21634a
Show file tree
Hide file tree
Showing 1,183 changed files with 46,196 additions and 27,950 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*

# include source files
!/conf
!/bin
!/crates
!/testing
Expand Down
5 changes: 3 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
bin/ @onbjerg
crates/blockchain-tree/ @rakita @rkrasiuk @mattsse @Rjected
crates/blockchain-tree-api/ @rakita @rkrasiuk @mattsse @Rjected
crates/chainspec/ @Rjected @joshieDo @mattsse
crates/chainspec/ @Rjected @joshieDo @mattsse @emhane
crates/chain-state/ @fgimenez @mattsse @rkrasiuk
crates/cli/ @onbjerg @mattsse
crates/config/ @onbjerg
Expand All @@ -21,7 +21,7 @@ crates/metrics/ @onbjerg
crates/net/ @emhane @mattsse @Rjected
crates/net/downloaders/ @onbjerg @rkrasiuk @emhane
crates/node/ @mattsse @Rjected @onbjerg
crates/optimism/ @mattsse @Rjected @fgimenez
crates/optimism/ @mattsse @Rjected @fgimenez @emhane
crates/payload/ @mattsse @Rjected
crates/primitives/ @Rjected
crates/primitives-traits/ @Rjected @joshieDo
Expand All @@ -44,4 +44,5 @@ crates/tokio-util/ @fgimenez @emhane
crates/tracing/ @onbjerg
crates/transaction-pool/ @mattsse
crates/trie/ @rkrasiuk @Rjected
etc/ @Rjected @onbjerg @shekhirin
.github/ @onbjerg @gakonst @DaniPopes
20 changes: 10 additions & 10 deletions .github/assets/check_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,22 @@ exclude_crates=(
reth-ethereum-payload-builder
reth-etl
reth-evm-ethereum
reth-evm-optimism
reth-execution-errors
reth-exex
reth-exex-test-utils
reth-ipc
reth-net-nat
reth-network
reth-node-api
reth-node-types
reth-node-builder
reth-node-core
reth-node-ethereum
reth-node-events
reth-node-metrics
reth-node-optimism
reth-optimism-cli
reth-optimism-evm
reth-optimism-node
reth-optimism-payload-builder
reth-optimism-rpc
reth-payload-builder
Expand All @@ -65,19 +66,18 @@ exclude_crates=(
reth-rpc-types
reth-stages
reth-storage-errors
reth-engine-local
# The following are not supposed to be working
reth # all of the crates below
reth-db # mdbx
reth # all of the crates below
reth-invalid-block-hooks # reth-provider
reth-libmdbx # mdbx
reth-mdbx-sys # mdbx
reth-nippy-jar # sucds
reth-provider # reth-db, reth-nippy-jar
reth-prune # reth-db
reth-provider # tokio
reth-prune # tokio
reth-stages-api # reth-provider, reth-prune
reth-static-file # reth-nippy-jar
reth-static-file # tokio
reth-transaction-pool # c-kzg
reth-trie-db # reth-db
reth-trie-parallel # reth-db
reth-trie-parallel # tokio
)

# Array to hold the results
Expand Down
2 changes: 1 addition & 1 deletion .github/assets/hive/build_simulators.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ wait
# Make sure we don't rebuild images on the CI jobs
git apply ../.github/assets/hive/no_sim_build.diff
go build .
mv ./hive ../hive_assets/
mv ./hive ../hive_assets/
16 changes: 7 additions & 9 deletions .github/assets/hive/expected_failures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ rpc-compat:
- debug_getRawTransaction/get-invalid-hash (reth)

- eth_call/call-callenv (reth)
- eth_createAccessList/create-al-contract-eip1559 (reth)
- eth_createAccessList/create-al-contract (reth)
- eth_feeHistory/fee-history (reth)
- eth_getStorageAt/get-storage-invalid-key-too-large (reth)
- eth_getStorageAt/get-storage-invalid-key (reth)
- eth_getTransactionReceipt/get-access-list (reth)
- eth_getTransactionReceipt/get-blob-tx (reth)
- eth_getTransactionReceipt/get-dynamic-fee (reth)
- eth_getBlockByHash/get-block-by-hash (reth)
- eth_getBlockByNumber/get-block-n (reth)
- eth_getBlockByNumber/get-finalized (reth)
- eth_getBlockByNumber/get-genesis (reth)
- eth_getBlockByNumber/get-latest (reth)
- eth_getBlockByNumber/get-safe (reth)

# https://github.com/paradigmxyz/reth/issues/8732
# https://github.com/paradigmxyz/reth/issues/8732
engine-withdrawals:
- Withdrawals Fork On Genesis (Paris) (reth)
- Withdrawals Fork on Block 1 (Paris) (reth)
Expand Down Expand Up @@ -48,8 +52,6 @@ engine-api:
- Invalid Missing Ancestor Syncing ReOrg, StateRoot, EmptyTxs=False, CanonicalReOrg=False, Invalid P9 (Paris) (reth)
- Invalid Missing Ancestor Syncing ReOrg, StateRoot, EmptyTxs=True, CanonicalReOrg=True, Invalid P9 (Paris) (reth)
- Invalid Missing Ancestor Syncing ReOrg, StateRoot, EmptyTxs=False, CanonicalReOrg=True, Invalid P9 (Paris) (reth)
- Invalid Missing Ancestor Syncing ReOrg, GasLimit, EmptyTxs=False, CanonicalReOrg=False, Invalid P8 (Paris) (reth)
- Invalid Missing Ancestor Syncing ReOrg, Timestamp, EmptyTxs=False, CanonicalReOrg=False, Invalid P8 (Paris) (reth)

# https://github.com/paradigmxyz/reth/issues/8305
# https://github.com/paradigmxyz/reth/issues/6217
Expand All @@ -65,12 +67,8 @@ engine-cancun:
- Invalid Missing Ancestor Syncing ReOrg, StateRoot, EmptyTxs=False, CanonicalReOrg=False, Invalid P9 (Cancun) (reth)
- Invalid Missing Ancestor Syncing ReOrg, StateRoot, EmptyTxs=True, CanonicalReOrg=True, Invalid P9 (Cancun) (reth)
- Invalid Missing Ancestor Syncing ReOrg, StateRoot, EmptyTxs=False, CanonicalReOrg=True, Invalid P9 (Cancun) (reth)
- Invalid Missing Ancestor Syncing ReOrg, GasLimit, EmptyTxs=False, CanonicalReOrg=False, Invalid P8 (Cancun) (reth)
- Invalid Missing Ancestor Syncing ReOrg, Timestamp, EmptyTxs=False, CanonicalReOrg=False, Invalid P8 (Cancun) (reth)
- Invalid PayloadAttributes, Missing BeaconRoot, Syncing=True (Cancun) (reth)
- Invalid NewPayload, ParentBeaconBlockRoot, Syncing=True, EmptyTxs=False, DynFeeTxs=False (Cancun) (reth)
- Invalid NewPayload, BlobGasUsed, Syncing=True, EmptyTxs=False, DynFeeTxs=False (Cancun) (reth)
- Invalid NewPayload, Blob Count on BlobGasUsed, Syncing=True, EmptyTxs=False, DynFeeTxs=False (Cancun) (reth)
- Invalid NewPayload, ExcessBlobGas, Syncing=True, EmptyTxs=False, DynFeeTxs=False (Cancun) (reth)

# https://github.com/paradigmxyz/reth/issues/8579
Expand Down
63 changes: 63 additions & 0 deletions .github/assets/hive/expected_failures_experimental.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# https://github.com/paradigmxyz/reth/issues/7015
# https://github.com/paradigmxyz/reth/issues/6332
rpc-compat:
- debug_getRawBlock/get-invalid-number (reth)
- debug_getRawHeader/get-invalid-number (reth)
- debug_getRawReceipts/get-invalid-number (reth)
- debug_getRawTransaction/get-invalid-hash (reth)

- eth_call/call-callenv (reth)
- eth_feeHistory/fee-history (reth)
- eth_getStorageAt/get-storage-invalid-key-too-large (reth)
- eth_getStorageAt/get-storage-invalid-key (reth)
- eth_getTransactionReceipt/get-access-list (reth)
- eth_getTransactionReceipt/get-blob-tx (reth)
- eth_getTransactionReceipt/get-dynamic-fee (reth)
- eth_getBlockByHash/get-block-by-hash (reth)
- eth_getBlockByNumber/get-block-n (reth)
- eth_getBlockByNumber/get-finalized (reth)
- eth_getBlockByNumber/get-genesis (reth)
- eth_getBlockByNumber/get-latest (reth)
- eth_getBlockByNumber/get-safe (reth)

# https://github.com/paradigmxyz/reth/issues/8732
engine-withdrawals:
- Withdrawals Fork On Genesis (Paris) (reth)
- Withdrawals Fork on Block 1 (Paris) (reth)
- Withdrawals Fork on Block 2 (Paris) (reth)
- Withdrawals Fork on Block 3 (Paris) (reth)
- Withdraw to a single account (Paris) (reth)
- Withdraw to two accounts (Paris) (reth)
- Withdraw many accounts (Paris) (reth)
- Withdraw zero amount (Paris) (reth)
- Empty Withdrawals (Paris) (reth)
- Corrupted Block Hash Payload (INVALID) (Paris) (reth)
- Withdrawals Fork on Block 1 - 8 Block Re-Org NewPayload (Paris) (reth)
- Withdrawals Fork on Block 1 - 8 Block Re-Org, Sync (Paris) (reth)
- Withdrawals Fork on Block 8 - 10 Block Re-Org NewPayload (Paris) (reth)
- Withdrawals Fork on Block 8 - 10 Block Re-Org Sync (Paris) (reth)
- Withdrawals Fork on Canonical Block 8 / Side Block 7 - 10 Block Re-Org (Paris) (reth)
- Withdrawals Fork on Canonical Block 8 / Side Block 7 - 10 Block Re-Org Sync (Paris) (reth)
- Withdrawals Fork on Canonical Block 8 / Side Block 9 - 10 Block Re-Org (Paris) (reth)
- Withdrawals Fork on Canonical Block 8 / Side Block 9 - 10 Block Re-Org Sync (Paris) (reth)

# https://github.com/paradigmxyz/reth/issues/8305
# https://github.com/paradigmxyz/reth/issues/6217
engine-api: []

# https://github.com/paradigmxyz/reth/issues/8305
# https://github.com/paradigmxyz/reth/issues/6217
# https://github.com/paradigmxyz/reth/issues/8306
# https://github.com/paradigmxyz/reth/issues/7144
engine-cancun:
- Blob Transaction Ordering, Multiple Clients (Cancun) (reth)
- Invalid PayloadAttributes, Missing BeaconRoot, Syncing=True (Cancun) (reth)
- Invalid NewPayload, ExcessBlobGas, Syncing=True, EmptyTxs=False, DynFeeTxs=False (Cancun) (reth)
- Invalid NewPayload, VersionedHashes, Syncing=False, EmptyTxs=False, DynFeeTxs=False (Cancun) (reth)
- Invalid NewPayload, VersionedHashes Version, Syncing=False, EmptyTxs=False, DynFeeTxs=False (Cancun) (reth)
- Invalid NewPayload, Incomplete VersionedHashes, Syncing=False, EmptyTxs=False, DynFeeTxs=False (Cancun) (reth)
- Invalid NewPayload, Extra VersionedHashes, Syncing=False, EmptyTxs=False, DynFeeTxs=False (Cancun) (reth)

# https://github.com/paradigmxyz/reth/issues/8579
sync:
- sync reth -> reth
15 changes: 15 additions & 0 deletions .github/assets/kurtosis_network_params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
participants:
- el_type: geth
cl_type: lighthouse
- el_type: reth
el_extra_params:
- --engine.experimental
el_image: "ghcr.io/paradigmxyz/reth:kurtosis-ci"
cl_type: teku
additional_services:
- assertoor
assertoor_params:
run_block_proposal_check: true
run_transaction_test: true
run_blob_transaction_test: true
run_opcodes_transaction_test: true
5 changes: 4 additions & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Runs benchmarks.
# Runs benchmarks on serialization/deserialization of storage values and keys.

on:
pull_request:
Expand Down Expand Up @@ -48,13 +48,16 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref || 'main' }}
# On `main` branch, generates test vectors and serializes them to disk using `serde-json`.
- name: Generate test vectors
run: cargo run --bin reth --features dev -- test-vectors tables
# Runs iai and stores `main` baseline report for comparison later on $BASELINE.
- name: Save baseline
run: cargo bench -p reth-db --bench iai --profile profiling --features test-utils -- --save-baseline=$BASELINE
- name: Checkout PR
uses: actions/checkout@v4
with:
clean: false
# Runs iai on incoming merge using previously generated test-vectors and compares the report against `main` report.
- name: Compare PR benchmarks
run: cargo bench -p reth-db --bench iai --profile profiling --features test-utils -- --baseline=$BASELINE
2 changes: 1 addition & 1 deletion .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
echo "EOF" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
add-paths: ./Cargo.lock
commit-message: ${{ steps.msg.outputs.commit_message }}
Expand Down
54 changes: 41 additions & 13 deletions .github/workflows/gcp-docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Google Artifact Registry

on:
push:
branches:
Expand All @@ -17,34 +18,40 @@ jobs:
id-token: 'write'

steps:
# 1. Checkout the Repository
- id: checkout
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

# 2. Authenticate with Google Cloud
- id: auth
name: Authenticate with Google Cloud
uses: google-github-actions/auth@v2
with:
token_format: access_token
credentials_json: ${{ secrets.GCP_CREDENTIALS_JSON }}
access_token_lifetime: 300s
access_token_lifetime: 1800s

# 3. Configure Docker to Use Google Artifact Registry
- name: Configure container registry
run: gcloud auth configure-docker us-east1-docker.pkg.dev

# 4. Set Up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# 5. Login to Artifact Registry
- name: Login to Artifact Registry
uses: docker/login-action@v3
with:
registry: us-east1-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}

# 6. Determine Docker Tag Based on Git Reference
- name: Get tag
id: get-tag
run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/}
run: echo "short_ref=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT

- name: Set Docker Tag
id: tag
Expand All @@ -58,26 +65,47 @@ jobs:
else
tag=${GITHUB_REF#refs/heads/}
fi
echo "::set-output name=tag::${tag}"
echo "tag=${tag}" >> $GITHUB_OUTPUT
echo "Docker tag: ${tag}"
# 7. Build Docker Image (Load Locally Only)
- name: Build Docker Image
uses: docker/build-push-action@v6
with:
push: false # Do not push in this step
load: true # Load the image into Docker cache
tags: |
wevm:local
us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.get-tag.outputs.short_ref }}
us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }}
cache-from: type=registry,ref=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }}
cache-to: type=registry,ref=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }},mode=max

# 8. Test Docker Image Using Local Tag
- name: Test Docker
run: |-
docker build . -t wevm:local
mkdir -m 777 .testnet
cd .testnet
git clone https://github.com/weaveVM/wvm-docker-testnet.git .
echo "${{ secrets.GCP_CREDENTIALS_JSON }}" > ./execution/key.json
docker compose up -d
npm i
npm install
SIGNER_KEY=${{ secrets.TEST_SIGNER_KEY }} node test.js
docker compose down
cd .. && sudo rm -rf .testnet
- name: Build and Push Container
run: |-
docker build . -t wevm
docker tag wevm us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.get-tag.outputs.short_ref }}
docker tag wevm us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }}
docker push "us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.get-tag.outputs.short_ref }}"
docker push "us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }}"
# 9. Push Verified Docker Images to Artifact Registry
- name: Push to Artifact Registry
uses: docker/build-push-action@v6
with:
push: true # Enable pushing
tags: |
us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.get-tag.outputs.short_ref }}
us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }}
cache-from: type=registry,ref=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }}
cache-to: type=registry,ref=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }},mode=max

# 10. Clean Up Local Docker Tags (Optional)
- name: Remove Local Tag
if: always() # Run regardless of previous step outcomes
run: docker rmi wevm:local || true
Loading

0 comments on commit c21634a

Please sign in to comment.