Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8e744a9
use libevm: params, core/vm, eth/tracers/* + some of core/types (#1380)
Dec 12, 2024
4b8f1dc
libevm phase 2: Use libevm statedb from upstream (#1421)
Jan 13, 2025
0d522e7
refactor: params.ChainConfigExtra & RulesExtra -> params/extras (core…
Feb 4, 2025
f83437d
chore(core): split out code in state_processor.go and state_processor…
qdm12 Feb 7, 2025
de68986
chore(core/types): remove `Blocks`'s `Timestamp()` method (#1429)
qdm12 Feb 7, 2025
4e746c8
Merge branch 'master' into libevm
qdm12 Mar 17, 2025
2c08400
chore(deps): use libevm avalanchego based on `v1.12.3-rc.1.0` (#1514)
qdm12 Mar 25, 2025
1366b3b
chore(metrics): use libevm metrics package (#1508)
qdm12 Apr 1, 2025
fd683d5
chore(core/types): code restructure to accomodate future libevm changes
qdm12 Feb 20, 2025
825153e
chore(all): remove vmerrs package
ceyonur Feb 24, 2025
9752746
chore(core/types): header JSON and RLP serialization hooks
Feb 25, 2025
5d6e078
chore(core/types): `Header` libevm `PostCopy` hook
qdm12 Feb 25, 2025
a1f212a
chore(core/types): remove block.go and import `Block` and `Body` from…
qdm12 Feb 28, 2025
38a9521
chore(core/rawdb): add `ExampleInspectDatabase` to check custom behavior
qdm12 Feb 28, 2025
292f3df
chore(core/rawdb): `InspectDatabase` uses libevm
qdm12 Mar 2, 2025
2768dd5
chore(core/rawdb): use libevm core/rawdb
qdm12 Mar 5, 2025
a183ff8
fix(core/evm): set difficulty post shanghai to 0
Mar 5, 2025
0ffb624
chore(rawdb): migration to plugin/evm/rawdb
qdm12 Mar 11, 2025
c74aa9e
refactor(core/types): add `WithHeaderExtra` helper function
qdm12 Mar 11, 2025
8664cbf
chore(ci): check gencodec generated files are up to date
qdm12 Mar 11, 2025
821575f
refactor(core/rawdb): table-driven `InspectDatabase` config
qdm12 Mar 11, 2025
dc4f237
chore(plugin/evm): log libevm version during VM init
ARR4N Mar 14, 2025
bded714
refactor(core/types): separate subnet-evm and upstream identifiers
qdm12 Mar 19, 2025
c5a9a76
chore: remove unused `libevm` directory
ARR4N Mar 14, 2025
f5364a1
chore: disallow direct `libevm/params` import
ARR4N Mar 14, 2025
b45b79a
refactor: use upstream `core/types`
ARR4N Mar 14, 2025
d393209
refactor: move `core/types` to `plugin/evm/types`
ARR4N Mar 14, 2025
4395f6e
chore(rawdb): move plugin/evm/rawdb to plugin/evm/customrawdb
qdm12 Mar 26, 2025
fa576f0
chore(interfaces): use upstream code
qdm12 Mar 26, 2025
d6e4708
chore(types): move plugin/evm/types to plugin/evm/customtypes
qdm12 Mar 26, 2025
08e92ea
chore(all): final changes to the libevm branch
qdm12 Mar 28, 2025
4f496a0
Merge branch 'master' into libevm
qdm12 Apr 2, 2025
220454e
fix(all): critical fixes to the libevm branch (#1551)
qdm12 Apr 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 9 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: ./scripts/lint_allowed_geth_imports.sh
- run: ./scripts/lint_allowed_eth_imports.sh
shell: bash
- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -62,6 +62,12 @@ jobs:
run: echo "TIMEOUT=1200s" >> "$GITHUB_ENV"
- run: go mod download
shell: bash
- name: fjl/gencodec generated files are up to date
run: |
grep -lr -E '^// Code generated by github\.com\/fjl\/gencodec\. DO NOT EDIT\.$' . | xargs -r rm
go generate -run "github.com/fjl/gencodec" ./...
git add --intent-to-add --all
git diff --exit-code
- name: Mocks are up to date
shell: bash
run: |
Expand Down Expand Up @@ -151,7 +157,7 @@ jobs:
shell: bash
run: ./scripts/build.sh
- name: Run Warp E2E Tests
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@6c72dfc4254a3d157bba5c9c45135cb563b813e7
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@3a6bfac46f43ac2d7cc1e3fc8576ff6a8594bafa
with:
run: ./scripts/run_ginkgo_warp.sh
run_env: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego
Expand Down Expand Up @@ -179,7 +185,7 @@ jobs:
shell: bash
run: ./scripts/build.sh
- name: Run E2E Load Tests
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@6c72dfc4254a3d157bba5c9c45135cb563b813e7
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@3a6bfac46f43ac2d7cc1e3fc8576ff6a8594bafa
with:
run: ./scripts/run_ginkgo_load.sh
run_env: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego
Expand Down
10 changes: 5 additions & 5 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Pending Release

* - IMPORTANT: `eth_getProof` calls for historical state will be rejected by default.
- On archive nodes (`"pruning-enabled": false`): queries for historical proofs for state older than approximately 24 hours preceding the last accepted block will be rejected by default. This can be adjusted with the new option `historical-proof-query-window` which defines the number of blocks before the last accepted block which should be accepted for state proof queries, or set to `0` to accept any block number state query (previous behavior).
- On `pruning` nodes: queries for proofs past the tip buffer (32 blocks) will be rejected. This is in support of moving to a path based storage scheme, which does not support historical state proofs.
* * IMPORTANT: `eth_getProof` calls for historical state will be rejected by default.
* On archive nodes (`"pruning-enabled": false`): queries for historical proofs for state older than approximately 24 hours preceding the last accepted block will be rejected by default. This can be adjusted with the new option `historical-proof-query-window` which defines the number of blocks before the last accepted block which should be accepted for state proof queries, or set to `0` to accept any block number state query (previous behavior).
* On `pruning` nodes: queries for proofs past the tip buffer (32 blocks) will be rejected. This is in support of moving to a path based storage scheme, which does not support historical state proofs.
* Added `Fortuna` upgrade as optional and defaulting to a `nil` timestamp.

## [v0.7.2](https://github.com/ava-labs/subnet-evm/releases/tag/v0.7.2)
Expand Down Expand Up @@ -42,11 +42,11 @@ The plugin version is **updated** to 39 and is compatible with AvalancheGo versi

### Updates

- Changed default write option from `Sync` to `NoSync` in PebbleDB
* Changed default write option from `Sync` to `NoSync` in PebbleDB

### Fixes

- Fixed database close on shutdown
* Fixed database close on shutdown

## [v0.6.11](https://github.com/ava-labs/subnet-evm/releases/tag/v0.6.11)

Expand Down
4 changes: 2 additions & 2 deletions accounts/abi/abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import (
"io"
"math/big"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/crypto"
)

// The ABI holds information about a contract's context and available
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/abi_extra_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"testing"

"github.com/ethereum/go-ethereum/common"
"github.com/ava-labs/libevm/common"
"github.com/stretchr/testify/require"
)

Expand Down
6 changes: 3 additions & 3 deletions accounts/abi/abi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ import (
"strings"
"testing"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/common/math"
"github.com/ava-labs/libevm/crypto"
"github.com/stretchr/testify/assert"
)

Expand Down
14 changes: 7 additions & 7 deletions accounts/abi/bind/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ import (
"io"
"math/big"

"github.com/ava-labs/subnet-evm/accounts"
"github.com/ava-labs/subnet-evm/accounts/external"
"github.com/ava-labs/subnet-evm/accounts/keystore"
"github.com/ava-labs/subnet-evm/core/types"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
"github.com/ava-labs/libevm/accounts"
"github.com/ava-labs/libevm/accounts/external"
"github.com/ava-labs/libevm/accounts/keystore"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/core/types"
"github.com/ava-labs/libevm/crypto"
"github.com/ava-labs/libevm/log"
)

// ErrNoChainID is returned whenever the user failed to specify a chain id.
Expand Down
22 changes: 11 additions & 11 deletions accounts/abi/bind/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import (
"errors"
"math/big"

"github.com/ava-labs/subnet-evm/core/types"
"github.com/ava-labs/subnet-evm/interfaces"
"github.com/ethereum/go-ethereum/common"
ethereum "github.com/ava-labs/libevm"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/core/types"
)

var (
Expand Down Expand Up @@ -64,7 +64,7 @@ type ContractCaller interface {

// CallContract executes an Ethereum contract call with the specified data as the
// input.
CallContract(ctx context.Context, call interfaces.CallMsg, blockNumber *big.Int) ([]byte, error)
CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
}

// AcceptedContractCaller defines methods to perform contract calls on the pending state.
Expand All @@ -75,7 +75,7 @@ type AcceptedContractCaller interface {
AcceptedCodeAt(ctx context.Context, contract common.Address) ([]byte, error)

// AcceptedCallContract executes an Ethereum contract call against the accepted state.
AcceptedCallContract(ctx context.Context, call interfaces.CallMsg) ([]byte, error)
AcceptedCallContract(ctx context.Context, call ethereum.CallMsg) ([]byte, error)
}

// BlockHashContractCaller defines methods to perform contract calls on a specific block hash.
Expand All @@ -86,18 +86,18 @@ type BlockHashContractCaller interface {
CodeAtHash(ctx context.Context, contract common.Address, blockHash common.Hash) ([]byte, error)

// CallContractAtHash executes an Ethereum contract call against the state at the specified block hash.
CallContractAtHash(ctx context.Context, call interfaces.CallMsg, blockHash common.Hash) ([]byte, error)
CallContractAtHash(ctx context.Context, call ethereum.CallMsg, blockHash common.Hash) ([]byte, error)
}

// ContractTransactor defines the methods needed to allow operating with a contract
// on a write only basis. Besides the transacting method, the remainder are helpers
// used when the user does not provide some needed values, but rather leaves it up
// to the transactor to decide.
type ContractTransactor interface {
interfaces.GasEstimator
interfaces.GasPricer
interfaces.GasPricer1559
interfaces.TransactionSender
ethereum.GasEstimator
ethereum.GasPricer
ethereum.GasPricer1559
ethereum.TransactionSender

// HeaderByNumber returns a block header from the current canonical chain. If
// number is nil, the latest known header is returned.
Expand All @@ -119,7 +119,7 @@ type DeployBackend interface {
// ContractFilterer defines the methods needed to access log events using one-off
// queries or continuous event subscriptions.
type ContractFilterer interface {
interfaces.LogFilterer
ethereum.LogFilterer
}

// ContractBackend defines the methods needed to work with contracts on a read-write basis.
Expand Down
21 changes: 11 additions & 10 deletions accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ package backends
import (
"context"

ethereum "github.com/ava-labs/libevm"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/core/types"
"github.com/ava-labs/subnet-evm/accounts/abi/bind"
"github.com/ava-labs/subnet-evm/core/types"
"github.com/ava-labs/subnet-evm/ethclient/simulated"
"github.com/ava-labs/subnet-evm/interfaces"
"github.com/ethereum/go-ethereum/common"
)

// Verify that SimulatedBackend implements required interfaces
Expand All @@ -42,14 +43,14 @@ var (
_ bind.ContractBackend = (*SimulatedBackend)(nil)
_ bind.DeployBackend = (*SimulatedBackend)(nil)

_ interfaces.ChainReader = (*SimulatedBackend)(nil)
_ interfaces.ChainStateReader = (*SimulatedBackend)(nil)
_ interfaces.TransactionReader = (*SimulatedBackend)(nil)
_ interfaces.TransactionSender = (*SimulatedBackend)(nil)
_ interfaces.ContractCaller = (*SimulatedBackend)(nil)
_ interfaces.GasEstimator = (*SimulatedBackend)(nil)
_ interfaces.GasPricer = (*SimulatedBackend)(nil)
_ interfaces.LogFilterer = (*SimulatedBackend)(nil)
_ ethereum.ChainReader = (*SimulatedBackend)(nil)
_ ethereum.ChainStateReader = (*SimulatedBackend)(nil)
_ ethereum.TransactionReader = (*SimulatedBackend)(nil)
_ ethereum.TransactionSender = (*SimulatedBackend)(nil)
_ ethereum.ContractCaller = (*SimulatedBackend)(nil)
_ ethereum.GasEstimator = (*SimulatedBackend)(nil)
_ ethereum.GasPricer = (*SimulatedBackend)(nil)
_ ethereum.LogFilterer = (*SimulatedBackend)(nil)
_ interfaces.AcceptedStateReader = (*SimulatedBackend)(nil)
_ interfaces.AcceptedContractCaller = (*SimulatedBackend)(nil)
)
Expand Down
18 changes: 9 additions & 9 deletions accounts/abi/bind/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ import (
"strings"
"sync"

ethereum "github.com/ava-labs/libevm"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/core/types"
"github.com/ava-labs/libevm/crypto"
"github.com/ava-labs/libevm/event"
"github.com/ava-labs/subnet-evm/accounts/abi"
"github.com/ava-labs/subnet-evm/core/types"
"github.com/ava-labs/subnet-evm/interfaces"
"github.com/ava-labs/subnet-evm/rpc"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/event"
)

const basefeeWiggleMultiplier = 2
Expand Down Expand Up @@ -179,7 +179,7 @@ func (c *BoundContract) Call(opts *CallOpts, results *[]interface{}, method stri
return err
}
var (
msg = interfaces.CallMsg{From: opts.From, To: &c.address, Data: input}
msg = ethereum.CallMsg{From: opts.From, To: &c.address, Data: input}
ctx = ensureContext(opts.Context)
code []byte
output []byte
Expand Down Expand Up @@ -374,7 +374,7 @@ func (c *BoundContract) estimateGasLimit(opts *TransactOpts, contract *common.Ad
return 0, ErrNoCode
}
}
msg := interfaces.CallMsg{
msg := ethereum.CallMsg{
From: opts.From,
To: contract,
GasPrice: gasPrice,
Expand Down Expand Up @@ -458,7 +458,7 @@ func (c *BoundContract) FilterLogs(opts *FilterOpts, name string, query ...[]int
// Start the background filtering
logs := make(chan types.Log, 128)

config := interfaces.FilterQuery{
config := ethereum.FilterQuery{
Addresses: []common.Address{c.address},
Topics: topics,
FromBlock: new(big.Int).SetUint64(opts.Start),
Expand Down Expand Up @@ -507,7 +507,7 @@ func (c *BoundContract) WatchLogs(opts *WatchOpts, name string, query ...[]inter
// Start the background filtering
logs := make(chan types.Log, 128)

config := interfaces.FilterQuery{
config := ethereum.FilterQuery{
Addresses: []common.Address{c.address},
Topics: topics,
}
Expand Down
20 changes: 10 additions & 10 deletions accounts/abi/bind/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ import (
"strings"
"testing"

ethereum "github.com/ava-labs/libevm"
"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/common/hexutil"
"github.com/ava-labs/libevm/core/types"
"github.com/ava-labs/libevm/crypto"
"github.com/ava-labs/libevm/rlp"
"github.com/ava-labs/subnet-evm/accounts/abi"
"github.com/ava-labs/subnet-evm/accounts/abi/bind"
"github.com/ava-labs/subnet-evm/core/types"
"github.com/ava-labs/subnet-evm/interfaces"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/rlp"
"github.com/stretchr/testify/assert"
)

Expand Down Expand Up @@ -77,7 +77,7 @@ func (mt *mockTransactor) SuggestGasTipCap(ctx context.Context) (*big.Int, error
return mt.gasTipCap, nil
}

func (mt *mockTransactor) EstimateGas(ctx context.Context, call interfaces.CallMsg) (gas uint64, err error) {
func (mt *mockTransactor) EstimateGas(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error) {
return 0, nil
}

Expand All @@ -99,7 +99,7 @@ func (mc *mockCaller) CodeAt(ctx context.Context, contract common.Address, block
return mc.codeAtBytes, mc.codeAtErr
}

func (mc *mockCaller) CallContract(ctx context.Context, call interfaces.CallMsg, blockNumber *big.Int) ([]byte, error) {
func (mc *mockCaller) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) {
mc.callContractBlockNumber = blockNumber
return mc.callContractBytes, mc.callContractErr
}
Expand All @@ -119,7 +119,7 @@ func (mc *mockAcceptedCaller) AcceptedCodeAt(ctx context.Context, contract commo
return mc.acceptedCodeAtBytes, mc.acceptedCodeAtErr
}

func (mc *mockAcceptedCaller) AcceptedCallContract(ctx context.Context, call interfaces.CallMsg) ([]byte, error) {
func (mc *mockAcceptedCaller) AcceptedCallContract(ctx context.Context, call ethereum.CallMsg) ([]byte, error) {
mc.acceptedCallContractCalled = true
return mc.acceptedCallContractBytes, mc.acceptedCallContractErr
}
Expand All @@ -139,7 +139,7 @@ func (mc *mockBlockHashCaller) CodeAtHash(ctx context.Context, contract common.A
return mc.codeAtHashBytes, mc.codeAtHashErr
}

func (mc *mockBlockHashCaller) CallContractAtHash(ctx context.Context, call interfaces.CallMsg, hash common.Hash) ([]byte, error) {
func (mc *mockBlockHashCaller) CallContractAtHash(ctx context.Context, call ethereum.CallMsg, hash common.Hash) ([]byte, error) {
mc.callContractAtHashCalled = true
return mc.callContractAtHashBytes, mc.callContractAtHashErr
}
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/bind/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ import (
"text/template"
"unicode"

"github.com/ava-labs/libevm/log"
"github.com/ava-labs/subnet-evm/accounts/abi"
"github.com/ethereum/go-ethereum/log"
)

// Lang is a target programming language selector to generate bindings for.
Expand Down
Loading
Loading