Skip to content

Commit

Permalink
Code sync to go-ethereum v1.13.14 (#1152)
Browse files Browse the repository at this point in the history
* all changes from v.13.2-x branch

* squash initial changes

* remove unneeded files

* fix lint

* gas estimation fix

* accounts/keystore: fix test with sleep

* rpc fixes

* try with a smaller limit

* logging

* change the trim fn

* remove main_test from rpc

* txpool: remove unused "PendingFrom"

* set local-txs-enabled in load tests

* ready to format

* format: remove upstream go-ethereum

* format: rename packages as fork

* Revert "format: remove avalanche header"

This reverts commit 09d505bd5e906ac186643061437e665b116b5bf6.

* fix logging

* deadcode linting

* more linting

* fix mock

* fix unused

* expecteds

* passing UTs

* add comment

* unused

* resolve some open issues

* undo script change

* test resillience

* fix compile

* wip

* test is fixed

* fix expecteds

* nits

* fix merge

* remove todos

* try

* try

* try

* docker stuff

* fix

* does this work

* fix

* hardcode for now

* fix

* hardcode for now

* remove TODO comments

* fix

* make txindexer more similar to upstream

* peer/network: move ctx check

* enforce tips in miner

* align nits with arr4n

* remove use of deprecated type core.GenesisAccount

* Revert "peer/network: move ctx check"

This reverts commit 147da5f.

* fix ctx check

* fix ctx again

* undo vm_test changes

* reduce diffs with ARR4N's branch

* update for enforcing gasTip

* unbuffer chan

* update to use commit(true)

* use TestOnlyAllowDuplicateBlocks

* Revert "update to use commit(true)"

This reverts commit 71d949e.

* overflow in state_transition err

* add http body limit flag (#1327)

* Tail lock revisited (#1328)

* avoid modifying the pointer

* improve readability

* prevent race in tail reading

* improve repairTxIndexTail readability

* use shared func

---------

Co-authored-by: Ceyhun Onur <ceyhun.onur@avalabs.org>
  • Loading branch information
darioush and ceyonur authored Sep 2, 2024
1 parent 252592a commit a929cb3
Show file tree
Hide file tree
Showing 257 changed files with 5,083 additions and 4,790 deletions.
1 change: 0 additions & 1 deletion .github/workflows/publish_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ on:
branches:
- master


jobs:
publish_docker_image:
name: Publish Docker Image
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
)

// The ABI holds information about a contract's context and available
// invokable methods. It will allow you to type check function calls and
// invocable methods. It will allow you to type check function calls and
// packs data accordingly.
type ABI struct {
Constructor Method
Expand Down
47 changes: 13 additions & 34 deletions accounts/abi/bind/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,47 +94,20 @@ type BlockHashContractCaller interface {
// 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

// HeaderByNumber returns a block header from the current canonical chain. If
// number is nil, the latest known header is returned.
HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)

// AcceptedCodeAt returns the code of the given account in the accepted state.
AcceptedCodeAt(ctx context.Context, account common.Address) ([]byte, error)

// AcceptedNonceAt retrieves the current accepted nonce associated with an account.
AcceptedNonceAt(ctx context.Context, account common.Address) (uint64, error)

// SuggestGasPrice retrieves the currently suggested gas price to allow a timely
// execution of a transaction.
SuggestGasPrice(ctx context.Context) (*big.Int, error)

// SuggestGasTipCap retrieves the currently suggested 1559 priority fee to allow
// a timely execution of a transaction.
SuggestGasTipCap(ctx context.Context) (*big.Int, error)

// EstimateGas tries to estimate the gas needed to execute a specific
// transaction based on the current pending state of the backend blockchain.
// There is no guarantee that this is the true gas limit requirement as other
// transactions may be added or removed by miners, but it should provide a basis
// for setting a reasonable default.
EstimateGas(ctx context.Context, call interfaces.CallMsg) (gas uint64, err error)

// SendTransaction injects the transaction into the pending pool for execution.
SendTransaction(ctx context.Context, tx *types.Transaction) error
}

// ContractFilterer defines the methods needed to access log events using one-off
// queries or continuous event subscriptions.
type ContractFilterer interface {
// FilterLogs executes a log filter operation, blocking during execution and
// returning all the results in one batch.
//
// TODO(karalabe): Deprecate when the subscription one can return past data too.
FilterLogs(ctx context.Context, query interfaces.FilterQuery) ([]types.Log, error)

// SubscribeFilterLogs creates a background log filtering operation, returning
// a subscription immediately, which can be used to stream the found events.
SubscribeFilterLogs(ctx context.Context, query interfaces.FilterQuery, ch chan<- types.Log) (interfaces.Subscription, error)
// NonceAt retrieves the nonce associated with an account.
NonceAt(ctx context.Context, account common.Address, blockNum *big.Int) (uint64, error)
}

// DeployBackend wraps the operations needed by WaitMined and WaitDeployed.
Expand All @@ -143,6 +116,12 @@ type DeployBackend interface {
CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error)
}

// ContractFilterer defines the methods needed to access log events using one-off
// queries or continuous event subscriptions.
type ContractFilterer interface {
interfaces.LogFilterer
}

// ContractBackend defines the methods needed to work with contracts on a read-write basis.
type ContractBackend interface {
ContractCaller
Expand Down
Loading

0 comments on commit a929cb3

Please sign in to comment.