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
13 changes: 0 additions & 13 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"github.com/ethereum/go-ethereum/rpc"
"github.com/rs/zerolog"

"github.com/onflow/flow-go/fvm/evm/emulator"
evmTypes "github.com/onflow/flow-go/fvm/evm/types"

"github.com/onflow/flow-evm-gateway/config"
Expand Down Expand Up @@ -990,18 +989,6 @@ func (b *BlockChainAPI) prepareBlockResponse(
Sha3Uncles: types.EmptyUncleHash,
}

emulatorConfig := emulator.NewConfig(
emulator.WithChainID(b.config.EVMNetworkID),
emulator.WithBlockNumber(new(big.Int).SetUint64(block.Height)),
emulator.WithBlockTime(block.Timestamp),
)

if emulatorConfig.ChainRules().IsAmsterdam {
slotNumber := hexutil.Uint64(block.SlotNumber(b.config.FlowNetworkID))
blockResponse.SlotNumber = &slotNumber
blockResponse.BlockAccessListHash = block.AccessListHash
}

blockBytes, err := block.ToBytes()
if err != nil {
return nil, err
Expand Down
1 change: 0 additions & 1 deletion bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ func (b *Bootstrap) StartEventIngestion(ctx context.Context) error {
b.logger,
b.collector,
replayerConfig,
b.config.EVMNetworkID,
)

StartEngine(ctx, b.events, l)
Expand Down
6 changes: 0 additions & 6 deletions eth/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,12 +475,6 @@ type Block struct {
Uncles []common.Hash `json:"uncles"`
MixHash common.Hash `json:"mixHash"`
BaseFeePerGas hexutil.Big `json:"baseFeePerGas"`

// SlotNumber was added by EIP-7843 and is ignored in legacy headers.
SlotNumber *hexutil.Uint64 `json:"slotNumber,omitempty"`

// BlockAccessListHash was added by EIP-7928 and is ignored in legacy headers.
BlockAccessListHash *common.Hash `json:"blockAccessListHash,omitempty"`
}

type BlockHeader struct {
Expand Down
54 changes: 29 additions & 25 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ go 1.25.1

require (
github.com/cockroachdb/pebble v1.1.5
github.com/ethereum/go-ethereum v1.17.4
github.com/ethereum/go-ethereum v1.16.8
github.com/goccy/go-json v0.10.4
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/holiman/uint256 v1.3.2
github.com/onflow/atree v0.16.0
github.com/onflow/cadence v1.10.3
github.com/onflow/flow-go v0.48.1-evm-cache-block.0.20260625075712-10f911e681fa
github.com/onflow/flow-go v0.48.1-evm-cache-block.0.20260602223212-19c6bdbbe069
github.com/onflow/flow-go-sdk v1.10.3
github.com/prometheus/client_golang v1.20.5
github.com/rs/cors v1.8.0
Expand Down Expand Up @@ -46,7 +46,7 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.24.4 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cockroachdb/crlib v0.0.0-20241015224233-894974b3ad94 // indirect
Expand All @@ -55,11 +55,12 @@ require (
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/pebble/v2 v2.0.6 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/swiss v0.0.0-20251224182025-b0f6560f979b // indirect
github.com/cockroachdb/swiss v0.0.0-20250624142022-d6e517c1d961 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/consensys/gnark-crypto v0.18.1 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/crate-crypto/go-eth-kzg v1.5.0 // indirect
github.com/crate-crypto/go-eth-kzg v1.4.0 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
Expand All @@ -71,11 +72,11 @@ require (
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/ef-ds/deque v1.0.4 // indirect
github.com/emicklei/dot v1.6.2 // indirect
github.com/ethereum/c-kzg-4844/v2 v2.1.6 // indirect
github.com/ethereum/c-kzg-4844/v2 v2.1.5 // indirect
github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab // indirect
github.com/ethereum/go-verkle v0.2.2 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/ferranbt/fastssz v0.1.4 // indirect
github.com/fjl/jsonw v0.1.0 // indirect
github.com/frankban/quicktest v1.14.4 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fxamacker/cbor/v2 v2.9.2-0.20260331174317-a78e92ec038e // indirect
Expand All @@ -96,7 +97,7 @@ require (
github.com/googleapis/enterprise-certificate-proxy v0.3.11 // indirect
github.com/googleapis/gax-go/v2 v2.17.0 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
Expand Down Expand Up @@ -129,6 +130,7 @@ require (
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
Expand All @@ -142,6 +144,7 @@ require (
github.com/multiformats/go-multistream v0.6.0 // indirect
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/onflow/crypto v0.25.4 // indirect
github.com/onflow/fixed-point v0.1.1 // indirect
github.com/onflow/flow-core-contracts/lib/go/contracts v1.10.3 // indirect
Expand All @@ -159,10 +162,11 @@ require (
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pelletier/go-toml/v2 v2.2.1 // indirect
github.com/pierrec/lz4/v4 v4.1.22 // indirect
github.com/pion/dtls/v3 v3.1.2 // indirect
github.com/pion/logging v0.2.4 // indirect
github.com/pion/stun/v3 v3.1.2 // indirect
github.com/pion/transport/v4 v4.0.1 // indirect
github.com/pion/dtls/v2 v2.2.12 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pion/stun/v2 v2.0.0 // indirect
github.com/pion/transport/v2 v2.2.10 // indirect
github.com/pion/transport/v3 v3.0.7 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
Expand All @@ -182,7 +186,7 @@ require (
github.com/spf13/viper v1.15.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/supranational/blst v0.3.16 // indirect
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8b0eaed6c // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
Expand All @@ -196,28 +200,28 @@ require (
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
go.opentelemetry.io/otel v1.43.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.41.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.41.0 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect
go.opentelemetry.io/otel/sdk v1.43.0 // indirect
go.opentelemetry.io/otel/trace v1.43.0 // indirect
go.opentelemetry.io/otel v1.39.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 // indirect
go.opentelemetry.io/otel/metric v1.39.0 // indirect
go.opentelemetry.io/otel/sdk v1.39.0 // indirect
go.opentelemetry.io/otel/trace v1.39.0 // indirect
Comment on lines +203 to +208

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check otel usage for baggage and subprocess spawning
rg -n "baggage|kenv|PATH" --type=go -g '!**/vendor/**' || echo "No direct baggage/PATH usage found"

Repository: onflow/flow-evm-gateway

Length of output: 196


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== go.mod otel entries =="
nl -ba go.mod | sed -n '195,215p'

echo
echo "== tests/go.mod otel entries =="
if [ -f tests/go.mod ]; then
  nl -ba tests/go.mod | sed -n '1,120p'
else
  echo "tests/go.mod not found"
fi

echo
echo "== all otel version references =="
rg -n "go\.opentelemetry\.io/otel" go.mod tests/go.mod

Repository: onflow/flow-evm-gateway

Length of output: 227


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== go.mod otel entries =="
nl -ba go.mod | sed -n '200,210p'

echo
echo "== tests/go.mod otel entries =="
if [ -f tests/go.mod ]; then
  rg -n "go\.opentelemetry\.io/otel" tests/go.mod
else
  echo "tests/go.mod not found"
fi

Repository: onflow/flow-evm-gateway

Length of output: 227


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== go.mod otel entries =="
sed -n '200,210p' go.mod

echo
echo "== tests/go.mod otel entries =="
if [ -f tests/go.mod ]; then
  grep -n "go.opentelemetry.io/otel" tests/go.mod || true
else
  echo "tests/go.mod not found"
fi

echo
echo "== root go.mod otel references =="
grep -n "go.opentelemetry.io/otel" go.mod || true

Repository: onflow/flow-evm-gateway

Length of output: 1696


Bump the OpenTelemetry deps in go.mod:203-208
go.mod still pins go.opentelemetry.io/otel* to v1.39.0/v1.31.0. tests/go.mod only upgrades part of that set, so align the shared OpenTelemetry versions to a patched line (v1.42.0+) to pick up the CVE fixes consistently.

🧰 Tools
🪛 OSV Scanner (2.4.0)

[HIGH] 203-203: go.opentelemetry.io/otel 1.39.0: OpenTelemetry-Go: multi-value baggage header extraction causes excessive allocations (remote dos amplification)

(GHSA-mh2q-q3fh-2475)


[HIGH] 207-207: go.opentelemetry.io/otel/sdk 1.39.0: OpenTelemetry Go SDK Vulnerable to Arbitrary Code Execution via PATH Hijacking in go.opentelemetry.io/otel/sdk

(GO-2026-4394)


[HIGH] 207-207: go.opentelemetry.io/otel/sdk 1.39.0: OpenTelemetry Go SDK Vulnerable to Arbitrary Code Execution via PATH Hijacking

(GHSA-9h8m-3fm2-qjrq)


[HIGH] 207-207: go.opentelemetry.io/otel/sdk 1.39.0: opentelemetry-go: BSD kenv command not using absolute path enables PATH hijacking

(GHSA-hfvc-g4fc-pqhx)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` around lines 203 - 208, Update the OpenTelemetry dependency set in
go.mod so all go.opentelemetry.io/otel*, including otlptracegrpc, are aligned to
the same patched release series rather than mixing v1.39.0 and v1.31.0. Use the
existing dependency entries around the otel, otel/sdk, otel/trace, and otlp
exporter declarations to bump them together to v1.42.0 or later, and keep
tests/go.mod in sync if it mirrors these versions.

go.opentelemetry.io/proto/otlp v1.9.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.48.0 // indirect
golang.org/x/net v0.50.0 // indirect
golang.org/x/crypto v0.47.0 // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/oauth2 v0.35.0 // indirect
golang.org/x/sys v0.42.0 // indirect
golang.org/x/text v0.34.0 // indirect
golang.org/x/sys v0.40.0 // indirect
golang.org/x/text v0.33.0 // indirect
golang.org/x/time v0.14.0 // indirect
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
gonum.org/v1/gonum v0.16.0 // indirect
google.golang.org/api v0.267.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20260128011058-8636f8732409 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260209200024-4cfbd4190f57 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260209200024-4cfbd4190f57 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260203192932-546029d2fa20 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260203192932-546029d2fa20 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading
Loading