Skip to content

Commit

Permalink
Merge branch 'main' into hello-world-example
Browse files Browse the repository at this point in the history
  • Loading branch information
ceyonur committed Nov 10, 2023
2 parents 6a4dd26 + d7772c8 commit 0a70b13
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 59 deletions.
79 changes: 39 additions & 40 deletions .devcontainer/genesis-example.json
Original file line number Diff line number Diff line change
@@ -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"
}
"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"
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,5 @@ In order to upgrade the Subnet-EVM version, you need to change the version in `g
[v0.1.3] [email protected] (Protocol Version: 28)
[v0.1.4] [email protected] (Protocol Version: 28)
[v0.1.5] [email protected] (Protocol Version: 29)
[v0.1.6] [email protected] (Protocol Version: 30)
```
1 change: 1 addition & 0 deletions compatibility.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"rpcChainVMProtocolVersion": {
"v0.1.6": 30,
"v0.1.5": 29,
"v0.1.4": 28,
"v0.1.3": 28,
Expand Down
1 change: 0 additions & 1 deletion contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion plugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions scripts/build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 1 addition & 3 deletions scripts/constants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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__"
2 changes: 1 addition & 1 deletion scripts/install_avalanchego_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts/versions.sh
Original file line number Diff line number Diff line change
@@ -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'}

0 comments on commit 0a70b13

Please sign in to comment.