diff --git a/.devcontainer/genesis-example.json b/.devcontainer/genesis-example.json index 9438cfc..8997fe7 100644 --- a/.devcontainer/genesis-example.json +++ b/.devcontainer/genesis-example.json @@ -1,42 +1,41 @@ { - "config": { - "chainId": 99999, - "homesteadBlock": 0, - "eip150Block": 0, - "eip150Hash": "0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0", - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "muirGlacierBlock": 0, - "subnetEVMTimestamp": 0, - "feeConfig": { - "gasLimit": 15000000, - "minBaseFee": 25000000000, - "targetGas": 15000000, - "baseFeeChangeDenominator": 36, - "minBlockGasCost": 0, - "maxBlockGasCost": 1000000, - "targetBlockRate": 2, - "blockGasCostStep": 200000 - }, - "allowFeeRecipients": false + "config": { + "chainId": 99999, + "homesteadBlock": 0, + "eip150Block": 0, + "eip155Block": 0, + "eip158Block": 0, + "byzantiumBlock": 0, + "constantinopleBlock": 0, + "petersburgBlock": 0, + "istanbulBlock": 0, + "muirGlacierBlock": 0, + "subnetEVMTimestamp": 0, + "feeConfig": { + "gasLimit": 15000000, + "minBaseFee": 25000000000, + "targetGas": 15000000, + "baseFeeChangeDenominator": 36, + "minBlockGasCost": 0, + "maxBlockGasCost": 1000000, + "targetBlockRate": 2, + "blockGasCostStep": 200000 }, - "alloc": { - "8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC": { - "balance": "0x295BE96E64066972000000" - } - }, - "nonce": "0x0", - "timestamp": "0x0", - "extraData": "0x00", - "gasLimit": "0xe4e1c0", - "difficulty": "0x0", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "0x0000000000000000000000000000000000000000", - "number": "0x0", - "gasUsed": "0x0", - "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000" - } \ No newline at end of file + "allowFeeRecipients": false + }, + "alloc": { + "8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC": { + "balance": "0x295BE96E64066972000000" + } + }, + "nonce": "0x0", + "timestamp": "0x0", + "extraData": "0x00", + "gasLimit": "0xe4e1c0", + "difficulty": "0x0", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "coinbase": "0x0000000000000000000000000000000000000000", + "number": "0x0", + "gasUsed": "0x0", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000" +} diff --git a/README.md b/README.md index 2e1d24b..ed9a1ed 100644 --- a/README.md +++ b/README.md @@ -164,4 +164,5 @@ In order to upgrade the Subnet-EVM version, you need to change the version in `g [v0.1.3] AvalancheGo@v1.10.9-v1.10.12 (Protocol Version: 28) [v0.1.4] AvalancheGo@v1.10.9-v1.10.12 (Protocol Version: 28) [v0.1.5] AvalancheGo@v1.10.13-v1.10.14 (Protocol Version: 29) +[v0.1.6] AvalancheGo@v1.10.15 (Protocol Version: 30) ``` diff --git a/compatibility.json b/compatibility.json index 7e7a2a3..e8e2d32 100644 --- a/compatibility.json +++ b/compatibility.json @@ -1,5 +1,6 @@ { "rpcChainVMProtocolVersion": { + "v0.1.6": 30, "v0.1.5": 29, "v0.1.4": 28, "v0.1.3": 28, diff --git a/contracts/README.md b/contracts/README.md index 800dcce..ae997c5 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -113,7 +113,6 @@ Subnet-EVM must activate any precompiles used in the test in the genesis: "chainId": 43214, "homesteadBlock": 0, "eip150Block": 0, - "eip150Hash": "0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0", "eip155Block": 0, "eip158Block": 0, "byzantiumBlock": 0, diff --git a/go.mod b/go.mod index 002e69b..3f282d4 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/ava-labs/precompile-evm go 1.20 require ( - github.com/ava-labs/avalanchego v1.10.14 - github.com/ava-labs/subnet-evm v0.5.8 + github.com/ava-labs/avalanchego v1.10.15 + github.com/ava-labs/subnet-evm v0.5.9 github.com/ethereum/go-ethereum v1.12.0 github.com/onsi/ginkgo/v2 v2.8.1 github.com/onsi/gomega v1.26.0 @@ -16,7 +16,7 @@ require ( github.com/DataDog/zstd v1.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.7-rc.1 // indirect + github.com/ava-labs/coreth v0.12.8-rc.1 // 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 diff --git a/go.sum b/go.sum index ea1f004..cc61d87 100644 --- a/go.sum +++ b/go.sum @@ -57,12 +57,12 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/avalanchego v1.10.14 h1:1jTMrikYD49Pb64ZLUi2z2BnNGLzIGip4fValq6/YfE= -github.com/ava-labs/avalanchego v1.10.14/go.mod h1:En/ti2xoxQqJuN6t9ne2ogckU9leuZzTjl5mbEsfjTc= -github.com/ava-labs/coreth v0.12.7-rc.1 h1:fvjow2Jqkq1RNtW4v2Kx0DdTVp+3+fCY421TxpDDRfM= -github.com/ava-labs/coreth v0.12.7-rc.1/go.mod h1:sNbwitXv4AhLvWpSqy6V8yzkhGFeWBQFD31/xiRDJ5M= -github.com/ava-labs/subnet-evm v0.5.8 h1:CHDCgZFpvKcgAGTiYDOrDXC5My09L8DNct6NsNiEK/U= -github.com/ava-labs/subnet-evm v0.5.8/go.mod h1:gT3NSswQqopAaJ1UVtB/TiViE6H5Ib684M9FCsy7+D8= +github.com/ava-labs/avalanchego v1.10.15 h1:GQ1bkwgKnv5D/yUwXUjWPFqx1cWrf35WOaHSykHUXyE= +github.com/ava-labs/avalanchego v1.10.15/go.mod h1:fHTzxKZOMdM0n4EEXDDR0V3Ieb/Jnz7PM8zAsJRsh2U= +github.com/ava-labs/coreth v0.12.8-rc.1 h1:tvJcxQTQzxIQqx8TnrxdyMhZYbdsMaiy6AEiOyjvaa4= +github.com/ava-labs/coreth v0.12.8-rc.1/go.mod h1:GBH5SxHZdScSp95IijDs9+Gxw/QDIWvfoLKiJMNYLsE= +github.com/ava-labs/subnet-evm v0.5.9 h1:IYWj5j83C2oterPOrxOix6/qYCua85HTQ/viMFHNPOM= +github.com/ava-labs/subnet-evm v0.5.9/go.mod h1:n4/abB4BYU1xlAqD15uKz6pRROOh/5u5Jxf4JPK6DbY= 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= diff --git a/plugin/main.go b/plugin/main.go index b8e884e..801f088 100644 --- a/plugin/main.go +++ b/plugin/main.go @@ -18,7 +18,7 @@ import ( //_ "github.com/ava-labs/precompile-evm/{yourprecompilepkg}" ) -const Version = "v0.1.5" +const Version = "v0.1.6" func main() { versionString := fmt.Sprintf("Precompile-EVM/%s Subnet-EVM/%s [AvalancheGo=%s, rpcchainvm=%d]", Version, evm.Version, version.Current, version.RPCChainVMProtocol) diff --git a/scripts/build_image.sh b/scripts/build_image.sh index 22785bb..3174993 100755 --- a/scripts/build_image.sh +++ b/scripts/build_image.sh @@ -16,8 +16,10 @@ source "$ROOT_DIR_PATH"/scripts/versions.sh # Load the constants source "$ROOT_DIR_PATH"/scripts/constants.sh -echo "Building Docker Image: $DOCKERHUB_REPO:$BUILD_IMAGE_ID based of $AVALANCHEGO_VERSION" +BUILD_IMAGE_ID=${BUILD_IMAGE_ID:-"$AVALANCHE_VERSION-$PRECOMPILE_COMMIT_ID"} + +echo "Building Docker Image: $DOCKERHUB_REPO:$BUILD_IMAGE_ID based of $AVALANCHE_VERSION" docker build -t "$DOCKERHUB_REPO:$BUILD_IMAGE_ID" "$ROOT_DIR_PATH" -f "$ROOT_DIR_PATH/Dockerfile" \ - --build-arg AVALANCHE_VERSION="$AVALANCHEGO_VERSION" \ + --build-arg AVALANCHE_VERSION="$AVALANCHE_VERSION" \ --build-arg PRECOMPILE_COMMIT="$PRECOMPILE_COMMIT" \ --build-arg CURRENT_BRANCH="$CURRENT_BRANCH" diff --git a/scripts/constants.sh b/scripts/constants.sh index fbe1eb9..3124649 100755 --- a/scripts/constants.sh +++ b/scripts/constants.sh @@ -25,8 +25,6 @@ fi echo "Using branch: ${CURRENT_BRANCH}" -BUILD_IMAGE_ID=${BUILD_IMAGE_ID:-"$AVALANCHEGO_VERSION-$PRECOMPILE_COMMIT_ID"} - # Static compilation STATIC_LD_FLAGS='' if [ "${STATIC_COMPILATION:-}" = 1 ]; then @@ -39,4 +37,4 @@ fi # # We use "export" here instead of just setting a bash variable because we need # to pass this flag to all child processes spawned by the shell. -export CGO_CFLAGS="-O -D__BLST_PORTABLE__" +export CGO_CFLAGS="-O2 -D__BLST_PORTABLE__" diff --git a/scripts/install_avalanchego_release.sh b/scripts/install_avalanchego_release.sh index 6f4923e..06c8972 100755 --- a/scripts/install_avalanchego_release.sh +++ b/scripts/install_avalanchego_release.sh @@ -11,7 +11,7 @@ source "$ROOT_DIR_PATH"/scripts/versions.sh # Load the constants source "$ROOT_DIR_PATH"/scripts/constants.sh -VERSION=$AVALANCHEGO_VERSION +VERSION=$AVALANCHE_VERSION ############################ # download avalanchego diff --git a/scripts/versions.sh b/scripts/versions.sh index f7c55f0..aa26233 100755 --- a/scripts/versions.sh +++ b/scripts/versions.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Set up the versions to be used - populate ENV variables only if they are not already populated -SUBNET_EVM_VERSION=${SUBNET_EVM_VERSION:-'v0.5.8'} +SUBNET_EVM_VERSION=${SUBNET_EVM_VERSION:-'v0.5.9'} # Don't export them as they're used in the context of other calls -AVALANCHEGO_VERSION=${AVALANCHE_VERSION:-'v1.10.14'} +AVALANCHE_VERSION=${AVALANCHE_VERSION:-'v1.10.15'} GINKGO_VERSION=${GINKGO_VERSION:-'v2.2.0'}