Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/iliad' into release/0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
leeren committed Oct 14, 2024
2 parents 51e15d8 + c998c10 commit 5fac253
Show file tree
Hide file tree
Showing 12 changed files with 145 additions and 183 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/build-release-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build Release Binaries

on:
release:
types:
- created

permissions:
id-token: write
contents: write
pull-requests: write
actions: write

jobs:
Timestamp:
uses: storyprotocol/gha-workflows/.github/workflows/reusable-timestamp.yml@main

build:
needs: Timestamp
name: Build Release Assets
runs-on: ubuntu-latest
strategy:
matrix:
platform:
[linux-amd64, linux-arm64, darwin-amd64, darwin-arm64]

steps:
- name: Checkout code
uses: actions/[email protected]

- name: Display Go version
run: go version

- name: Display the release tag
run: |
echo "Release tag: ${{ github.event.release.tag_name }}"
- name: Set up environment for cross-compilation
run: |
IFS="-" read -r GOOS GOARCH <<< "${{ matrix.platform }}"
output_name=./build/bin/geth-${{ matrix.platform }}
echo "Building for $GOOS/$GOARCH..."
env GOOS=$GOOS GOARCH=$GOARCH go build -o $output_name ./cmd/geth
- name: Calculate checksum
run: |
sha256sum ./build/bin/geth-${{ matrix.platform }} > ./build/bin/geth-${{ matrix.platform }}.sha256
- name: Upload binaries and source code to GitHub Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.release.tag_name }}
file: |
./build/bin/geth-${{ matrix.platform }}*
file_glob: true
2 changes: 1 addition & 1 deletion .github/workflows/ci-ecr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Upload geth Binary
name: Build and Upload geth Binary to ECR

on:
workflow_dispatch:
Expand Down
166 changes: 0 additions & 166 deletions .github/workflows/ci-geth-s3.yml

This file was deleted.

37 changes: 34 additions & 3 deletions .github/workflows/ci-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ on:
push:
branches:
- main
# pull_request:
# branches:
# - main
paths-ignore:
- '.github/**'
pull_request:
branches:
- main
paths-ignore:
- '.github/**'
workflow_dispatch:

permissions:
id-token: write
Expand Down Expand Up @@ -60,6 +65,7 @@ jobs:
echo "Version extracted: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "VERSION_META=$VERSION_META" >> $GITHUB_ENV
- name: Build the geth binary
run: |
Expand Down Expand Up @@ -92,10 +98,12 @@ jobs:
export TZ=America/Los_Angeles
IFS="-" read -r GOOS GOARCH <<< "${{ matrix.platform }}"
TIMESTAMP=$(date +%Y%m%d%H%M%S)
echo "Timestamp: $TIMESTAMP"
HUMAN_READABLE_VERSION=$(date)
COMMIT_HASH=$(git rev-parse --short HEAD)
FOLDER_NAME="geth-${{ matrix.platform }}-${VERSION}-${COMMIT_HASH}"
ARCHIVE_NAME="${FOLDER_NAME}.tar.gz"
PUBLIC_DOWNLOAD_URL="https://$S3_BUCKET.s3.us-west-1.amazonaws.com/geth-public/$ARCHIVE_NAME"
binary_name=./build/bin/geth
if [ "$GOOS" = "windows" ]; then
Expand All @@ -112,6 +120,17 @@ jobs:
aws s3 cp s3://$S3_BUCKET/geth/manifest.txt manifest.txt --quiet || touch manifest.txt
echo "$TIMESTAMP" >> manifest.txt
aws s3 cp manifest.txt s3://$S3_BUCKET/geth/manifest.txt --quiet
# Update version file
aws s3 cp s3://$S3_BUCKET/geth-public/version.txt version.txt --quiet || printf "File Name\t\t\tVerison\t\t\t\tCommit Hash\t\tTimestamp\n" > version.txt
if [ "${VERSION_META}" != "stable" ]; then
printf "$VERSION-$COMMIT_HASH\t\t$VERSION\t\t\t$COMMIT_HASH\t\t\t$TIMESTAMP\n" >> version.txt
else
printf "$VERSION-$COMMIT_HASH\t\t\t$VERSION\t\t\t\t$COMMIT_HASH\t\t\t$TIMESTAMP\n" >> version.txt
fi
aws s3 cp version.txt s3://$S3_BUCKET/geth-public/version.txt --quiet
fi
mkdir $FOLDER_NAME
Expand All @@ -133,6 +152,18 @@ jobs:
exit 1
fi
echo "COMMIT_HASH=$COMMIT_HASH" >> $GITHUB_ENV
echo "PUBLIC_DOWNLOAD_URL=$PUBLIC_DOWNLOAD_URL" >> $GITHUB_ENV
- name: Add binary version back to PR
if: matrix.platform == 'linux-amd64'
uses: mshick/add-pr-comment@v2
with:
message: |
### Binary uploaded successfully 🎉
📦 **Version Name:** ${{ env.VERSION }}-${{ env.COMMIT_HASH }}
📦 **Download Source:** [AWS S3](${{ env.PUBLIC_DOWNLOAD_URL }})
cleanup:
runs-on: ubuntu-latest
needs: build_and_push
Expand Down
37 changes: 29 additions & 8 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,45 @@
name: i386 linux tests
name: Go tests

