Skip to content

Commit b239e12

Browse files
dimartirosmiasojedfilip-parityre-giuspkhry
authored
Merge master into forking feature branch (#482)
* Rename pvm to polkadot (#455) * Fix release workflow (#461) * Add protobuf dependency * Match nextest installs * Update rust version inside docker * Add wasm32-unknown-unknown * [Anvil] Bug fixing + add debug_traceBlockByNumber RPC (#466) * bug fixes + add debug_traceBlockByNumber RPC endpoint * bug fix * CR comment * Dockerize anvil-polkadot node (#454) * Dockerize anvil node * Add workflow to publish the docker image * update rust version * Add new CLI flags (#465) --------- Co-authored-by: Pavlo Khrystenko <[email protected]> * Backport foundry-rs#12537 (#469) * adds polkadot testnet * backport * fix(`verification`): BSC chain id is incorrect, verification fails with `missing or unsupported chainid parameter` (foundry-rs#11716) * bump to alloy-chains 0.2.10 * mumbai -> amoy, deprecated --------- Co-authored-by: Alberto Viera <[email protected]> Co-authored-by: zerosnacks <[email protected]> * fix vm roll (#451) * fixup vm.roll cheatcode Signed-off-by: Alexandru Gheorghe <[email protected]> * fixup roll cheatcode Signed-off-by: Alexandru Gheorghe <[email protected]> * make blockhashes match Signed-off-by: Alexandru Gheorghe <[email protected]> * fixup test Signed-off-by: Alexandru Gheorghe <[email protected]> * fix block Signed-off-by: Alexandru Gheorghe <[email protected]> * make fmt/clippy happy Signed-off-by: Alexandru Gheorghe <[email protected]> --------- Signed-off-by: Alexandru Gheorghe <[email protected]> * State recording fixes (#443) * Add support for ExpectCreate (#471) * use parity-large runner (#472) * use parity-large runner * switch to macos-14 as macos-13 got deprecated * add a link to README.MD about forge test * add eip191 prefix to eth_sign and personal_sign (#474) * add prefix to eth_sign and personal_sign * format import * [Anvil] Fix use of Ethereum hashes in RPC endpoints (#468) * Use eth hash in eth_GetBlockByHash * Prevent docker from trying to use SSH * remove hash resolving in test utility method * Fix use of block hash across endpoints * fix * fix send_transaction * fix tests for metadata endpoints * fix test_anvil_node * Fix + index genesis block eth hash * Best-effort indexing for latest block * make tests less flaky * Subscribe and cache genesis block manually * nit - revert unnecessary changes * Fix anvil-polkadot attestation (#477) * fix: avoid eth hash round-trip in send_transaction for forking mode --------- Signed-off-by: Alexandru Gheorghe <[email protected]> Co-authored-by: Sebastian Miasojed <[email protected]> Co-authored-by: filip-parity <[email protected]> Co-authored-by: Giuseppe Re <[email protected]> Co-authored-by: Pavlo Khrystenko <[email protected]> Co-authored-by: Pavlo Khrystenko <[email protected]> Co-authored-by: Alberto Viera <[email protected]> Co-authored-by: zerosnacks <[email protected]> Co-authored-by: Alexandru Gheorghe <[email protected]> Co-authored-by: Monica Jin <[email protected]>
1 parent 3c84e8f commit b239e12

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+3438
-645
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: anvil-polkadot build and publish image
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_call:
8+
inputs:
9+
tag_name:
10+
required: true
11+
type: string
12+
workflow_dispatch:
13+
inputs:
14+
tag_name:
15+
description: "Tag or ref to build (e.g. v0.3.0, stable)"
16+
required: true
17+
type: string
18+
19+
env:
20+
REGISTRY: ghcr.io
21+
IMAGE_NAME: ${{ github.repository_owner }}/anvil-polkadot
22+
23+
jobs:
24+
build-and-push:
25+
name: Build and push Docker image
26+
runs-on: ubuntu-latest
27+
permissions:
28+
id-token: write
29+
packages: write
30+
contents: read
31+
timeout-minutes: 60
32+
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0
38+
# Ensure we checkout the specific tag if provided manually
39+
ref: ${{ inputs.tag_name || github.event.inputs.tag_name || github.ref }}
40+
41+
- name: Login into registry ${{ env.REGISTRY }}
42+
uses: docker/login-action@v3
43+
with:
44+
registry: ${{ env.REGISTRY }}
45+
username: ${{ github.actor }}
46+
password: ${{ secrets.GITHUB_TOKEN }}
47+
48+
- name: Extract Docker metadata
49+
id: meta
50+
uses: docker/metadata-action@v5
51+
with:
52+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
53+
tags: |
54+
# If tag_name is manually provided (dispatch/call), use it as a raw tag
55+
type=raw,value=${{ inputs.tag_name || github.event.inputs.tag_name }},enable=${{ inputs.tag_name != '' || github.event.inputs.tag_name != '' }}
56+
# If valid tag_name provided, also tag as latest
57+
type=raw,value=latest,enable=${{ inputs.tag_name != '' || github.event.inputs.tag_name != '' }}
58+
# Standard push to master -> master tag
59+
type=ref,event=branch
60+
# Push to master -> also latest
61+
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
62+
63+
# Log docker metadata to explicitly know what is being pushed
64+
- name: Inspect Docker Metadata
65+
run: |
66+
echo "TAGS -> ${{ steps.meta.outputs.tags }}"
67+
echo "LABELS -> ${{ steps.meta.outputs.labels }}"
68+
69+
- name: Build and push anvil-polkadot image
70+
uses: docker/build-push-action@v6
71+
with:
72+
context: .
73+
file: crates/anvil-polkadot/docker/Dockerfile
74+
push: true
75+
build-args: |
76+
RELEASE_REF=${{ inputs.tag_name || github.event.inputs.tag_name || github.ref_name }}
77+
tags: ${{ steps.meta.outputs.tags }}
78+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/nextest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- name: Install dependencies for building (Ubuntu)
5858
if: contains(matrix.runner_label, 'parity-large-new')
5959
run: |
60-
sudo apt-get update
60+
sudo apt-get update
6161
sudo apt-get install -y clang libclang-dev unzip build-essential
6262
6363
- name: Setup Node.js

.github/workflows/release.yml

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ jobs:
9393
# `target`: Rust build target triple
9494
# `platform` and `arch`: Used in tarball names
9595
# `svm`: target platform to use for the Solc binary: https://github.com/roynalnaruto/svm-rs/blob/84cbe0ac705becabdc13168bae28a45ad2299749/svm-builds/build.rs#L4-L24
96-
- runner: ubuntu-24.04
96+
- runner: parity-large-new
9797
target: x86_64-unknown-linux-musl
9898
svm_target_platform: linux-amd64
9999
platform: linux
100100
arch: amd64
101101
# This is pinned to `macos-13-large` to support old SDK versions.
102102
# If the runner is deprecated it should be pinned to the oldest available version of the runner.
103-
- runner: macos-13-large
103+
- runner: macos-14-large
104104
target: x86_64-apple-darwin
105105
svm_target_platform: macosx-amd64
106106
platform: darwin
@@ -119,23 +119,36 @@ jobs:
119119
- uses: actions/checkout@v4
120120
- uses: dtolnay/[email protected]
121121
with:
122-
targets: ${{ matrix.target }}
122+
targets: ${{ matrix.target }}, wasm32-unknown-unknown
123+
components: rust-src
123124
- uses: Swatinem/rust-cache@v2
124125
with:
125126
key: ${{ matrix.target }}
126127
cache-on-failure: true
128+
- name: Install dependencies for building (Ubuntu)
129+
if: matrix.target == 'x86_64-unknown-linux-musl'
130+
run: |
131+
sudo apt-get update
132+
sudo apt-get install -y clang libclang-dev unzip build-essential musl-tools
127133
128134
- name: Apple M1 setup
129135
if: matrix.target == 'aarch64-apple-darwin'
130136
run: |
131137
echo "SDKROOT=$(xcrun -sdk macosx --show-sdk-path)" >> $GITHUB_ENV
132138
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version)" >> $GITHUB_ENV
133139
134-
- name: Linux setup musl x86_64
135-
if: matrix.target == 'x86_64-unknown-linux-musl'
140+
- name: Install clang (macOS)
141+
if: contains(matrix.runner, 'macos')
136142
run: |
137-
sudo apt-get update -y
138-
sudo apt-get install -y musl-tools
143+
brew install llvm
144+
brew link llvm
145+
echo "LLVM_CONFIG_PATH=$(brew --prefix llvm)/bin/llvm-config" >> $GITHUB_ENV
146+
echo "LIBCLANG_PATH=$(brew --prefix llvm)/lib" >> $GITHUB_ENV
147+
148+
- name: Install protobuf-compiler
149+
uses: arduino/setup-protoc@v3
150+
with:
151+
repo-token: ${{ secrets.GITHUB_TOKEN }}
139152

140153
- name: Build binaries
141154
env:
@@ -159,8 +172,11 @@ jobs:
159172
160173
if [[ "$TARGET" == "x86_64-unknown-linux-musl" ]]; then
161174
docker run -v $PWD:/opt/revive $RUST_MUSL_CROSS_IMAGE /bin/bash -c "
175+
apt-get update && apt-get install -y clang libclang-dev unzip build-essential protobuf-compiler
176+
rustup default 1.89.0
177+
rustup target add x86_64-unknown-linux-musl wasm32-unknown-unknown
178+
rustup component add rust-src
162179
cd /opt/revive
163-
rustup target add x86_64-unknown-linux-musl
164180
cargo build $flags
165181
"
166182
sudo chown -R $(id -u):$(id -g) .
@@ -176,7 +192,8 @@ jobs:
176192
du -h "$bin" || true
177193
ldd "$bin" || true
178194
$bin --version || true
179-
echo "${name}_bin_path=${bin}" >> $GITHUB_ENV
195+
var_name=$(echo "${name}" | tr '-' '_')
196+
echo "${var_name}_bin_path=${bin}" >> $GITHUB_ENV
180197
done
181198
182199
- name: Archive binaries

.github/workflows/test-external-projects.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ jobs:
8585
shared-key: "test"
8686

8787
- name: Build foundry-polkadot
88-
run: cargo build
88+
run: cargo build --profile=release
8989
env:
9090
CARGO_PROFILE_DEV_DEBUG: 0
9191

9292
- name: Add forge to PATH
93-
run: echo "${{ github.workspace }}/target/debug" >> $GITHUB_PATH
93+
run: echo "${{ github.workspace }}/target/release" >> $GITHUB_PATH
9494

9595
- name: Test all external projects
9696
id: test-all

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ CLAUDE.md
1111
node_modules
1212
dist
1313
bin
14-
_
14+
_

Cargo.lock

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)