Skip to content

Commit

Permalink
AvalancheGo@v1.10.10 (#486)
Browse files Browse the repository at this point in the history
* AvalancheGo@v1.10.10

* use uint for merkledb

* update comment
  • Loading branch information
patrick-ogrady authored Sep 20, 2023
1 parent 838307c commit ee68a26
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 32 deletions.
4 changes: 2 additions & 2 deletions examples/morpheusvm/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/ava-labs/avalanche-network-runner v1.7.2-0.20230825184751-fbe081616f02
github.com/ava-labs/avalanchego v1.10.10-rc.0.0.20230831160820-2eabd228952b
github.com/ava-labs/avalanchego v1.10.10
github.com/ava-labs/hypersdk v0.0.1
github.com/fatih/color v1.13.0
github.com/onsi/ginkgo/v2 v2.8.1
Expand All @@ -19,7 +19,7 @@ require (
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/VictoriaMetrics/fastcache v1.10.0 // indirect
github.com/ava-labs/coreth v0.12.5-rc.3 // indirect
github.com/ava-labs/coreth v0.12.5-rc.6 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/btcsuite/btcd/btcutil v1.1.3 // indirect
Expand Down
8 changes: 4 additions & 4 deletions examples/morpheusvm/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/ava-labs/avalanche-network-runner v1.7.2-0.20230825184751-fbe081616f02 h1:VThDljvPfIWneBO6Y99Nboe3yrJwI8clhRiQ9zuHVB8=
github.com/ava-labs/avalanche-network-runner v1.7.2-0.20230825184751-fbe081616f02/go.mod h1:euKHwZ77sGvGfhVj4v9WPM4jD2b5N80ldE2XHqO7lwA=
github.com/ava-labs/avalanchego v1.10.10-rc.0.0.20230831160820-2eabd228952b h1:FlMhXn8LmX/ITa8phEdt5z+CTZjmJ6piUyQOmsR+tPQ=
github.com/ava-labs/avalanchego v1.10.10-rc.0.0.20230831160820-2eabd228952b/go.mod h1:C8R5uiltpc8MQ62ixxgODR+15mesWF0aAw3H+Qrl9Iw=
github.com/ava-labs/coreth v0.12.5-rc.3 h1:cpmC+fSZMsO4gaFWqXHzAHrJACf05u5HPAYmwh7nmkU=
github.com/ava-labs/coreth v0.12.5-rc.3/go.mod h1:HI+jTIflnDFBd0bledgkgid1Uurwr8q1h7zb3LsFsSo=
github.com/ava-labs/avalanchego v1.10.10 h1:EYX4LVotcfdtIQ0nJSBTcoisubx/Bzk2tM1aP3yiYiw=
github.com/ava-labs/avalanchego v1.10.10/go.mod h1:6UA0nxxTvvpyuCbP2DSzx9+7uWQfQx9DPApK8JptLiE=
github.com/ava-labs/coreth v0.12.5-rc.6 h1:OajGUyKkO5Q82XSuMa8T5UD6QywtCHUiZ4Tv3RFmRBU=
github.com/ava-labs/coreth v0.12.5-rc.6/go.mod h1:s5wVyy+5UCCk2m0Tq3jVmy0UqOpKBDYqRE13gInCJVs=
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
Expand Down
2 changes: 1 addition & 1 deletion examples/morpheusvm/scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if ! [[ "$0" =~ scripts/run.sh ]]; then
exit 255
fi

VERSION=2eabd228952b6b7c9075bc45653f70643d9a5a7c
VERSION=v1.10.10
MAX_UINT64=18446744073709551615
MODE=${MODE:-run}
LOGLEVEL=${LOGLEVEL:-info}
Expand Down
4 changes: 2 additions & 2 deletions examples/tokenvm/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/ava-labs/avalanche-network-runner v1.7.2-0.20230825184751-fbe081616f02
github.com/ava-labs/avalanchego v1.10.10-rc.0.0.20230831160820-2eabd228952b
github.com/ava-labs/avalanchego v1.10.10
github.com/ava-labs/hypersdk v0.0.1
github.com/fatih/color v1.13.0
github.com/onsi/ginkgo/v2 v2.8.1
Expand All @@ -22,7 +22,7 @@ require (
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/VictoriaMetrics/fastcache v1.10.0 // indirect
github.com/ava-labs/coreth v0.12.5-rc.3 // indirect
github.com/ava-labs/coreth v0.12.5-rc.6 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bep/debounce v1.2.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
Expand Down
8 changes: 4 additions & 4 deletions examples/tokenvm/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/ava-labs/avalanche-network-runner v1.7.2-0.20230825184751-fbe081616f02 h1:VThDljvPfIWneBO6Y99Nboe3yrJwI8clhRiQ9zuHVB8=
github.com/ava-labs/avalanche-network-runner v1.7.2-0.20230825184751-fbe081616f02/go.mod h1:euKHwZ77sGvGfhVj4v9WPM4jD2b5N80ldE2XHqO7lwA=
github.com/ava-labs/avalanchego v1.10.10-rc.0.0.20230831160820-2eabd228952b h1:FlMhXn8LmX/ITa8phEdt5z+CTZjmJ6piUyQOmsR+tPQ=
github.com/ava-labs/avalanchego v1.10.10-rc.0.0.20230831160820-2eabd228952b/go.mod h1:C8R5uiltpc8MQ62ixxgODR+15mesWF0aAw3H+Qrl9Iw=
github.com/ava-labs/coreth v0.12.5-rc.3 h1:cpmC+fSZMsO4gaFWqXHzAHrJACf05u5HPAYmwh7nmkU=
github.com/ava-labs/coreth v0.12.5-rc.3/go.mod h1:HI+jTIflnDFBd0bledgkgid1Uurwr8q1h7zb3LsFsSo=
github.com/ava-labs/avalanchego v1.10.10 h1:EYX4LVotcfdtIQ0nJSBTcoisubx/Bzk2tM1aP3yiYiw=
github.com/ava-labs/avalanchego v1.10.10/go.mod h1:6UA0nxxTvvpyuCbP2DSzx9+7uWQfQx9DPApK8JptLiE=
github.com/ava-labs/coreth v0.12.5-rc.6 h1:OajGUyKkO5Q82XSuMa8T5UD6QywtCHUiZ4Tv3RFmRBU=
github.com/ava-labs/coreth v0.12.5-rc.6/go.mod h1:s5wVyy+5UCCk2m0Tq3jVmy0UqOpKBDYqRE13gInCJVs=
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
Expand Down
2 changes: 1 addition & 1 deletion examples/tokenvm/scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if ! [[ "$0" =~ scripts/run.sh ]]; then
exit 255
fi

VERSION=2eabd228952b6b7c9075bc45653f70643d9a5a7c
VERSION=v1.10.10
MAX_UINT64=18446744073709551615
MODE=${MODE:-run}
LOGLEVEL=${LOGLEVEL:-info}
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ module github.com/ava-labs/hypersdk
go 1.20

require (
github.com/NYTimes/gziphandler v1.1.1
github.com/ava-labs/avalanche-network-runner v1.7.2-0.20230825184751-fbe081616f02
github.com/ava-labs/avalanchego v1.10.10-rc.0.0.20230831160820-2eabd228952b
github.com/ava-labs/avalanchego v1.10.10
github.com/cockroachdb/pebble v0.0.0-20230224221607-fccb83b60d5c
github.com/golang/mock v1.6.0
github.com/gorilla/mux v1.8.0
github.com/gorilla/rpc v1.2.0
github.com/gorilla/websocket v1.5.0
github.com/manifoldco/promptui v0.9.0
Expand All @@ -15,6 +17,7 @@ require (
github.com/onsi/ginkgo/v2 v2.8.1
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
github.com/prometheus/client_golang v1.16.0
github.com/rs/cors v1.7.0
github.com/stretchr/testify v1.8.3
github.com/tetratelabs/wazero v1.3.0
go.opentelemetry.io/otel v1.11.2
Expand All @@ -30,9 +33,8 @@ require (
require (
github.com/DataDog/zstd v1.5.2 // indirect
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/VictoriaMetrics/fastcache v1.10.0 // indirect
github.com/ava-labs/coreth v0.12.5-rc.3 // indirect
github.com/ava-labs/coreth v0.12.5-rc.6 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/btcsuite/btcd/btcutil v1.1.3 // indirect
Expand Down Expand Up @@ -65,7 +67,6 @@ require (
github.com/google/btree v1.1.2 // indirect
github.com/google/pprof v0.0.0-20230406165453-00490a63f317 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 // indirect
github.com/hashicorp/go-bexpr v0.1.10 // indirect
Expand Down Expand Up @@ -101,7 +102,6 @@ require (
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/rs/cors v1.7.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/ava-labs/avalanche-network-runner v1.7.2-0.20230825184751-fbe081616f02 h1:VThDljvPfIWneBO6Y99Nboe3yrJwI8clhRiQ9zuHVB8=
github.com/ava-labs/avalanche-network-runner v1.7.2-0.20230825184751-fbe081616f02/go.mod h1:euKHwZ77sGvGfhVj4v9WPM4jD2b5N80ldE2XHqO7lwA=
github.com/ava-labs/avalanchego v1.10.10-rc.0.0.20230831160820-2eabd228952b h1:FlMhXn8LmX/ITa8phEdt5z+CTZjmJ6piUyQOmsR+tPQ=
github.com/ava-labs/avalanchego v1.10.10-rc.0.0.20230831160820-2eabd228952b/go.mod h1:C8R5uiltpc8MQ62ixxgODR+15mesWF0aAw3H+Qrl9Iw=
github.com/ava-labs/coreth v0.12.5-rc.3 h1:cpmC+fSZMsO4gaFWqXHzAHrJACf05u5HPAYmwh7nmkU=
github.com/ava-labs/coreth v0.12.5-rc.3/go.mod h1:HI+jTIflnDFBd0bledgkgid1Uurwr8q1h7zb3LsFsSo=
github.com/ava-labs/avalanchego v1.10.10 h1:EYX4LVotcfdtIQ0nJSBTcoisubx/Bzk2tM1aP3yiYiw=
github.com/ava-labs/avalanchego v1.10.10/go.mod h1:6UA0nxxTvvpyuCbP2DSzx9+7uWQfQx9DPApK8JptLiE=
github.com/ava-labs/coreth v0.12.5-rc.6 h1:OajGUyKkO5Q82XSuMa8T5UD6QywtCHUiZ4Tv3RFmRBU=
github.com/ava-labs/coreth v0.12.5-rc.6/go.mod h1:s5wVyy+5UCCk2m0Tq3jVmy0UqOpKBDYqRE13gInCJVs=
github.com/ava-labs/wazero v0.0.2-hypersdk h1:zsl0saXFEU/dnZ7/cFVDXoSKeavzjrqv1PoR/vKaKmY=
github.com/ava-labs/wazero v0.0.2-hypersdk/go.mod h1:0U0G41+ochRKoPKCJlh0jMg1CHkyfK8kDqiirMmKY8A=
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
Expand Down
16 changes: 7 additions & 9 deletions vm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,13 @@ func (vm *VM) Initialize(
rootGenParallelism := math.Max(parallelism/2, 1)
merkleRegistry := prometheus.NewRegistry()
vm.stateDB, err = merkledb.New(ctx, vm.rawStateDB, merkledb.Config{
// RootGenConcurrency only limits the number of goroutines
// that a single root generation will use, not the number
// of goroutines that all root generations will use if called
// concurrently.
RootGenConcurrency: rootGenParallelism,
EvictionBatchSize: vm.config.GetStateEvictionBatchSize(),
HistoryLength: vm.config.GetStateHistoryLength(),
IntermediateNodeCacheSize: vm.config.GetIntermediateNodeCacheSize(),
ValueNodeCacheSize: vm.config.GetValueNodeCacheSize(),
// RootGenConcurrency limits the number of goroutines
// that will be used across all concurrent root generations.
RootGenConcurrency: uint(rootGenParallelism),
EvictionBatchSize: uint(vm.config.GetStateEvictionBatchSize()),
HistoryLength: uint(vm.config.GetStateHistoryLength()),
IntermediateNodeCacheSize: uint(vm.config.GetIntermediateNodeCacheSize()),
ValueNodeCacheSize: uint(vm.config.GetValueNodeCacheSize()),
Reg: merkleRegistry,
Tracer: vm.tracer,
})
Expand Down

0 comments on commit ee68a26

Please sign in to comment.