Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,20 @@ jobs:
os: [ubuntu-22.04] # List of OS: https://github.com/actions/virtual-environments
runs-on: ${{ matrix.os }}
needs: [unit-tests, integration-tests]
env:
RUN_CODECOV_UPLOAD: ${{ secrets.CODECOV_TOKEN != '' }}
steps:
- name: Skip Codecov upload when CODECOV_TOKEN is unavailable
if: env.RUN_CODECOV_UPLOAD != 'true'
run: echo "Skipping Codecov upload because CODECOV_TOKEN is not available for this run."
- name: Checkout
if: env.RUN_CODECOV_UPLOAD == 'true'
uses: actions/checkout@v5
- name: Download artifacts
if: env.RUN_CODECOV_UPLOAD == 'true'
uses: actions/download-artifact@v6.0.0
- name: Upload coverage to Codecov
if: env.RUN_CODECOV_UPLOAD == 'true'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
23 changes: 21 additions & 2 deletions .github/workflows/kurtosis-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,68 +69,84 @@ jobs:
- build-heimdall-v2
runs-on: ubuntu-latest
timeout-minutes: 30
env:
RUN_PRIVILEGED_STEPS: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
# These permissions are required to log in to GCR
permissions:
contents: read
actions: write
id-token: write
steps:
- name: Skip privileged e2e steps on fork pull requests
if: env.RUN_PRIVILEGED_STEPS != 'true'
run: echo "Skipping privileged e2e workflow because fork pull requests do not receive the required OIDC token and secrets."
# Set up kurtosis
- name: Checkout kurtosis-pos
if: env.RUN_PRIVILEGED_STEPS == 'true'
uses: actions/checkout@v5
with:
repository: 0xPolygon/kurtosis-pos
ref: hv2/eip1559-and-rio-at-128

# This step will free disk space and thus remove any docker images previously built
- name: Pre kurtosis run
if: env.RUN_PRIVILEGED_STEPS == 'true'
uses: ./.github/actions/setup
with:
main_branch: develop
docker_username: ${{ secrets.DOCKERHUB }}
docker_token: ${{ secrets.DOCKERHUB_KEY }}

- name: Checkout pos-workflows
if: env.RUN_PRIVILEGED_STEPS == 'true'
uses: actions/checkout@v5
with:
repository: 0xPolygon/pos-workflows
ref: main
path: pos-workflows

- name: Copy kurtosis config
if: env.RUN_PRIVILEGED_STEPS == 'true'
run: cp ./pos-workflows/configs/kurtosis-e2e.yml ./kurtosis-e2e.yml

# Load images
- name: Download bor docker image
if: env.RUN_PRIVILEGED_STEPS == 'true'
uses: actions/download-artifact@v4
with:
name: bor-image

- name: Download heimdall-v2 docker image
if: env.RUN_PRIVILEGED_STEPS == 'true'
uses: actions/download-artifact@v4
with:
name: heimdall-v2-image

- name: Load bor docker image
if: env.RUN_PRIVILEGED_STEPS == 'true'
run: |
gunzip -c bor-image.tar.gz | docker load
echo "Loaded bor docker image:"
docker images bor:local --format "{{.ID}} {{.CreatedAt}}"

- name: Load heimdall-v2 docker image
if: env.RUN_PRIVILEGED_STEPS == 'true'
run: |
gunzip -c heimdall-v2-image.tar.gz | docker load
echo "Loaded heimdall-v2 docker image:"
docker images heimdall-v2:local --format "{{.ID}} {{.CreatedAt}}"

# Deploy kurtosis enclave
- name: Kurtosis run
if: env.RUN_PRIVILEGED_STEPS == 'true'
run: kurtosis run --args-file=kurtosis-e2e.yml --enclave=${{ env.ENCLAVE_NAME }} .

- name: Inspect enclave
if: env.RUN_PRIVILEGED_STEPS == 'true'
run: kurtosis enclave inspect ${{ env.ENCLAVE_NAME }}

- name: Install polycli
if: env.RUN_PRIVILEGED_STEPS == 'true'
run: |
tmp_dir=$(mktemp -d)
curl -L https://github.com/0xPolygon/polygon-cli/releases/download/${{ env.POLYCLI_VERSION }}/polycli_${{ env.POLYCLI_VERSION }}_linux_amd64.tar.gz | tar -xz -C "$tmp_dir"
Expand All @@ -141,16 +157,19 @@ jobs:

