Skip to content
Closed
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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Auto detect text files and perform LF normalization
* text=auto
*.sol linguist-language=Solidity

contracts/astria_bridgeable_erc20.go linguist-generated=true
20 changes: 1 addition & 19 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,22 +1,4 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.

accounts/usbwallet @karalabe
accounts/scwallet @gballet
accounts/abi @gballet @MariusVanDerWijden
cmd/clef @holiman
consensus @karalabe
core/ @karalabe @holiman @rjl493456442
eth/ @karalabe @holiman @rjl493456442
eth/catalyst/ @gballet
eth/tracers/ @s1na
graphql/ @s1na
les/ @zsfelfoldi @rjl493456442
light/ @zsfelfoldi @rjl493456442
node/ @fjl
p2p/ @fjl @zsfelfoldi
rpc/ @fjl @holiman
p2p/simulations @fjl
p2p/protocols @fjl
p2p/testing @fjl
signer/ @holiman
* @joroshiba @mycodecrafting @noot
75 changes: 75 additions & 0 deletions .github/workflows/astria-build-and-publish-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Build and Publish Docker image

# Trigger on pushes to astria branch, new semantic version tags, and pull request updates
on:
workflow_dispatch:
push:
branches:
- "main"
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
# trigger on pull request updates when target is `astria` branch
pull_request:
branches:
- "main"

