Skip to content

Commit

Permalink
squash coreth v0.13.1-rc.5...v0.12.11-rc.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ceyonur committed Mar 1, 2024
1 parent e08eed8 commit f78e1cb
Show file tree
Hide file tree
Showing 27 changed files with 691 additions and 1,089 deletions.
251 changes: 251 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
# Release Notes

## [v0.13.0](https://github.com/ava-labs/coreth/releases/tag/v0.13.0)

- Bump AvalancheGo to v1.11.1
- Bump minimum Go version to 1.21.7
- Add more error messages to warp backend

## [v0.12.10](https://github.com/ava-labs/coreth/releases/tag/v0.12.10)

- Add support for off-chain warp messages
- Add support for getBlockReceipts RPC API
- Fix issue with state sync for large blocks
- Migrating Push Gossip to avalanchego network SDK handlers

## [v0.12.9](https://github.com/ava-labs/coreth/releases/tag/v0.12.9)

- Add concurrent prefetching of trie nodes during block processing
- Add `skip-tx-indexing` flag to disable transaction indexing and unindexing
- Update acceptor tip before sending chain events to subscribers
- Add soft cap on total block data size for state sync block requests

## [v0.12.8](https://github.com/ava-labs/coreth/releases/tag/v0.12.8)

- Bump AvalancheGo to v1.10.15
- Fix crash in prestate tracer on memory read

## [v0.12.7](https://github.com/ava-labs/coreth/releases/tag/v0.12.7)

- Bump AvalancheGo to v1.10.14

## [v0.12.6](https://github.com/ava-labs/coreth/releases/tag/v0.12.6)

- Remove lock options from HTTP handlers
- Fix deadlock in `eth_getLogs` when matcher session hits a missing block
- Replace Kurtosis E2E tests with avctl test framework

## [v0.12.5](https://github.com/ava-labs/coreth/releases/tag/v0.12.5)

- Add P2P SDK Pull Gossip to mempool
- Fix hanging requests on shutdown that could cause ungraceful shutdown
- Increase batch size writing snapshot diff to disk
- Migrate geth changes from v1.11.4 through v1.12.0
- Bump AvalancheGo dependency to v1.10.10

## [v0.12.4](https://github.com/ava-labs/coreth/releases/tag/v0.12.4)

- Fix API handler crash for `lookupState` in `prestate` tracer
- Fix API handler crash for LOG edge cases in the `callTracer`
- Fix regression in `eth_getLogs` serving request for blocks containing no Ethereum transactions
- Export `CalculateDynamicFee`

## [v0.12.3](https://github.com/ava-labs/coreth/releases/tag/v0.12.3)

- Migrate go-ethereum changes through v1.11.4
- Downgrade API error log from `Warn` to `Info`

## [v0.12.2](https://github.com/ava-labs/coreth/releases/tag/v0.12.2)

- Increase default trie dirty cache size from 256MB to 512MB

## [v0.12.1](https://github.com/ava-labs/coreth/releases/tag/v0.12.1)

- Bump AvalancheGo dependency to v1.10.1
- Improve block building logic
- Use shorter ctx while reading snapshot to serve state sync requests
- Remove proposer activation time from gossiper
- Fail outstanding requests on shutdown
- Make state sync request sizes configurable

## [v0.12.0](https://github.com/ava-labs/coreth/releases/tag/v0.12.0)

- Increase C-Chain block gas limit to 15M in Cortina
- Add Mainnet and Fuji Cortina Activation timestamps

## [v0.11.9](https://github.com/ava-labs/coreth/releases/tag/v0.11.9)

- Downgrade SetPreference log from warn to debug

## [v0.11.8](https://github.com/ava-labs/coreth/releases/tag/v0.11.8)

- Fix shutdown hanging during state sync
- Add pre-check for imported UTXOs
- Fix bug in `BadBlockReason` output to display error string correctly
- Update golangci-lint version to v1.51.2

## [v0.11.7](https://github.com/ava-labs/coreth/releases/tag/v0.11.7)

- Enable state sync by default when syncing from an empty database
- Increase block gas limit to 15M for Cortina Network Upgrade
- Add back file tracer endpoint
- Add back JS tracer

## [v0.11.6](https://github.com/ava-labs/coreth/releases/tag/v0.11.6)

- Bump AvalancheGo to v1.9.6

## [v0.11.5](https://github.com/ava-labs/coreth/releases/tag/v0.11.5)

- Add support for eth_call over VM2VM messaging
- Add config flags for tx pool behavior

## [v0.11.4](https://github.com/ava-labs/coreth/releases/tag/v0.11.4)

- Add config option to perform database inspection on startup
- Add configurable transaction indexing to reduce disk usage
- Add special case to allow transactions using Nick's Method to bypass API level replay protection
- Add counter metrics for number of accepted/processed logs
- Improve header and logs caching using maximum accepted depth cache

## [v0.11.3](https://github.com/ava-labs/coreth/releases/tag/v0.11.3)