- name: Run smoke tests
id: smoke-tests
if: env.RUN_PRIVILEGED_STEPS == 'true'
working-directory: pos-workflows/tests
run: bash kurtosis_smoke_test.sh

- name: Install Go
if: env.RUN_PRIVILEGED_STEPS == 'true'
uses: actions/setup-go@v6
with:
go-version: 'stable'

- name: Run RPC tests
id: rpc-tests
if: env.RUN_PRIVILEGED_STEPS == 'true'
working-directory: pos-workflows/tests/rpc_tests
run: |
export RPC_URL=$(kurtosis port print ${{ env.ENCLAVE_NAME }} l2-el-1-bor-heimdall-v2-validator rpc)
Expand All @@ -160,7 +179,7 @@ jobs:
# Collect diagnostics on failure
- name: Collect network diagnostics and state dump
if: >-
always() && (
env.RUN_PRIVILEGED_STEPS == 'true' && always() && (
steps.smoke-tests.outcome == 'failure' ||
steps.rpc-tests.outcome == 'failure')
uses: ./pos-workflows/.github/actions/network-diagnostics-and-state-dump
Expand All @@ -169,7 +188,7 @@ jobs:

# Clean up
- name: Post kurtosis run
if: always()
if: env.RUN_PRIVILEGED_STEPS == 'true' && always()
uses: ./.github/actions/cleanup
with:
main_branch: develop
Expand Down
21 changes: 19 additions & 2 deletions .github/workflows/kurtosis-stateless-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,69 +69,85 @@ jobs:
- build-heimdall-v2
runs-on: ubuntu-latest
timeout-minutes: 45
env:
RUN_PRIVILEGED_STEPS: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
# These permissions are required to log in to GCR
permissions:
contents: read
actions: write
id-token: write
steps:
- name: Skip privileged e2e steps on fork pull requests
if: env.RUN_PRIVILEGED_STEPS != 'true'
run: echo "Skipping privileged e2e workflow because fork pull requests do not receive the required OIDC token and secrets."
# Set up kurtosis
- name: Checkout kurtosis-pos
if: env.RUN_PRIVILEGED_STEPS == 'true'
uses: actions/checkout@v5
with:
repository: 0xPolygon/kurtosis-pos
ref: hv2/eip1559-and-rio-at-128

# This step will free disk space and thus remove any docker images previously built
- name: Pre kurtosis run
if: env.RUN_PRIVILEGED_STEPS == 'true'
uses: ./.github/actions/setup
with:
main_branch: develop
docker_username: ${{ secrets.DOCKERHUB }}
docker_token: ${{ secrets.DOCKERHUB_KEY }}

- name: Checkout pos-workflows
if: env.RUN_PRIVILEGED_STEPS == 'true'
uses: actions/checkout@v5
with:
repository: 0xPolygon/pos-workflows
ref: main
path: pos-workflows

- name: Copy kurtosis config
if: env.RUN_PRIVILEGED_STEPS == 'true'
run: cp ./pos-workflows/configs/kurtosis-stateless-e2e.yml ./kurtosis-stateless-e2e.yml

# Load images
- name: Download bor docker image
if: env.RUN_PRIVILEGED_STEPS == 'true'
uses: actions/download-artifact@v4
with:
name: bor-image

- name: Download heimdall-v2 docker image
if: env.RUN_PRIVILEGED_STEPS == 'true'
uses: actions/download-artifact@v4
with:
name: heimdall-v2-image

- name: Load bor docker image
if: env.RUN_PRIVILEGED_STEPS == 'true'
run: |
gunzip -c bor-image.tar.gz | docker load
echo "Loaded bor docker image:"
docker images bor:local --format "{{.ID}} {{.CreatedAt}}"

- name: Load heimdall-v2 docker image
if: env.RUN_PRIVILEGED_STEPS == 'true'
run: |
gunzip -c heimdall-v2-image.tar.gz | docker load
echo "Loaded heimdall-v2 docker image:"
docker images heimdall-v2:local --format "{{.ID}} {{.CreatedAt}}"

# Deploy kurtosis enclave
- name: Kurtosis run
if: env.RUN_PRIVILEGED_STEPS == 'true'
run: kurtosis run --args-file=kurtosis-stateless-e2e.yml --enclave ${{ env.ENCLAVE_NAME }} .

- name: Inspect enclave
if: env.RUN_PRIVILEGED_STEPS == 'true'
run: kurtosis enclave inspect ${{ env.ENCLAVE_NAME }}

# Run e2e tests
- name: Install polycli
if: env.RUN_PRIVILEGED_STEPS == 'true'
run: |
tmp_dir=$(mktemp -d)
curl -L https://github.com/0xPolygon/polygon-cli/releases/download/${{ env.POLYCLI_VERSION }}/polycli_${{ env.POLYCLI_VERSION }}_linux_amd64.tar.gz | tar -xz -C "$tmp_dir"
Expand All @@ -142,19 +158,20 @@ jobs:

- name: Run stateless e2e tests
id: stateless-tests
if: env.RUN_PRIVILEGED_STEPS == 'true'
working-directory: pos-workflows/tests/stateless_tests
run: bash kurtosis_stateless_test.sh

# Collect diagnostics on failure
- name: Collect network diagnostics and state dump
if: always() && steps.stateless-tests.outcome == 'failure'
if: env.RUN_PRIVILEGED_STEPS == 'true' && always() && steps.stateless-tests.outcome == 'failure'
uses: ./pos-workflows/.github/actions/network-diagnostics-and-state-dump
with:
enclave_name: ${{ env.ENCLAVE_NAME }}

# Clean up
- name: Post kurtosis run
if: always()
if: env.RUN_PRIVILEGED_STEPS == 'true' && always()
uses: ./.github/actions/cleanup
with:
main_branch: develop
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ─── BUILDER STAGE ───────────────────────────────────────────────────────────────
FROM golang:1.26.1-alpine AS builder
FROM golang:1.26.2-alpine AS builder

ARG BOR_DIR=/var/lib/bor/
ENV BOR_DIR=$BOR_DIR
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.alltools
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build Geth in a stock Go builder container
FROM golang:1.26.1-alpine AS builder
FROM golang:1.26.2-alpine AS builder

RUN apk add --no-cache make gcc musl-dev linux-headers git

Expand Down
2 changes: 1 addition & 1 deletion cmd/keeper/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/ethereum/go-ethereum/cmd/keeper

go 1.26.1
go 1.26.2

require (
github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20260104020744-7268a54d0358
Expand Down
4 changes: 2 additions & 2 deletions core/rawdb/ancient_scheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ var freezers = []string{
// state freezer.
func NewStateFreezer(ancientDir string, verkle bool, readOnly bool) (ethdb.ResettableAncientStore, error) {
if ancientDir == "" {
return NewMemoryFreezer(readOnly, stateFreezerTableConfigs), nil
return NewMemoryFreezer(readOnly, 0, stateFreezerTableConfigs), nil
}
var name string
if verkle {
Expand All @@ -140,7 +140,7 @@ func NewStateFreezer(ancientDir string, verkle bool, readOnly bool) (ethdb.Reset
// trienode freezer.
func NewTrienodeFreezer(ancientDir string, verkle bool, readOnly bool) (ethdb.ResettableAncientStore, error) {
if ancientDir == "" {
return NewMemoryFreezer(readOnly, trienodeFreezerTableConfigs), nil
return NewMemoryFreezer(readOnly, 0, trienodeFreezerTableConfigs), nil
}
var name string
if verkle {
Expand Down
2 changes: 1 addition & 1 deletion core/rawdb/chain_freezer.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func NewChainFreezer(datadir string, namespace string, readonly bool, offset uin
func newChainFreezer(datadir string, eraDir string, namespace string, readonly bool, offset uint64) (*chainFreezer, error) {
if datadir == "" {
return &chainFreezer{
ancients: NewMemoryFreezer(readonly, chainFreezerTableConfigs),
ancients: NewMemoryFreezer(readonly, offset, chainFreezerTableConfigs),
quit: make(chan struct{}),
trigger: make(chan chan struct{}),
}, nil
Expand Down
Loading
Loading