jobs:
build-and-publish-latest:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
steps:
# Checking out the repo
- uses: actions/checkout@v4
- uses: depot/setup-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
# Setting up Go
- uses: actions/setup-go@v4
with:
go-version: "^1.21.x" # The Go version to download (if necessary) and use.
- run: go version
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Generate correct tabs and labels
- name: Docker metadata
id: metadata
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/astriaorg/astria-geth
tags: |
type=ref,event=pr
type=match,pattern=v(.*),group=1
type=sha
# set latest tag for `astria` branch
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
- name: Build and push
uses: depot/build-push-action@v1
with:
# this gets rid of the unknown/unknown image that is created without this setting
# https://github.com/docker/build-push-action/issues/820#issuecomment-1455687416
provenance: false
context: .
# It takes a long time to build the arm image right now, so we only build it on tags which is what we use for releases, or on merges to the default branch.
platforms: ${{ (contains(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
project: 1k5kkqpmfp
41 changes: 41 additions & 0 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build and publish forkdiff github-pages
permissions:
contents: write
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1000 # make sure to fetch the old commit we diff against

- name: Build forkdiff
uses: "docker://protolambda/forkdiff:latest"
with:
args: -repo=./ -fork=./fork.yaml -out=./index.html

- name: Build pages
run: |
mkdir -p ./tmp/pages
mv ./index.html ./tmp/pages/index.html
touch ./tmp/pages/.nojekyll

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./tmp/pages
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com

25 changes: 25 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run tests

on:
push:
branches:
- "main"
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
pull_request:
branches:
- "main"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.4
- name: Run tests
run: go run build/ci.go test
env:
GOOS: linux
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ profile.cov
logs/

tests/spec-tests/

contracts/abi
contracts/bin
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@
path = tests/evm-benchmarks
url = https://github.com/ipsilon/evm-benchmarks
shallow = true
[submodule "contracts/astria-bridge-contracts"]
path = contracts/astria-bridge-contracts
url = https://github.com/astriaorg/astria-bridge-contracts.git
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,24 @@ COPY go.mod /go-ethereum/
COPY go.sum /go-ethereum/
RUN cd /go-ethereum && go mod download

ARG TARGETOS
ARG TARGETARCH
ADD . /go-ethereum
RUN cd /go-ethereum && go run build/ci.go install -static ./cmd/geth
RUN --mount=type=cache,target=/root/.cache/go-build \
GOOS=${TARGETOS} GOARCH=${TARGETARCH} cd /go-ethereum && go run build/ci.go install -static ./cmd/geth

# Pull Geth into a second stage deploy alpine container
FROM alpine:latest

RUN apk add --no-cache ca-certificates
# Astria - add bash and jq to support start-geth.sh in conductor
RUN apk add bash jq
# Astria - copy genesis.json so it can be used in start-geth.sh
COPY genesis.json /genesis.json
COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/

EXPOSE 8545 8546 30303 30303/udp
# Astria - add 50051 for GRPC
EXPOSE 8545 8546 30303 30303/udp 50051
ENTRYPOINT ["geth"]

# Add some metadata labels to help programatic image consumption
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.alltools
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ FROM alpine:latest
RUN apk add --no-cache ca-certificates
COPY --from=builder /go-ethereum/build/bin/* /usr/local/bin/

EXPOSE 8545 8546 30303 30303/udp
# Astria - add 50051 for GRPC
EXPOSE 8545 8546 30303 30303/udp 50051

# Add some metadata labels to help programatic image consumption
ARG COMMIT=""
Expand Down
2 changes: 1 addition & 1 deletion cmd/evm/internal/t8ntool/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func Transaction(ctx *cli.Context) error {
}
// Check intrinsic gas
if gas, err := core.IntrinsicGas(tx.Data(), tx.AccessList(), tx.To() == nil,
chainConfig.IsHomestead(new(big.Int)), chainConfig.IsIstanbul(new(big.Int)), chainConfig.IsShanghai(new(big.Int), 0)); err != nil {
chainConfig.IsHomestead(new(big.Int)), chainConfig.IsIstanbul(new(big.Int)), chainConfig.IsShanghai(new(big.Int), 0), false); err != nil {
r.Error = err
results = append(results, r)
continue
Expand Down
2 changes: 1 addition & 1 deletion cmd/evm/testdata/13/exp2.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"result": {
"stateRoot": "0xe4b924a6adb5959fccf769d5b7bb2f6359e26d1e76a2443c5a91a36d826aef61",
"stateRoot": "0x17228ad68f0ed80a362f0fe66b9307b96b115d57641f699931a0b7c3a04d1636",
"txRoot": "0x013509c8563d41c0ae4bf38f2d6d19fc6512a1d0d6be045079c8c9f68bf45f9d",
"receiptsRoot": "0xa532a08aa9f62431d6fe5d924951b8efb86ed3c54d06fee77788c3767dd13420",
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
Expand Down
4 changes: 2 additions & 2 deletions cmd/evm/testdata/24/exp.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"nonce": "0xae"
},
"0xc94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
"balance": "0x1030600"
"balance": "0x6122400"
}
},
"result": {
"stateRoot": "0x9e4224c6bba343d5b0fdbe9200cc66a7ef2068240d901ae516e634c45a043c15",
"stateRoot": "0xba04fd7f80a33bfb4b0bc5c8dc1178b05b67b3e95aeca01f516db3c93e6838e2",
"txRoot": "0x16cd3a7daa6686ceebadf53b7af2bc6919eccb730907f0e74a95a4423c209593",
"receiptsRoot": "0x22b85cda738345a9880260b2a71e144aab1ca9485f5db4fd251008350fc124c8",
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
Expand Down
4 changes: 2 additions & 2 deletions cmd/evm/testdata/25/exp.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"nonce": "0xad"
},
"0xc94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
"balance": "0x854d00"
"balance": "0x1ec3000"
}
},
"result": {
"stateRoot": "0x5139609e39f4d158a7d1ad1800908eb0349cea9b500a8273a6cf0a7e4392639b",
"stateRoot": "0xb056800260ffcf459b9acdfd9b213fce174bdfa53cfeaf505f0cfa9f411db860",
"txRoot": "0x572690baf4898c2972446e56ecf0aa2a027c08a863927d2dce34472f0c5496fe",
"receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2",
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
Expand Down
4 changes: 2 additions & 2 deletions cmd/evm/testdata/28/exp.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"alloc": {
"0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": {
"balance": "0x150ca"
"balance": "0x73c57"
},
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
"balance": "0x16345785d80c3a9",
Expand All @@ -16,7 +16,7 @@
}
},
"result": {
"stateRoot": "0xa40cb3fab01848e922a48bd24191815df9f721ad4b60376edac75161517663e8",
"stateRoot": "0xabcbb1d3be8aee044a219dd181fe6f2c2482749b9da95d15358ba7af9b43c372",
"txRoot": "0x4409cc4b699384ba5f8248d92b784713610c5ff9c1de51e9239da0dac76de9ce",
"receiptsRoot": "0xbff643da765981266133094092d98c81d2ac8e9a83a7bbda46c3d736f1f874ac",
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
Expand Down
5 changes: 4 additions & 1 deletion cmd/evm/testdata/29/exp.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
},
"balance": "0x1"
},
"0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": {
"balance": "0x2e248"
},
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
"balance": "0x16345785d871db8",
"nonce": "0x1"
}
},
"result": {
"stateRoot": "0x19a4f821a7c0a6f4c934f9acb0fe9ce5417b68086e12513ecbc3e3f57e01573c",
"stateRoot": "0xbad33754200872b417eb005c29ab6d8df97f9814044a24020fccb0e4946c2c73",
"txRoot": "0x248074fabe112f7d93917f292b64932394f835bb98da91f21501574d58ec92ab",
"receiptsRoot": "0xf78dfb743fbd92ade140711c8bbc542b5e307f0ab7984eff35d751969fe57efa",
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
Expand Down
5 changes: 4 additions & 1 deletion cmd/evm/testdata/30/exp.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
"0xd02d72e067e77158444ef2020ff2d325f929b363": {
"balance": "0xfffffffb8390",
"nonce": "0x3"
},
"0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": {
"balance": "0x47c70"
}
},
"result": {
"stateRoot": "0x3483124b6710486c9fb3e07975669c66924697c88cccdcc166af5e1218915c93",
"stateRoot": "0x6e7833d2d72d8a7074d89aac54e2ddcbe018bad9078e2a05db32b0bd1b3255fa",
"txRoot": "0x013509c8563d41c0ae4bf38f2d6d19fc6512a1d0d6be045079c8c9f68bf45f9d",
"receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
Expand Down
12 changes: 12 additions & 0 deletions cmd/geth/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"bufio"
"errors"
"fmt"
"github.com/ethereum/go-ethereum/eth/catalyst"
"os"
"reflect"
"runtime"
Expand All @@ -36,6 +37,7 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/eth/catalyst"
"github.com/ethereum/go-ethereum/eth/ethconfig"
"github.com/ethereum/go-ethereum/grpc/execution"
"github.com/ethereum/go-ethereum/internal/ethapi"
"github.com/ethereum/go-ethereum/internal/flags"
"github.com/ethereum/go-ethereum/internal/version"
Expand Down Expand Up @@ -200,6 +202,16 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
if ctx.IsSet(utils.GraphQLEnabledFlag.Name) {
utils.RegisterGraphQLService(stack, backend, filterSystem, &cfg.Node)
}

// Configure gRPC if requested.
if ctx.IsSet(utils.GRPCEnabledFlag.Name) {
serviceV1a2, err := execution.NewExecutionServiceServerV1Alpha2(eth)
if err != nil {
utils.Fatalf("failed to create execution service: %v", err)
}
utils.RegisterGRPCExecutionService(stack, serviceV1a2, &cfg.Node)
}

// Add the Ethereum Stats daemon if requested.
if cfg.Ethstats.URL != "" {
utils.RegisterEthStatsService(stack, backend, cfg.Ethstats.URL)
Expand Down
3 changes: 3 additions & 0 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ var (
utils.AllowUnprotectedTxs,
utils.BatchRequestLimit,
utils.BatchResponseMaxSize,
utils.GRPCEnabledFlag,
utils.GRPCHostFlag,
utils.GRPCPortFlag,
}

metricsFlags = []cli.Flag{
Expand Down
Loading