- Add counter for number of processed and accepted transactions
- Wait for state sync goroutines to complete on shutdown
- Bump go-ethereum dependency to v1.10.26
- Increase soft cap on transaction size limits
- Add back isForkIncompatible checks for all existing forks
- Clean up Apricot Phase 6 code

## [v0.11.2](https://github.com/ava-labs/coreth/releases/tag/v0.11.2)

- Add trie clean cache journaling to disk to improve processing time on restart
- Fix regression where snapshot could be marked as stale by async acceptor during block processing
- Add fine-grained block processing metrics

## [v0.11.1](https://github.com/ava-labs/coreth/releases/tag/v0.11.1)

- Add cache size config parameters for `trie-clean-cache`, `trie-dirty-cache`, `trie-dirty-commit-target`, and `snapshot-cache`
- Increase default `trie-clean-cache` size from 256 MB to 512 MB
- Increase default `snapshot-cache` size from 128 MB to 256 MB
- Add optional flag to skip chain config upgrade check on startup (allows VM to start after missing a network upgrade)
- Make Avalanche blockchainID (separate from EVM ChainID) available within the EVM
- Record block height when performing state sync
- Add support for VM-to-VM messaging
- Move `eth_getChainConfig` under the `BlockChainAPI`
- Simplify block builder timer logic to a simple retry delay
- Add Opentelemetry support
- Simplify caching logic for gas price estimation

## [v0.11.0](https://github.com/ava-labs/coreth/releases/tag/v0.11.0)

- Update Chain Config compatibility check to compare against last accepted block timestamp
- Bump go-ethereum dependency to v1.10.25
- Add Banff activation times for Mainnet and Fuji for October 18 4pm UTC and October 3 2pm UTC respectively
- Banff cleanup

## [v0.10.0](https://github.com/ava-labs/coreth/releases/tag/v0.10.0)

- Deprecate Native Asset Call and Native Asset Balance
- Deprecate Import/Export of non-AVAX Avalanche Native Tokens via Atomic Transactions
- Add failure reason to bad block API

## [v0.9.0](https://github.com/ava-labs/coreth/releases/tag/v0.9.0)

- Migrate to go-ethereum v1.10.23
- Add API to fetch Chain Config

## [v0.8.16](https://github.com/ava-labs/coreth/releases/tag/v0.8.16)

- Fix bug in `codeToFetch` database accessors that caused an error when starting/stopping state sync
- Bump go-ethereum version to v1.10.21
- Update gas price estimation to limit lookback window based on block timestamps
- Add metrics for processed/accepted gas
- Simplify syntactic block verification
- Ensure statedb errors during block processing are logged
- Remove deprecated gossiper/block building logic from pre-Apricot Phase 4
- Add marshal function for duration to improve config output

## [v0.8.15](https://github.com/ava-labs/coreth/releases/tag/v0.8.15)

- Add optional JSON logging
- Bump minimum go version to v1.18.1
- Add interface for suppporting stateful precompiles
- Remove legacy code format from the database
- Enable expensive metrics by default
- Fix atomic trie sync bug that could result in storing incorrect metadata
- Update state sync metrics to use counter for number of items received

## [v0.8.14](https://github.com/ava-labs/coreth/releases/tag/v0.8.14)