on:
push:
branches: [ master ]
branches:
- main
paths-ignore:
- '.github/**'
pull_request:
branches: [ master ]
branches:
- main
paths-ignore:
- '.github/**'
workflow_dispatch:

jobs:
build:
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v5
with:
go-version: 1.21.4
cache: false

- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-mod-cache-${{ hashFiles('**/go.mod', '**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mod-cache-latest
- name: Install dependencies
run: |
go mod download
- name: Run tests
run: go test -short ./...
env:
GOOS: linux
GOARCH: 386
GOARCH: amd64
1 change: 1 addition & 0 deletions core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ func (e *GenesisMismatchError) Error() string {
type ChainOverrides struct {
OverrideCancun *uint64
OverrideVerkle *uint64

// Story iliad
OverrideStoryNostoi *uint64
}
Expand Down
3 changes: 3 additions & 0 deletions core/txpool/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ type ValidationOptions struct {
// This check is public to allow different transaction pools to check the basic
// rules without duplicating code and running the risk of missed updates.
func ValidateTransaction(tx *types.Transaction, head *types.Header, signer types.Signer, opts *ValidationOptions) error {
if !opts.Config.Is4844Enabled() && tx.Type() == types.BlobTxType {
return core.ErrTxTypeNotSupported
}
// Ensure transactions not implemented by the calling pool are rejected
if opts.Accept&(1<<tx.Type()) == 0 {
return fmt.Errorf("%w: tx type %v not supported by this pool", core.ErrTxTypeNotSupported, tx.Type())
Expand Down
4 changes: 2 additions & 2 deletions core/types/transaction_signing.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type sigCache struct {
func MakeSigner(config *params.ChainConfig, blockNumber *big.Int, blockTime uint64) Signer {
var signer Signer
switch {
case config.IsCancun(blockNumber, blockTime):
case config.IsCancun(blockNumber, blockTime) && config.Is4844Enabled():
signer = NewCancunSigner(config.ChainID)
case config.IsLondon(blockNumber):
signer = NewLondonSigner(config.ChainID)
Expand All @@ -65,7 +65,7 @@ func MakeSigner(config *params.ChainConfig, blockNumber *big.Int, blockTime uint
// have the current block number available, use MakeSigner instead.
func LatestSigner(config *params.ChainConfig) Signer {
if config.ChainID != nil {
if config.CancunTime != nil {
if config.CancunTime != nil && config.Is4844Enabled() {
return NewCancunSigner(config.ChainID)
}
if config.LondonBlock != nil {
Expand Down
Loading

0 comments on commit 5fac253

Please sign in to comment.