mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
Bump versions (#1185)
* state sync: initialize snapshots in bootstrap set mode (#557) * state sync: initialize snapshots in bootstrap set mode * move clear summary path * undo rename * improve abortGeneration locks (#559) * bump versions * bump latest coreth version * bump min go version --------- Co-authored-by: Darioush Jalali <[email protected]>
This commit is contained in:
committed by
GitHub
co-authored by
Darioush Jalali
parent
cf17ae0b65
commit
ccc2391a2b
@@ -11,7 +11,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '~1.21.9'
|
||||
go-version: "~1.21.10"
|
||||
check-latest: true
|
||||
- run: go mod download
|
||||
shell: bash
|
||||
|
||||
@@ -4,11 +4,11 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: 'Tag to include in artifact name'
|
||||
description: "Tag to include in artifact name"
|
||||
required: true
|
||||
push:
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||
- "v[0-9]+.[0-9]+.[0-9]+"
|
||||
|
||||
jobs:
|
||||
release:
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '~1.21.9'
|
||||
go-version: "~1.21.10"
|
||||
check-latest: true
|
||||
- name: Set up arm64 cross compiler
|
||||
run: |
|
||||
|
||||
@@ -5,11 +5,11 @@ on:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- '*'
|
||||
- "*"
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
min_go_version: '~1.21.9'
|
||||
min_go_version: "~1.21.10"
|
||||
grafana_url: https://grafana-experimental.avax-dev.network/d/kBQpRdWnk/avalanche-main-dashboard?orgId=1&refresh=10s&var-filter=is_ephemeral_node%7C%3D%7Cfalse&var-filter=gh_repo%7C%3D%7Cava-labs%2Fsubnet-evm&var-filter=gh_run_id%7C%3D%7C${{ github.run_id }}&var-filter=gh_run_attempt%7C%3D%7C${{ github.run_attempt }}
|
||||
|
||||
jobs:
|
||||
@@ -58,7 +58,7 @@ jobs:
|
||||
shell: bash
|
||||
- run: ./scripts/build_test.sh
|
||||
env:
|
||||
TIMEOUT: ${{ env.TIMEOUT }}
|
||||
TIMEOUT: ${{ env.TIMEOUT }}
|
||||
shell: bash
|
||||
- run: ./scripts/coverage.sh
|
||||
shell: bash
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
ARG AVALANCHE_VERSION
|
||||
|
||||
# ============= Compilation Stage ================
|
||||
FROM golang:1.21.9-bullseye AS builder
|
||||
FROM golang:1.21.10-bullseye AS builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
|
||||
@@ -59,8 +59,9 @@ The Subnet EVM runs in a separate process from the main AvalancheGo process and
|
||||
[v0.6.0] [email protected] (Protocol Version: 33)
|
||||
[v0.6.1] [email protected] (Protocol Version: 33)
|
||||
[v0.6.2] [email protected] (Protocol Version: 34)
|
||||
[v0.6.3] [email protected].5 (Protocol Version: 35)
|
||||
[v0.6.4] [email protected].5 (Protocol Version: 35)
|
||||
[v0.6.3] [email protected].6 (Protocol Version: 35)
|
||||
[v0.6.4] [email protected].6 (Protocol Version: 35)
|
||||
[v0.6.5] [email protected] (Protocol Version: 35)
|
||||
```
|
||||
|
||||
## API
|
||||
@@ -100,7 +101,7 @@ To support these changes, there have been a number of changes to the SubnetEVM b
|
||||
|
||||
### Clone Subnet-evm
|
||||
|
||||
First install Go 1.21.9 or later. Follow the instructions [here](https://go.dev/doc/install). You can verify by running `go version`.
|
||||
First install Go 1.21.10 or later. Follow the instructions [here](https://go.dev/doc/install). You can verify by running `go version`.
|
||||
|
||||
Set `$GOPATH` environment variable properly for Go to look for Go Workspaces. Please read [this](https://go.dev/doc/code) for details. You can verify by running `echo $GOPATH`.
|
||||
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"rpcChainVMProtocolVersion": {
|
||||
"v0.6.5": 35,
|
||||
"v0.6.4": 35,
|
||||
"v0.6.3": 35,
|
||||
"v0.6.2": 34,
|
||||
@@ -45,4 +46,4 @@
|
||||
"v0.1.1": 10,
|
||||
"v0.1.0": 9
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -568,9 +568,6 @@ func (t *Tree) AbortGeneration() {
|
||||
// for it to shutdown before returning (if it is running). This call should not
|
||||
// be made concurrently.
|
||||
func (dl *diskLayer) abortGeneration() bool {
|
||||
dl.lock.Lock()
|
||||
defer dl.lock.Unlock()
|
||||
|
||||
// Store ideal time for abort to get better estimate of load
|
||||
//
|
||||
// Note that we set this time regardless if abortion was skipped otherwise we
|
||||
@@ -580,7 +577,10 @@ func (dl *diskLayer) abortGeneration() bool {
|
||||
}
|
||||
|
||||
// If the disk layer is running a snapshot generator, abort it
|
||||
if dl.genAbort != nil && dl.genStats == nil {
|
||||
dl.lock.RLock()
|
||||
shouldAbort := dl.genAbort != nil && dl.genStats == nil
|
||||
dl.lock.RUnlock()
|
||||
if shouldAbort {
|
||||
abort := make(chan struct{})
|
||||
dl.genAbort <- abort
|
||||
<-abort
|
||||
|
||||
@@ -4,7 +4,7 @@ go 1.21.10
|
||||
|
||||
require (
|
||||
github.com/VictoriaMetrics/fastcache v1.12.1
|
||||
github.com/ava-labs/avalanchego v1.11.6-0.20240515173814-c68a07f7dc40
|
||||
github.com/ava-labs/avalanchego v1.11.6
|
||||
github.com/cespare/cp v0.1.0
|
||||
github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
@@ -55,7 +55,7 @@ require (
|
||||
require (
|
||||
github.com/DataDog/zstd v1.5.2 // indirect
|
||||
github.com/NYTimes/gziphandler v1.1.1 // indirect
|
||||
github.com/ava-labs/coreth v0.13.4-geth-1.13.8 // indirect
|
||||
github.com/ava-labs/coreth v0.13.4-rc.0 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bits-and-blooms/bitset v1.10.0 // indirect
|
||||
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
|
||||
|
||||
@@ -56,10 +56,10 @@ github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY
|
||||
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8=
|
||||
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
|
||||
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
|
||||
github.com/ava-labs/avalanchego v1.11.6-0.20240515173814-c68a07f7dc40 h1:vH0n7GYHYwzRE08u26G+5+lnBxLekSNbHR4JonRxwEk=
|
||||
github.com/ava-labs/avalanchego v1.11.6-0.20240515173814-c68a07f7dc40/go.mod h1:i7n85ExR039Txd/vaCBxhhli/yfeaAdZXT9PqR8g96g=
|
||||
github.com/ava-labs/coreth v0.13.4-geth-1.13.8 h1:xMLf9C8Td9j95C5L128itRDpCnXD4VN3aAJd/wFRhSw=
|
||||
github.com/ava-labs/coreth v0.13.4-geth-1.13.8/go.mod h1:mP1QRzaQKq+y+bqyx3xMR3/K/+TpjHbPJi+revI6Y38=
|
||||
github.com/ava-labs/avalanchego v1.11.6 h1:gPWNQSV+bY3XW9OhfJ4wNwxp/qidTSHA4V+VYP8kWpQ=
|
||||
github.com/ava-labs/avalanchego v1.11.6/go.mod h1:s8U9tOakcU6ftSL4JcRcFrNNYI5JbekNCjTkdqZWYdE=
|
||||
github.com/ava-labs/coreth v0.13.4-rc.0 h1:UU7SOlLVeviT59Y+FyDyrdt0Wvl+SOj0EyET8ZtH1ZY=
|
||||
github.com/ava-labs/coreth v0.13.4-rc.0/go.mod h1:mP1QRzaQKq+y+bqyx3xMR3/K/+TpjHbPJi+revI6Y38=
|
||||
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
|
||||
@@ -85,7 +85,7 @@ type StateSyncClient interface {
|
||||
ParseStateSummary(ctx context.Context, summaryBytes []byte) (block.StateSummary, error)
|
||||
|
||||
// additional methods required by the evm package
|
||||
StateSyncClearOngoingSummary() error
|
||||
ClearOngoingSummary() error
|
||||
Shutdown() error
|
||||
Error() error
|
||||
}
|
||||
@@ -125,8 +125,8 @@ func (client *stateSyncerClient) GetOngoingSyncStateSummary(context.Context) (bl
|
||||
return summary, nil
|
||||
}
|
||||
|
||||
// StateSyncClearOngoingSummary clears any marker of an ongoing state sync summary
|
||||
func (client *stateSyncerClient) StateSyncClearOngoingSummary() error {
|
||||
// ClearOngoingSummary clears any marker of an ongoing state sync summary
|
||||
func (client *stateSyncerClient) ClearOngoingSummary() error {
|
||||
if err := client.metadataDB.Delete(stateSyncSummaryKey); err != nil {
|
||||
return fmt.Errorf("failed to clear ongoing summary: %w", err)
|
||||
}
|
||||
@@ -167,12 +167,6 @@ func (client *stateSyncerClient) acceptSyncSummary(proposedSummary message.SyncS
|
||||
"lastAccepted", client.lastAcceptedHeight,
|
||||
"syncableHeight", proposedSummary.Height(),
|
||||
)
|
||||
if err := client.StateSyncClearOngoingSummary(); err != nil {
|
||||
return block.StateSyncSkipped, fmt.Errorf("failed to clear ongoing summary after skipping state sync: %w", err)
|
||||
}
|
||||
// Initialize snapshots if we're skipping state sync, since it will not have been initialized on
|
||||
// startup.
|
||||
client.chain.BlockChain().InitializeSnapshots()
|
||||
return block.StateSyncSkipped, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ var (
|
||||
// GitCommit is set by the build script
|
||||
GitCommit string
|
||||
// Version is the version of Subnet EVM
|
||||
Version string = "v0.6.4"
|
||||
Version string = "v0.6.5"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
+8
-1
@@ -610,7 +610,7 @@ func (vm *VM) initializeStateSyncClient(lastAcceptedHeight uint64) error {
|
||||
// If StateSync is disabled, clear any ongoing summary so that we will not attempt to resume
|
||||
// sync using a snapshot that has been modified by the node running normal operations.
|
||||
if !vm.config.StateSyncEnabled {
|
||||
return vm.StateSyncClient.StateSyncClearOngoingSummary()
|
||||
return vm.StateSyncClient.ClearOngoingSummary()
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -665,6 +665,13 @@ func (vm *VM) SetState(_ context.Context, state snow.State) error {
|
||||
if err := vm.StateSyncClient.Error(); err != nil {
|
||||
return err
|
||||
}
|
||||
// After starting bootstrapping, do not attempt to resume a previous state sync.
|
||||
if err := vm.StateSyncClient.ClearOngoingSummary(); err != nil {
|
||||
return err
|
||||
}
|
||||
// Ensure snapshots are initialized before bootstrapping (i.e., if state sync is skipped).
|
||||
// Note calling this function has no effect if snapshots are already initialized.
|
||||
vm.blockChain.InitializeSnapshots()
|
||||
return nil
|
||||
case snow.NormalOp:
|
||||
// Initialize goroutines related to block building once we enter normal operation as there is no need to handle mempool gossip before this point.
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
# Don't export them as they're used in the context of other calls
|
||||
AVALANCHE_VERSION=${AVALANCHE_VERSION:-'c68a07f7dc40'}
|
||||
AVALANCHE_VERSION=${AVALANCHE_VERSION:-'v1.11.6'}
|
||||
GINKGO_VERSION=${GINKGO_VERSION:-'v2.2.0'}
|
||||
|
||||
# This won't be used, but it's here to make code syncs easier
|
||||
LATEST_CORETH_VERSION='0.13.1-rc.5'
|
||||
LATEST_CORETH_VERSION='0.13.4'
|
||||
|
||||
Reference in New Issue
Block a user