- Bump go-ethereum dependency to v1.10.20
- Update API names used to enable services in `eth-api` config flag. Prior names are supported but deprecated, please update your configuration [accordingly](https://docs.avax.network/nodes/maintain/chain-config-flags#c-chain-configs)
- Optimizes state sync by parallelizing trie syncing
- Adds `eth_syncing` API for compatibility. Note: This API is only accessible after bootstrapping and always returns `"false"`, since the node will no longer be syncing at that point.
- Adds metrics to atomic transaction mempool
- Adds metrics for incoming/outgoing mempool gossip

## [v0.8.13](https://github.com/ava-labs/coreth/releases/tag/v0.8.13)

- Bump go-ethereum dependency to v1.10.18
- Parallelize state sync code fetching
- Deprecated CB58 format for API calls

## [v0.8.12](https://github.com/ava-labs/coreth/releases/tag/v0.8.12)

- Add peer bandwidth tracking to optimize state sync message routing
- Fix leaf request handler bug to ensure the handler delivers a valid range proof
- Remove redundant proof keys from leafs response message format
- Improve state sync request retry logic
- Improve state sync handler metrics
- Improve state sync ETA

## [v0.8.11](https://github.com/ava-labs/coreth/releases/tag/v0.8.11)

- Improve state sync leaf request serving by optimistically reading leaves from snapshot
- Add acceptor queue within `core/blockchain.go`
- Cap size of TrieDB dirties cache during block acceptance to reduce commit size at 4096 block interval
- Refactor state sync block fetching
- Improve state sync metrics

## [v0.8.10](https://github.com/ava-labs/coreth/releases/tag/v0.8.10)

- Add beta support for fast sync
- Bump trie tip buffer size to 32
- Fix bug in metrics initialization

## [v0.8.9](https://github.com/ava-labs/coreth/releases/tag/v0.8.9)

- Fix deadlock bug on shutdown causing historical re-generation on restart
- Add API endpoint to fetch running VM Config
- Add AvalancheGo custom log formatting to C-Chain logs
- Deprecate support for JS Tracer

## [v0.8.8](https://github.com/ava-labs/coreth/releases/tag/v0.8.8)

- Reduced log level of snapshot regeneration logs
- Enabled atomic tx replacement with higher gas fees
- Parallelize trie index re-generation

## [v0.8.7](https://github.com/ava-labs/coreth/releases/tag/v0.8.7)

- Optimize FeeHistory API
- Add protection to prevent accidental corruption of archival node trie index
- Add capability to restore complete trie index on best effort basis
- Round up fastcache sizes to utilize all mmap'd memory in chunks of 64MB

## [v0.8.6](https://github.com/ava-labs/coreth/releases/tag/v0.8.6)

- Migrate go-ethereum v1.10.16 changes
- Increase FeeHistory maximum historical limit to improve MetaMask UI on C-Chain
- Enable chain state metrics

## [v0.8.5](https://github.com/ava-labs/coreth/releases/tag/v0.8.5)

- Add support for offline pruning
- Refactor VM networking layer
- Enable metrics by default
- Mark RPC call specific metrics as expensive
- Add Abigen support for native asset call precompile
- Fix bug in BLOCKHASH opcode during traceBlock
- Fix bug in handling updated chain config on startup
6 changes: 4 additions & 2 deletions core/txpool/txpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ type Config struct {
// DefaultConfig contains the default configurations for the transaction
// pool.
var DefaultConfig = Config{
Journal: "transactions.rlp",
// If we re-enable txpool journaling, we should also add the saved local
// transactions to the p2p gossip on startup.
Journal: "",
Rejournal: time.Hour,

PriceLimit: 1,
Expand All @@ -212,7 +214,7 @@ var DefaultConfig = Config{
AccountQueue: 64,
GlobalQueue: 1024,

Lifetime: 3 * time.Hour,
Lifetime: 10 * time.Minute,
}

// sanitize checks the provided user configurations and changes anything that's
Expand Down
5 changes: 1 addition & 4 deletions core/txpool/txpool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import (
var (
// testTxPoolConfig is a transaction pool configuration without stateful disk
// sideeffects used during testing.
testTxPoolConfig Config
testTxPoolConfig = DefaultConfig

// eip1559Config is a chain config with EIP-1559 enabled at block 0.
eip1559Config *params.ChainConfig
Expand All @@ -76,9 +76,6 @@ var (
)

func init() {
testTxPoolConfig = DefaultConfig
testTxPoolConfig.Journal = ""

cpy := *params.TestChainConfig
eip1559Config = &cpy
eip1559Config.SubnetEVMTimestamp = utils.NewUint64(0)
Expand Down
9 changes: 8 additions & 1 deletion eth/api_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,14 @@ func (b *EthAPIBackend) SendTx(ctx context.Context, signedTx *types.Transaction)
if err := ctx.Err(); err != nil {
return err
}
return b.eth.txPool.AddLocal(signedTx)
if err := b.eth.txPool.AddLocal(signedTx); err != nil {
return err
}

// We only enqueue transactions for push gossip if they were submitted over the RPC and
// added to the mempool.
b.eth.gossiper.Add(signedTx)
return nil
}

func (b *EthAPIBackend) GetPoolTransactions() (types.Transactions, error) {
Expand Down
10 changes: 9 additions & 1 deletion eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,20 @@ type Settings struct {
MaxBlocksPerRequest int64 // Maximum number of blocks to serve per getLogs request
}

// PushGossiper sends pushes pending transactions to peers until they are
// removed from the mempool.
type PushGossiper interface {
Add(*types.Transaction)
}

// Ethereum implements the Ethereum full node service.
type Ethereum struct {
config *Config

// Handlers
txPool *txpool.TxPool
blockchain *core.BlockChain
gossiper PushGossiper

// DB interfaces
chainDb ethdb.Database // Block chain database
Expand Down Expand Up @@ -117,6 +124,7 @@ func roundUpCacheSize(input int, allocSize int) int {
func New(
stack *node.Node,
config *Config,
gossiper PushGossiper,
chainDb ethdb.Database,
settings Settings,
lastAcceptedHash common.Hash,
Expand Down Expand Up @@ -150,6 +158,7 @@ func New(

eth := &Ethereum{
config: config,
gossiper: gossiper,
chainDb: chainDb,
eventMux: new(event.TypeMux),
accountManager: stack.AccountManager(),
Expand Down Expand Up @@ -228,7 +237,6 @@ func New(

eth.bloomIndexer.Start(eth.blockchain)

config.TxPool.Journal = ""
eth.txPool = txpool.NewTxPool(config.TxPool, eth.blockchain.Config(), eth.blockchain)

eth.miner = miner.New(eth, &config.Miner, eth.blockchain.Config(), eth.EventMux(), eth.engine, clock)
Expand Down
Loading

0 comments on commit f78e1cb

Please sign in to comment.