diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index fcebecb8..fd7a003a 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -8,7 +8,7 @@ on: jobs: test: - name: Unit + name: Unit & Integration runs-on: ubuntu-latest steps: - name: Set up Go 1.x diff --git a/.github/workflows/slow-tests.yml b/.github/workflows/slow-tests.yml new file mode 100644 index 00000000..90abc341 --- /dev/null +++ b/.github/workflows/slow-tests.yml @@ -0,0 +1,27 @@ +name: Tests + +on: + push: + branches: [ main, feat/* ] + pull_request: + branches: [ main, feat/* ] + +jobs: + test: + name: Slow + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.x + uses: actions/setup-go@v3 + with: + go-version: 1.20.7 + id: go + + - name: Check out code + uses: actions/checkout@v3 + + - name: Get dependencies + run: | + go get -v -t -d ./... + - name: Slow tests + run: make slow-tests diff --git a/Makefile b/Makefile index c0c94861..34a3c4e4 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,11 @@ test-coverage: @echo "Running unit tests" CURRENT_DIRECTORY=$(CURRENT_DIRECTORY) go test -cover -coverprofile=coverage.txt -covermode=atomic -v ${TESTS_TO_RUN} +slow-tests: clean-test + @docker compose -f docker/docker-compose.yml build + @docker compose -f docker/docker-compose.yml up & go test ./integrationTests/... -v -tags slow + @docker compose -f docker/docker-compose.yml down -v + lint-install: ifeq (,$(wildcard test -f bin/golangci-lint)) @echo "Installing golint" diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 00000000..ae7a2c78 --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,11 @@ +version: "3.9" + +services: + multiversx: + image: multiversx/chainsimulator:v1.7.12-fix1 + restart: unless-stopped + ports: + - 8085:8085 + volumes: + - "../scripts:/docker/scripts" + entrypoint: "./chainsimulator" diff --git a/go.mod b/go.mod index b063aecc..e6023fb3 100644 --- a/go.mod +++ b/go.mod @@ -8,13 +8,13 @@ require ( github.com/gin-contrib/cors v1.4.0 github.com/gin-contrib/pprof v1.4.0 github.com/gin-gonic/gin v1.9.1 - github.com/multiversx/mx-chain-communication-go v1.0.13-0.20240126121117-627adccf10ad - github.com/multiversx/mx-chain-core-go v1.2.19-0.20240129082057-a76d0c995cf2 - github.com/multiversx/mx-chain-crypto-go v1.2.10-0.20231206065052-38843c1f1479 - github.com/multiversx/mx-chain-go v1.7.3-0.20240229193314-26883ef1e91b - github.com/multiversx/mx-chain-logger-go v1.0.14-0.20240129144507-d00e967c890c - github.com/multiversx/mx-chain-simulator-go v1.7.2 - github.com/multiversx/mx-sdk-go v1.3.12-0.20240228130921-940b47b0f2be + github.com/multiversx/mx-chain-communication-go v1.0.14 + github.com/multiversx/mx-chain-core-go v1.2.20 + github.com/multiversx/mx-chain-crypto-go v1.2.11 + github.com/multiversx/mx-chain-go v1.7.12 + github.com/multiversx/mx-chain-logger-go v1.0.14 + github.com/multiversx/mx-chain-simulator-go v1.7.12 + github.com/multiversx/mx-sdk-go v1.4.1 github.com/pelletier/go-toml v1.9.3 github.com/stretchr/testify v1.8.4 github.com/urfave/cli v1.22.10 @@ -131,15 +131,15 @@ require ( github.com/multiformats/go-multistream v0.4.1 // indirect github.com/multiformats/go-varint v0.0.7 // indirect github.com/multiversx/concurrent-map v0.1.4 // indirect - github.com/multiversx/mx-chain-es-indexer-go v1.4.19-0.20240129150813-a772c480d33a // indirect - github.com/multiversx/mx-chain-proxy-go v1.1.41 // indirect - github.com/multiversx/mx-chain-scenario-go v1.4.3-0.20240212160120-cc32d1580157 // indirect - github.com/multiversx/mx-chain-storage-go v1.0.15-0.20240130081611-aeea9336e979 // indirect - github.com/multiversx/mx-chain-vm-common-go v1.5.12-0.20240227112124-bfd3f5676e5a // indirect - github.com/multiversx/mx-chain-vm-go v1.5.28-0.20240216071136-6d748b5d6a72 // indirect - github.com/multiversx/mx-chain-vm-v1_2-go v1.2.66-0.20240129145751-f814f5525edb // indirect - github.com/multiversx/mx-chain-vm-v1_3-go v1.3.67-0.20240129150004-536a22d9c618 // indirect - github.com/multiversx/mx-chain-vm-v1_4-go v1.4.96-0.20240216071525-f7d1b8ce8662 // indirect + github.com/multiversx/mx-chain-es-indexer-go v1.4.21 // indirect + github.com/multiversx/mx-chain-proxy-go v1.1.48 // indirect + github.com/multiversx/mx-chain-scenario-go v1.4.3 // indirect + github.com/multiversx/mx-chain-storage-go v1.0.15 // indirect + github.com/multiversx/mx-chain-vm-common-go v1.5.12 // indirect + github.com/multiversx/mx-chain-vm-go v1.5.29 // indirect + github.com/multiversx/mx-chain-vm-v1_2-go v1.2.67 // indirect + github.com/multiversx/mx-chain-vm-v1_3-go v1.3.68 // indirect + github.com/multiversx/mx-chain-vm-v1_4-go v1.4.97 // indirect github.com/multiversx/mx-components-big-int v1.0.0 // indirect github.com/onsi/ginkgo/v2 v2.11.0 // indirect github.com/opencontainers/runtime-spec v1.0.2 // indirect @@ -185,12 +185,12 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.17.0 // indirect + golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.19.0 // indirect + golang.org/x/net v0.21.0 // indirect golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.15.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.15.0 // indirect gonum.org/v1/gonum v0.11.0 // indirect diff --git a/go.sum b/go.sum index 8f62ccb3..94911291 100644 --- a/go.sum +++ b/go.sum @@ -443,40 +443,40 @@ github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/n github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= github.com/multiversx/concurrent-map v0.1.4 h1:hdnbM8VE4b0KYJaGY5yJS2aNIW9TFFsUYwbO0993uPI= github.com/multiversx/concurrent-map v0.1.4/go.mod h1:8cWFRJDOrWHOTNSqgYCUvwT7c7eFQ4U2vKMOp4A/9+o= -github.com/multiversx/mx-chain-communication-go v1.0.13-0.20240126121117-627adccf10ad h1:izxTyKCxvT7z2mhXCWAZibSxwRVgLmq/kDovs4Nx/6Y= -github.com/multiversx/mx-chain-communication-go v1.0.13-0.20240126121117-627adccf10ad/go.mod h1:n4E8BWIV0g3AcNGe1gf+vcjUC8A2QCJ4ARQSbiUDGrI= -github.com/multiversx/mx-chain-core-go v1.2.19-0.20240129082057-a76d0c995cf2 h1:pFh9bwOTRgW173aHqA8Bmax+jYzLnRyXqRvi5alF7V4= -github.com/multiversx/mx-chain-core-go v1.2.19-0.20240129082057-a76d0c995cf2/go.mod h1:B5zU4MFyJezmEzCsAHE9YNULmGCm2zbPHvl9hazNxmE= -github.com/multiversx/mx-chain-crypto-go v1.2.10-0.20231206065052-38843c1f1479 h1:beVIhs5ysylwNplQ/bZ0h5DoDlqKNWgpWE/NMHHNmAw= -github.com/multiversx/mx-chain-crypto-go v1.2.10-0.20231206065052-38843c1f1479/go.mod h1:Ap6p7QZFtwPlb++OvCG+85BfuZ+bLP/JtQp6EwjWJsI= -github.com/multiversx/mx-chain-es-indexer-go v1.4.19-0.20240129150813-a772c480d33a h1:mOMUhbsjTq7n5oAv4KkVnL67ngS0+wkqmkiv1XJfBIY= -github.com/multiversx/mx-chain-es-indexer-go v1.4.19-0.20240129150813-a772c480d33a/go.mod h1:3aSGRJNvfUuPQkZUGHWuF11rPPxphsKGuAuIB+eD3is= -github.com/multiversx/mx-chain-go v1.7.3-0.20240229193314-26883ef1e91b h1:sjDMICjTLQjPgeq8Vmz09hUOzdlOY+2adp5H7T5iZyk= -github.com/multiversx/mx-chain-go v1.7.3-0.20240229193314-26883ef1e91b/go.mod h1:woPMicov03+VrH2iPJ+oJXj4Kvj64kLgWg/5Z90qV8M= -github.com/multiversx/mx-chain-logger-go v1.0.14-0.20240129144507-d00e967c890c h1:QIUOn8FgNRa5cir4BCWHZi/Qcr6Gg0eGNhns4+jy6+k= -github.com/multiversx/mx-chain-logger-go v1.0.14-0.20240129144507-d00e967c890c/go.mod h1:fH/fR/GEBsDjPkBoZDVJMoYo2HhlA7++DP6QfITJ1N8= -github.com/multiversx/mx-chain-proxy-go v1.1.41 h1:u5LTek2keNvd25jrOmHLp0N4AFwYFImBnrs+GR7IGRY= -github.com/multiversx/mx-chain-proxy-go v1.1.41/go.mod h1:El07IztR9QuhbNPZkd2ew2H8KS2bUqG7/0eQ28BPPsY= -github.com/multiversx/mx-chain-scenario-go v1.4.3-0.20240212160120-cc32d1580157 h1:ydzN3f+Y7H0InXuxAcNUSyVc+omNYL8uYtLqVzqaaX4= -github.com/multiversx/mx-chain-scenario-go v1.4.3-0.20240212160120-cc32d1580157/go.mod h1:ndk45i9J9McuCJpTcgiaK4ocd0yhnBBCPrlFwO6GRcs= -github.com/multiversx/mx-chain-simulator-go v1.7.2 h1:j9OzconmlO5TUeBwB03WAnAa5hDOWQ5AthR81wLlxkM= -github.com/multiversx/mx-chain-simulator-go v1.7.2/go.mod h1:nwmIqpll6x+ivi9wgTyzyBYSg3wL0KyWUpKTnzGbTjU= -github.com/multiversx/mx-chain-storage-go v1.0.15-0.20240130081611-aeea9336e979 h1:HDNz4NZum1GCj7F91hO2lEx8Dv/Fm2L93F5wZJkgLLg= -github.com/multiversx/mx-chain-storage-go v1.0.15-0.20240130081611-aeea9336e979/go.mod h1:zl1A6teNe39T8yhdZlkX3ckm5aLYrMIJJZ6Ord1E71M= -github.com/multiversx/mx-chain-vm-common-go v1.5.12-0.20240227112124-bfd3f5676e5a h1:4Dlk5Hcxlt6az5qqJfklgSlAKEYiFLv+xkFavQJgSNY= -github.com/multiversx/mx-chain-vm-common-go v1.5.12-0.20240227112124-bfd3f5676e5a/go.mod h1:OUyhCFqZKqUk1uaPsenyPDwO1830SlHNDU7Q7b6CBVI= -github.com/multiversx/mx-chain-vm-go v1.5.28-0.20240216071136-6d748b5d6a72 h1:NMHNT4NcqOdnHttYsT3ydZHVapwOctp6t+WDGDy0UEQ= -github.com/multiversx/mx-chain-vm-go v1.5.28-0.20240216071136-6d748b5d6a72/go.mod h1:YCD2Q+kpzx86ydowe/BKw/ZdzYjfH/4IxWHS0NsyuD0= -github.com/multiversx/mx-chain-vm-v1_2-go v1.2.66-0.20240129145751-f814f5525edb h1:UtiY8X73llF9OLtGb2CM7Xewae1chvPjLc8B+ZmDLjw= -github.com/multiversx/mx-chain-vm-v1_2-go v1.2.66-0.20240129145751-f814f5525edb/go.mod h1:8uugq3HUeDiE6G4AS3F8/B3zA1Pabzbl7SSD6Cebwz8= -github.com/multiversx/mx-chain-vm-v1_3-go v1.3.67-0.20240129150004-536a22d9c618 h1:1uMlT5TjiHUlx81fEH/WQANWlY0PjF3opMlW+E3L3GI= -github.com/multiversx/mx-chain-vm-v1_3-go v1.3.67-0.20240129150004-536a22d9c618/go.mod h1:4uezxguZiX42kUaYMK/x46LLbgpYqn/iQXbcGM7zdM0= -github.com/multiversx/mx-chain-vm-v1_4-go v1.4.96-0.20240216071525-f7d1b8ce8662 h1:0y1k2+FjFfWgoPCMi0nkYkCYQJtPYJvph6bre4Elqxk= -github.com/multiversx/mx-chain-vm-v1_4-go v1.4.96-0.20240216071525-f7d1b8ce8662/go.mod h1:Nvanb5BZVhqnFFlWUtn7PQ/GIsl72zPVcMEw/ZvYiQA= +github.com/multiversx/mx-chain-communication-go v1.0.14 h1:YhAUDjBBpc5h5W0A7LHLXUMIMeCgwgGvkqfAPbFqsno= +github.com/multiversx/mx-chain-communication-go v1.0.14/go.mod h1:qYCqgk0h+YpcTA84jHIpCBy6UShRwmXzHSCcdfwNrkw= +github.com/multiversx/mx-chain-core-go v1.2.20 h1:jOQ10LxxUqECnuqUYeBBT6VoZcpJDdYgOvsSGtifDdI= +github.com/multiversx/mx-chain-core-go v1.2.20/go.mod h1:B5zU4MFyJezmEzCsAHE9YNULmGCm2zbPHvl9hazNxmE= +github.com/multiversx/mx-chain-crypto-go v1.2.11 h1:MNPJoiTJA5/tedYrI0N22OorbsKDESWG0SF8MCJwcJI= +github.com/multiversx/mx-chain-crypto-go v1.2.11/go.mod h1:pcZutPdfLiAFytzCU3LxU3s8cXkvpNqquyitFSfoF3o= +github.com/multiversx/mx-chain-es-indexer-go v1.4.21 h1:rzxXCkgOsqj67GRYtqzKuf9XgHwnZLTZhU90Ck3VbrE= +github.com/multiversx/mx-chain-es-indexer-go v1.4.21/go.mod h1:V9xxOBkfV7GjN4K5SODaOetoGVpQm4snibMVPCjL0Kk= +github.com/multiversx/mx-chain-go v1.7.12 h1:cQ3g5sFZEcQmIRwi/wt+K/3d5nIwCMQRC1ZnJDRuRY4= +github.com/multiversx/mx-chain-go v1.7.12/go.mod h1:HwklJGQfMpv/yyF4oLpxjwdKCawspv1JjdgezlWBpRQ= +github.com/multiversx/mx-chain-logger-go v1.0.14 h1:PRMpAvXE7Nec2d//QNmbYfKVHMomOKmcN4UXurQWX9o= +github.com/multiversx/mx-chain-logger-go v1.0.14/go.mod h1:bDfHSdwqIimn7Gp8w+SH5KlDuGzJ//nlyEANAaTSc3o= +github.com/multiversx/mx-chain-proxy-go v1.1.48 h1:gmunv+2oimIN8ejlVAN7eWP7mt38So1WvsyiR3+94SU= +github.com/multiversx/mx-chain-proxy-go v1.1.48/go.mod h1:Ax+80b1qynepkZSxrz8QB3AO00JAL3svaLasMTE6Lh0= +github.com/multiversx/mx-chain-scenario-go v1.4.3 h1:9xeVB8TOsolXS4YEr1CZ/VZr5Qk0X+nde8nRGnxJICo= +github.com/multiversx/mx-chain-scenario-go v1.4.3/go.mod h1:Bd7/Xs3mWM6pX/REHK5dfpf3MUfjMZ7li09cfCxg2ac= +github.com/multiversx/mx-chain-simulator-go v1.7.12 h1:TG44bozDboOeAu46kQyd7yXoA3IblHWTCsvv0DEQCL0= +github.com/multiversx/mx-chain-simulator-go v1.7.12/go.mod h1:7nFlDdm0uohZBKrw0YnH3N0iZB9GT+ynY40nqIIkSDA= +github.com/multiversx/mx-chain-storage-go v1.0.15 h1:PDyP1uouAVjR32dFgM+7iaQBdReD/tKBJj10JbxXvaE= +github.com/multiversx/mx-chain-storage-go v1.0.15/go.mod h1:GZUK3sqf5onsWS/0ZPWjDCBjAL22FigQPUh252PAVk0= +github.com/multiversx/mx-chain-vm-common-go v1.5.12 h1:Q8F6DE7XhgHtWgg2rozSv4Tv5fE3ENkJz6mjRoAfht8= +github.com/multiversx/mx-chain-vm-common-go v1.5.12/go.mod h1:Sv6iS1okB6gy3HAsW6KHYtAxShNAfepKLtu//AURI8c= +github.com/multiversx/mx-chain-vm-go v1.5.29 h1:Ovz5/WM9KbD3YKRafdKI4RwtsNN36AGeNw81LZAhE70= +github.com/multiversx/mx-chain-vm-go v1.5.29/go.mod h1:n0SbVEAhIflreAGi7BnfWg4p4VHh4G8ArbvYQZsZsKQ= +github.com/multiversx/mx-chain-vm-v1_2-go v1.2.67 h1:W0bwj5zXM2JEeOEqfKTZE1ecuSJwTuRZZrl9oircRc0= +github.com/multiversx/mx-chain-vm-v1_2-go v1.2.67/go.mod h1:lrDQWpv1yZHlX6ZgWJsTMxxOkeoVTKLQsl1+mr50Z24= +github.com/multiversx/mx-chain-vm-v1_3-go v1.3.68 h1:px2YHay6BSVheLxb3gdZQX0enlqKzu6frngWEZRtr6g= +github.com/multiversx/mx-chain-vm-v1_3-go v1.3.68/go.mod h1:sIXRCenIR6FJtr3X/gDc60N6+v99Ai4hDsn6R5TKGnk= +github.com/multiversx/mx-chain-vm-v1_4-go v1.4.97 h1:fbYYqollxbIArcrC161Z9Qh5yJGW0Ax60m83Gz8+H1w= +github.com/multiversx/mx-chain-vm-v1_4-go v1.4.97/go.mod h1:56WJQio8SzOt3vWibaNkuGpqLlmTOGUSJqs3wMK69zw= github.com/multiversx/mx-components-big-int v1.0.0 h1:Wkr8lSzK2nDqixOrrBa47VNuqdhV1m/aJhaP1EMaiS8= github.com/multiversx/mx-components-big-int v1.0.0/go.mod h1:maIEMgHlNE2u78JaDD0oLzri+ShgU4okHfzP3LWGdQM= -github.com/multiversx/mx-sdk-go v1.3.12-0.20240228130921-940b47b0f2be h1:zXFDP5oB+LKRESSDVF55SZeeAS5k6e9EUmXmBR7iUXQ= -github.com/multiversx/mx-sdk-go v1.3.12-0.20240228130921-940b47b0f2be/go.mod h1:AY65e3QDbdjJ5BzZ6OE0YvMze6x9JOXUeXMh04mdQiI= +github.com/multiversx/mx-sdk-go v1.4.1 h1:/zk7LDmnl1ovkmjkDejLRUtbjO7kmVQw8AlAyGNITBU= +github.com/multiversx/mx-sdk-go v1.4.1/go.mod h1:2kTQLFck47wtHpzdWrM3mrLlTypE5zn39JCbzN16cxs= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -703,8 +703,8 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= @@ -750,8 +750,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -810,8 +810,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= diff --git a/integrationTests/chainSimulatorWrapper.go b/integrationTests/chainSimulatorWrapper.go new file mode 100644 index 00000000..5dd42bbe --- /dev/null +++ b/integrationTests/chainSimulatorWrapper.go @@ -0,0 +1,335 @@ +package integrationTests + +import ( + "context" + "encoding/hex" + "encoding/json" + "fmt" + "net/http" + "strings" + "time" + + "github.com/multiversx/mx-bridge-eth-go/clients/multiversx" + "github.com/multiversx/mx-chain-core-go/core" + "github.com/multiversx/mx-chain-core-go/core/pubkeyConverter" + apiCore "github.com/multiversx/mx-chain-core-go/data/api" + "github.com/multiversx/mx-chain-core-go/data/transaction" + "github.com/multiversx/mx-chain-crypto-go/signing" + "github.com/multiversx/mx-chain-crypto-go/signing/ed25519" + "github.com/multiversx/mx-chain-crypto-go/signing/ed25519/singlesig" + "github.com/multiversx/mx-chain-go/integrationTests/vm/wasm" + "github.com/multiversx/mx-chain-go/node/chainSimulator/dtos" + logger "github.com/multiversx/mx-chain-logger-go" + "github.com/multiversx/mx-sdk-go/blockchain" + sdkCore "github.com/multiversx/mx-sdk-go/core" + sdkHttp "github.com/multiversx/mx-sdk-go/core/http" + "github.com/multiversx/mx-sdk-go/data" +) + +var log = logger.GetOrCreate("testscommon/chainsimulator") + +const ( + proxyURL = "http://127.0.0.1:8085" + thousandEgld = "1000000000000000000000" + maxAllowedTimeout = time.Second + setMultipleEndpoint = "simulator/set-state-overwrite" + generateBlocksEndpoint = "simulator/generate-blocks/%d" + generateBlocksUntilEpochReachedEndpoint = "simulator/generate-blocks-until-epoch-reached/%d" + numProbeRetries = 10 +) + +// ArgChainSimulatorWrapper is the DTO used to create a new instance of proxy that relies on a chain simulator +type ArgChainSimulatorWrapper struct { + ProxyCacherExpirationSeconds uint64 + ProxyMaxNoncesDelta int +} + +type chainSimulatorWrapper struct { + clientWrapper httpClientWrapper + proxyInstance multiversx.Proxy + pkConv core.PubkeyConverter +} + +// CreateChainSimulatorWrapper creates a new instance of the chain simulator wrapper +func CreateChainSimulatorWrapper(args ArgChainSimulatorWrapper) (*chainSimulatorWrapper, error) { + argsProxy := blockchain.ArgsProxy{ + ProxyURL: proxyURL, + SameScState: false, + ShouldBeSynced: false, + FinalityCheck: false, + AllowedDeltaToFinal: args.ProxyMaxNoncesDelta, + CacheExpirationTime: time.Second * time.Duration(args.ProxyCacherExpirationSeconds), + EntityType: sdkCore.Proxy, + } + proxyInstance, err := blockchain.NewProxy(argsProxy) + if err != nil { + return nil, err + } + + pubKeyConverter, err := pubkeyConverter.NewBech32PubkeyConverter(32, "erd") + if err != nil { + return nil, err + } + + instance := &chainSimulatorWrapper{ + clientWrapper: sdkHttp.NewHttpClientWrapper(nil, proxyURL), + proxyInstance: proxyInstance, + pkConv: pubKeyConverter, + } + + err = instance.probeURLWithRetries() + if err != nil { + return nil, err + } + + return instance, nil +} + +func (instance *chainSimulatorWrapper) probeURLWithRetries() error { + // at this point we should be able to get the network configs + + var err error + for i := 0; i < numProbeRetries; i++ { + log.Info("trying to probe the chain simulator", "url", proxyURL, "try", i) + + ctx, done := context.WithTimeout(context.Background(), maxAllowedTimeout) + _, err = instance.proxyInstance.GetNetworkConfig(ctx) + done() + + if err == nil { + log.Info("probe ok, chain simulator instance found", "url", proxyURL) + return nil + } + + time.Sleep(maxAllowedTimeout) + } + + return fmt.Errorf("%w while probing the network config. Please ensure that a chain simulator is running on %s", err, proxyURL) +} + +// Proxy returns the managed proxy instance +func (instance *chainSimulatorWrapper) Proxy() multiversx.Proxy { + return instance.proxyInstance +} + +// GetNetworkAddress returns the network address +func (instance *chainSimulatorWrapper) GetNetworkAddress() string { + return proxyURL +} + +// DeploySC will deploy the provided smart contract and return its address +func (instance *chainSimulatorWrapper) DeploySC(ctx context.Context, wasmFilePath string, ownerPK string, ownerSK []byte, parameters []string) (string, error) { + networkConfig, err := instance.proxyInstance.GetNetworkConfig(ctx) + if err != nil { + return "", err + } + + nonce, err := instance.getNonce(ctx, ownerPK) + if err != nil { + return "", err + } + + emptyAddress, err := instance.pkConv.Encode(make([]byte, 32)) + if err != nil { + return "", err + } + + scCode := wasm.GetSCCode(wasmFilePath) + params := []string{scCode, wasm.VMTypeHex, wasm.DummyCodeMetadataHex} + params = append(params, parameters...) + txData := strings.Join(params, "@") + + ftx := &transaction.FrontendTransaction{ + Nonce: nonce, + Value: "0", + Receiver: emptyAddress, + Sender: ownerPK, + GasPrice: networkConfig.MinGasPrice, + GasLimit: 600000000, + Data: []byte(txData), + ChainID: networkConfig.ChainID, + Version: 1, + } + + hash, err := instance.signAndSend(ctx, ownerSK, ftx) + if err != nil { + return "", err + } + + log.Info("contract deployed", "hash", hash) + + txResult, errGet := instance.GetTransactionResult(ctx, hash) + if errGet != nil { + return "", errGet + } + + return txResult.Logs.Events[0].Address, nil +} + +// GetTransactionResult tries to get a transaction result. It may wait a few blocks +func (instance *chainSimulatorWrapper) GetTransactionResult(ctx context.Context, hash string) (*data.TransactionOnNetwork, error) { + instance.GenerateBlocks(ctx, 10) + + return instance.getTxInfoWithResultsIfTxProcessingFinished(ctx, hash) +} + +// GenerateBlocks calls the chain simulator generate block endpoint +func (instance *chainSimulatorWrapper) GenerateBlocks(ctx context.Context, numBlocks int) { + _, status, err := instance.clientWrapper.PostHTTP(ctx, fmt.Sprintf(generateBlocksEndpoint, numBlocks), nil) + if err != nil || status != http.StatusOK { + log.Error("error in chainSimulatorWrapper.GenerateBlocks", "error", err, "status", status) + return + } +} + +// GenerateBlocksUntilEpochReached will generate blocks until the provided epoch is reached +func (instance *chainSimulatorWrapper) GenerateBlocksUntilEpochReached(ctx context.Context, epoch uint32) { + _, status, err := instance.clientWrapper.PostHTTP(ctx, fmt.Sprintf(generateBlocksUntilEpochReachedEndpoint, epoch), nil) + if err != nil || status != http.StatusOK { + log.Error("error in chainSimulatorWrapper.GenerateBlocksUntilEpochReached", "error", err, "status", status) + return + } +} + +func (instance *chainSimulatorWrapper) getTxInfoWithResultsIfTxProcessingFinished(ctx context.Context, hash string) (*data.TransactionOnNetwork, error) { + txStatus, err := instance.proxyInstance.ProcessTransactionStatus(ctx, hash) + if err != nil { + return nil, err + } + + if txStatus == transaction.TxStatusPending { + return nil, nil + } + + if txStatus != transaction.TxStatusSuccess { + log.Warn("something went wrong with the transaction", "hash", hash, "status", txStatus) + } + + txResult, errGet := instance.proxyInstance.GetTransactionInfoWithResults(ctx, hash) + if errGet != nil { + return nil, err + } + + return &txResult.Data.Transaction, nil + +} + +// ScCall will make the provided sc call +func (instance *chainSimulatorWrapper) ScCall(ctx context.Context, senderPK string, senderSK []byte, contract string, value string, function string, parameters []string) (string, error) { + params := []string{function} + params = append(params, parameters...) + txData := strings.Join(params, "@") + + return instance.SendTx(ctx, senderPK, senderSK, contract, value, []byte(txData)) +} + +// SendTx will build and send a transaction +func (instance *chainSimulatorWrapper) SendTx(ctx context.Context, senderPK string, senderSK []byte, receiver string, value string, dataField []byte) (string, error) { + networkConfig, err := instance.proxyInstance.GetNetworkConfig(ctx) + if err != nil { + return "", err + } + + nonce, err := instance.getNonce(ctx, senderPK) + if err != nil { + return "", err + } + + ftx := &transaction.FrontendTransaction{ + Nonce: nonce, + Value: value, + Receiver: receiver, + Sender: senderPK, + GasPrice: networkConfig.MinGasPrice, + GasLimit: 600000000, + Data: dataField, + ChainID: networkConfig.ChainID, + Version: 1, + } + + return instance.signAndSend(ctx, senderSK, ftx) +} + +// FundWallets sends funds to the provided addresses +func (instance *chainSimulatorWrapper) FundWallets(ctx context.Context, wallets []string) { + addressesState := make([]*dtos.AddressState, 0, len(wallets)) + for _, wallet := range wallets { + addressesState = append(addressesState, &dtos.AddressState{ + Address: wallet, + Nonce: new(uint64), + Balance: thousandEgld, + }) + } + + buff, err := json.Marshal(addressesState) + if err != nil { + log.Error("error in chainSimulatorWrapper.FundWallets", "error", err) + return + } + + _, status, err := instance.clientWrapper.PostHTTP(ctx, setMultipleEndpoint, buff) + if err != nil || status != http.StatusOK { + log.Error("error in chainSimulatorWrapper.FundWallets - PostHTTP", "error", err, "status", status) + return + } +} + +// GetESDTBalance returns the balance of the esdt token for the provided address +func (instance *chainSimulatorWrapper) GetESDTBalance(ctx context.Context, address sdkCore.AddressHandler, token string) (string, error) { + tokenData, err := instance.proxyInstance.GetESDTTokenData(ctx, address, token, apiCore.AccountQueryOptions{ + OnFinalBlock: true, + }) + if err != nil { + return "", err + } + + return tokenData.Balance, nil +} + +func (instance *chainSimulatorWrapper) getNonce(ctx context.Context, bech32Address string) (uint64, error) { + address, err := data.NewAddressFromBech32String(bech32Address) + if err != nil { + return 0, err + } + + account, err := instance.proxyInstance.GetAccount(ctx, address) + if err != nil { + return 0, err + } + + return account.Nonce, nil +} + +func (instance *chainSimulatorWrapper) signAndSend(ctx context.Context, senderSK []byte, ftx *transaction.FrontendTransaction) (string, error) { + sig, err := computeTransactionSignature(senderSK, ftx) + if err != nil { + return "", err + } + ftx.Signature = hex.EncodeToString(sig) + + hash, err := instance.proxyInstance.SendTransaction(ctx, ftx) + if err != nil { + return "", err + } + + instance.GenerateBlocks(ctx, 1) + + return hash, nil +} + +func computeTransactionSignature(senderSk []byte, tx *transaction.FrontendTransaction) ([]byte, error) { + signer := &singlesig.Ed25519Signer{} + keyGenerator := signing.NewKeyGenerator(ed25519.NewEd25519()) + + privateKey, err := keyGenerator.PrivateKeyFromByteArray(senderSk) + if err != nil { + return nil, err + } + + dataToSign, err := json.Marshal(tx) + if err != nil { + return nil, err + } + + return signer.Sign(privateKey, dataToSign) +} diff --git a/integrationTests/interface.go b/integrationTests/interface.go index 2d0727ba..9f14d5b6 100644 --- a/integrationTests/interface.go +++ b/integrationTests/interface.go @@ -1,13 +1,9 @@ package integrationTests -import ( - "github.com/multiversx/mx-chain-go/node/chainSimulator/dtos" - "github.com/multiversx/mx-chain-go/node/chainSimulator/process" -) +import "context" -// chainSimulatorHandler defines what a chain simulator should be able to do -type chainSimulatorHandler interface { - GetNodeHandler(shardID uint32) process.NodeHandler - SetStateMultiple(stateSlice []*dtos.AddressState) error +type httpClientWrapper interface { + GetHTTP(ctx context.Context, endpoint string) ([]byte, int, error) + PostHTTP(ctx context.Context, endpoint string, data []byte) ([]byte, int, error) IsInterfaceNil() bool } diff --git a/integrationTests/proxyWithChainSimulator.go b/integrationTests/proxyWithChainSimulator.go deleted file mode 100644 index cce2bc47..00000000 --- a/integrationTests/proxyWithChainSimulator.go +++ /dev/null @@ -1,387 +0,0 @@ -package integrationTests - -import ( - "context" - "encoding/hex" - "encoding/json" - "errors" - "strings" - "time" - - "github.com/multiversx/mx-bridge-eth-go/clients/multiversx" - "github.com/multiversx/mx-chain-core-go/core" - "github.com/multiversx/mx-chain-core-go/core/pubkeyConverter" - apiCore "github.com/multiversx/mx-chain-core-go/data/api" - "github.com/multiversx/mx-chain-core-go/data/transaction" - "github.com/multiversx/mx-chain-crypto-go/signing" - "github.com/multiversx/mx-chain-crypto-go/signing/ed25519" - "github.com/multiversx/mx-chain-crypto-go/signing/ed25519/singlesig" - "github.com/multiversx/mx-chain-go/integrationTests/vm/wasm" - "github.com/multiversx/mx-chain-go/node/chainSimulator" - "github.com/multiversx/mx-chain-go/node/chainSimulator/components/api" - "github.com/multiversx/mx-chain-go/node/chainSimulator/dtos" - logger "github.com/multiversx/mx-chain-logger-go" - "github.com/multiversx/mx-chain-simulator-go/config" - "github.com/multiversx/mx-chain-simulator-go/pkg/factory" - "github.com/multiversx/mx-chain-simulator-go/pkg/process" - "github.com/multiversx/mx-chain-simulator-go/pkg/proxy" - "github.com/multiversx/mx-chain-simulator-go/pkg/proxy/configs" - "github.com/multiversx/mx-chain-simulator-go/pkg/proxy/creator" - "github.com/multiversx/mx-sdk-go/blockchain" - sdkCore "github.com/multiversx/mx-sdk-go/core" - "github.com/multiversx/mx-sdk-go/data" -) - -var log = logger.GetOrCreate("testscommon/chainsimulator") - -const ( - proxyURL = "http://127.0.0.1:8085" - thousandEgld = "1000000000000000000000" -) - -// ArgProxyWithChainSimulator is the dto used to create a new instance of proxy that relies on a chain simulator -type ArgProxyWithChainSimulator struct { - BypassTxsSignature bool - WorkingDir string - RoundDurationInMs uint64 - RoundsPerEpoch uint64 - NodeConfigs string - ProxyConfigs string - NumOfShards uint32 - BlockTimeInMs uint64 - ServerPort int - ProxyCacherExpirationSeconds uint64 - ProxyMaxNoncesDelta int -} - -type proxyWithChainSimulator struct { - simulatorProxyInstance proxy.ProxyHandler - blocksGenerator process.BlocksGenerator - proxyInstance multiversx.Proxy - simulator chainSimulatorHandler - pkConv core.PubkeyConverter - roundDuration time.Duration -} - -// CreateProxyWithChainSimulator creates a new instance of chain simulator with proxy -func CreateProxyWithChainSimulator(args ArgProxyWithChainSimulator) (*proxyWithChainSimulator, error) { - roundDurationInMillis := args.RoundDurationInMs - rounds := core.OptionalUint64{ - HasValue: true, - Value: args.RoundsPerEpoch, - } - - apiConfigurator := api.NewFreePortAPIConfigurator("localhost") - argsChainSimulator := chainSimulator.ArgsChainSimulator{ - BypassTxSignatureCheck: args.BypassTxsSignature, - TempDir: args.WorkingDir, - PathToInitialConfig: args.NodeConfigs, - NumOfShards: args.NumOfShards, - GenesisTimestamp: time.Now().Unix(), - RoundDurationInMillis: roundDurationInMillis, - RoundsPerEpoch: rounds, - ApiInterface: apiConfigurator, - MinNodesPerShard: 1, - MetaChainMinNodes: 1, - InitialRound: 0, - InitialNonce: 0, - InitialEpoch: 0, - } - simulator, err := chainSimulator.NewChainSimulator(argsChainSimulator) - if err != nil { - return nil, err - } - - log.Info("simulators were initialized") - - err = simulator.GenerateBlocks(1) - if err != nil { - return nil, err - } - - generator, err := factory.CreateBlocksGenerator(simulator, config.BlocksGeneratorConfig{ - AutoGenerateBlocks: true, - BlockTimeInMs: args.BlockTimeInMs, - }) - if err != nil { - return nil, err - } - - metaNode := simulator.GetNodeHandler(core.MetachainShardId) - restApiInterfaces := simulator.GetRestAPIInterfaces() - outputProxyConfigs, err := configs.CreateProxyConfigs(configs.ArgsProxyConfigs{ - TemDir: args.WorkingDir, - PathToProxyConfig: args.ProxyConfigs, - ServerPort: args.ServerPort, - RestApiInterfaces: restApiInterfaces, - InitialWallets: simulator.GetInitialWalletKeys().ShardWallets, - }) - if err != nil { - return nil, err - } - - time.Sleep(time.Second) - - simulatorProxyInstance, err := creator.CreateProxy(creator.ArgsProxy{ - Config: outputProxyConfigs.Config, - NodeHandler: metaNode, - PathToConfig: outputProxyConfigs.PathToTempConfig, - PathToPemFile: outputProxyConfigs.PathToPemFile, - }) - if err != nil { - return nil, err - } - - simulatorProxyInstance.Start() - - log.Info("chain simulator proxy was started") - - argsProxy := blockchain.ArgsProxy{ - ProxyURL: proxyURL, - SameScState: false, - ShouldBeSynced: false, - FinalityCheck: false, - AllowedDeltaToFinal: args.ProxyMaxNoncesDelta, - CacheExpirationTime: time.Second * time.Duration(args.ProxyCacherExpirationSeconds), - EntityType: sdkCore.Proxy, - } - proxyInstance, err := blockchain.NewProxy(argsProxy) - if err != nil { - return nil, err - } - - pubKeyConverter, err := pubkeyConverter.NewBech32PubkeyConverter(32, "erd") - if err != nil { - return nil, err - } - - return &proxyWithChainSimulator{ - simulatorProxyInstance: simulatorProxyInstance, - blocksGenerator: generator, - proxyInstance: proxyInstance, - simulator: simulator, - pkConv: pubKeyConverter, - roundDuration: time.Duration(args.RoundDurationInMs) * time.Millisecond, - }, nil -} - -// Proxy returns the managed proxy instance -func (instance *proxyWithChainSimulator) Proxy() multiversx.Proxy { - return instance.proxyInstance -} - -// GetNetworkAddress returns the network address -func (instance *proxyWithChainSimulator) GetNetworkAddress() string { - return proxyURL -} - -// DeploySC will deploy the provided smart contract and return its address -func (instance *proxyWithChainSimulator) DeploySC(ctx context.Context, wasmFilePath string, ownerPK string, ownerSK []byte, parameters []string) (string, error) { - networkConfig, err := instance.proxyInstance.GetNetworkConfig(ctx) - if err != nil { - return "", err - } - - nonce, err := instance.getNonce(ctx, ownerPK) - if err != nil { - return "", err - } - - emptyAddress, err := instance.pkConv.Encode(make([]byte, 32)) - if err != nil { - return "", err - } - - scCode := wasm.GetSCCode(wasmFilePath) - params := []string{scCode, wasm.VMTypeHex, wasm.DummyCodeMetadataHex} - params = append(params, parameters...) - txData := strings.Join(params, "@") - - ftx := &transaction.FrontendTransaction{ - Nonce: nonce, - Value: "0", - Receiver: emptyAddress, - Sender: ownerPK, - GasPrice: networkConfig.MinGasPrice, - GasLimit: 600000000, - Data: []byte(txData), - ChainID: networkConfig.ChainID, - Version: 1, - } - - hash, err := instance.signAndSend(ctx, ownerSK, ftx) - if err != nil { - return "", err - } - - log.Info("contract deployed", "hash", hash) - - txResult, errGet := instance.GetTransactionResult(ctx, hash) - if errGet != nil { - return "", errGet - } - - return txResult.Logs.Events[0].Address, nil -} - -// GetTransactionResult tries to get a transaction result. It may wait a few blocks -func (instance *proxyWithChainSimulator) GetTransactionResult(ctx context.Context, hash string) (data.TransactionOnNetwork, error) { - txResult, err := instance.getTxInfoWithResultsIfTxProcessingFinished(ctx, hash) - if err == nil && txResult != nil { - return *txResult, nil - } - - // wait for tx to be done, in order to get the contract address - timeoutTimer := time.NewTimer(instance.roundDuration * 20) - for { - select { - case <-time.After(instance.roundDuration): - txResult, err = instance.getTxInfoWithResultsIfTxProcessingFinished(ctx, hash) - if err == nil && txResult != nil { - return *txResult, nil - } - if err != nil { - return data.TransactionOnNetwork{}, err - } - case <-timeoutTimer.C: - return data.TransactionOnNetwork{}, errors.New("timeout") - } - } -} - -func (instance *proxyWithChainSimulator) getTxInfoWithResultsIfTxProcessingFinished(ctx context.Context, hash string) (*data.TransactionOnNetwork, error) { - txStatus, err := instance.proxyInstance.ProcessTransactionStatus(ctx, hash) - if err != nil { - return nil, err - } - - if txStatus == transaction.TxStatusPending { - return nil, nil - } - - if txStatus != transaction.TxStatusSuccess { - log.Warn("something went wrong with the transaction", "hash", hash, "status", txStatus) - } - - txResult, errGet := instance.proxyInstance.GetTransactionInfoWithResults(ctx, hash) - if errGet != nil { - return nil, err - } - - return &txResult.Data.Transaction, nil - -} - -// ScCall will make the provided sc call -func (instance *proxyWithChainSimulator) ScCall(ctx context.Context, senderPK string, senderSK []byte, contract string, value string, function string, parameters []string) (string, error) { - params := []string{function} - params = append(params, parameters...) - txData := strings.Join(params, "@") - - return instance.SendTx(ctx, senderPK, senderSK, contract, value, []byte(txData)) -} - -// SendTx will build and send a transaction -func (instance *proxyWithChainSimulator) SendTx(ctx context.Context, senderPK string, senderSK []byte, receiver string, value string, dataField []byte) (string, error) { - networkConfig, err := instance.proxyInstance.GetNetworkConfig(ctx) - if err != nil { - return "", err - } - - nonce, err := instance.getNonce(ctx, senderPK) - if err != nil { - return "", err - } - - ftx := &transaction.FrontendTransaction{ - Nonce: nonce, - Value: value, - Receiver: receiver, - Sender: senderPK, - GasPrice: networkConfig.MinGasPrice, - GasLimit: 600000000, - Data: dataField, - ChainID: networkConfig.ChainID, - Version: 1, - } - - return instance.signAndSend(ctx, senderSK, ftx) -} - -// FundWallets sends funds to the provided addresses -func (instance *proxyWithChainSimulator) FundWallets(wallets []string) { - addressesState := make([]*dtos.AddressState, 0, len(wallets)) - for _, wallet := range wallets { - addressesState = append(addressesState, &dtos.AddressState{ - Address: wallet, - Nonce: new(uint64), - Balance: thousandEgld, - }) - } - err := instance.simulator.SetStateMultiple(addressesState) - log.LogIfError(err) -} - -// GetESDTBalance returns the balance of the esdt token for the provided address -func (instance *proxyWithChainSimulator) GetESDTBalance(ctx context.Context, address sdkCore.AddressHandler, token string) (string, error) { - tokenData, err := instance.proxyInstance.GetESDTTokenData(ctx, address, token, apiCore.AccountQueryOptions{ - OnFinalBlock: true, - }) - if err != nil { - return "", err - } - - return tokenData.Balance, nil -} - -func (instance *proxyWithChainSimulator) getNonce(ctx context.Context, bech32Address string) (uint64, error) { - address, err := data.NewAddressFromBech32String(bech32Address) - if err != nil { - return 0, err - } - - account, err := instance.proxyInstance.GetAccount(ctx, address) - if err != nil { - return 0, err - } - - return account.Nonce, nil -} - -func (instance *proxyWithChainSimulator) signAndSend(ctx context.Context, senderSK []byte, ftx *transaction.FrontendTransaction) (string, error) { - sig, err := computeTransactionSignature(senderSK, ftx) - if err != nil { - return "", err - } - ftx.Signature = hex.EncodeToString(sig) - - return instance.proxyInstance.SendTransaction(ctx, ftx) -} - -func computeTransactionSignature(senderSk []byte, tx *transaction.FrontendTransaction) ([]byte, error) { - signer := &singlesig.Ed25519Signer{} - keyGenerator := signing.NewKeyGenerator(ed25519.NewEd25519()) - - senderSk, err := hex.DecodeString(string(senderSk)) - if err != nil { - return nil, err - } - - privateKey, err := keyGenerator.PrivateKeyFromByteArray(senderSk) - if err != nil { - return nil, err - } - - dataToSign, err := json.Marshal(tx) - if err != nil { - return nil, err - } - - return signer.Sign(privateKey, dataToSign) -} - -// Close closes the internal components -func (instance *proxyWithChainSimulator) Close() { - instance.blocksGenerator.Close() - instance.simulatorProxyInstance.Close() -} diff --git a/integrationTests/relayers/common.go b/integrationTests/relayers/common.go index a2143093..1637000c 100644 --- a/integrationTests/relayers/common.go +++ b/integrationTests/relayers/common.go @@ -4,11 +4,19 @@ import ( "context" "fmt" "math/big" + "path" "github.com/ethereum/go-ethereum/common" + "github.com/multiversx/mx-bridge-eth-go/clients/chain" + "github.com/multiversx/mx-bridge-eth-go/config" + "github.com/multiversx/mx-bridge-eth-go/testsCommon" bridgeTests "github.com/multiversx/mx-bridge-eth-go/testsCommon/bridge" + chainConfig "github.com/multiversx/mx-chain-go/config" + logger "github.com/multiversx/mx-chain-logger-go" ) +var log = logger.GetOrCreate("integrationTests/relayers") + func createMockErc20ContractsHolder(tokens []common.Address, safeContractEthAddress common.Address, availableBalances []*big.Int) *bridgeTests.ERC20ContractsHolderStub { return &bridgeTests.ERC20ContractsHolderStub{ BalanceOfCalled: func(ctx context.Context, erc20Address common.Address, address common.Address) (*big.Int, error) { @@ -40,3 +48,59 @@ func availableTokensMapToSlices(erc20Map map[common.Address]*big.Int) ([]common. return tokens, availableBalances } + +func closeRelayers(relayers []bridgeComponents) { + for _, r := range relayers { + _ = r.Close() + } +} + +func createBridgeComponentsConfig(index int, workingDir string) config.Config { + stateMachineConfig := config.ConfigStateMachine{ + StepDurationInMillis: 1000, + IntervalForLeaderInSeconds: 60, + } + + return config.Config{ + Eth: config.EthereumConfig{ + Chain: chain.Ethereum, + NetworkAddress: "mock", + MultisigContractAddress: "3009d97FfeD62E57d444e552A9eDF9Ee6Bc8644c", + PrivateKeyFile: fmt.Sprintf("testdata/ethereum%d.sk", index), + IntervalToResendTxsInSeconds: 10, + GasLimitBase: 200000, + GasLimitForEach: 30000, + GasStation: config.GasStationConfig{ + Enabled: false, + }, + MaxRetriesOnQuorumReached: 1, + IntervalToWaitForTransferInSeconds: 1, + MaxBlocksDelta: 5, + }, + MultiversX: config.MultiversXConfig{ + NetworkAddress: "mock", + MultisigContractAddress: "erd1qqqqqqqqqqqqqpgqzyuaqg3dl7rqlkudrsnm5ek0j3a97qevd8sszj0glf", + SafeContractAddress: "erd1qqqqqqqqqqqqqpgqtvnswnzxxz8susupesys0hvg7q2z5nawrcjq06qdus", + PrivateKeyFile: path.Join(workingDir, fmt.Sprintf("multiversx%d.pem", index)), + IntervalToResendTxsInSeconds: 10, + GasMap: testsCommon.CreateTestMultiversXGasMap(), + MaxRetriesOnQuorumReached: 1, + MaxRetriesOnWasTransferProposed: 3, + ProxyMaxNoncesDelta: 5, + }, + P2P: config.ConfigP2P{}, + StateMachine: map[string]config.ConfigStateMachine{ + "EthereumToMultiversX": stateMachineConfig, + "MultiversXToEthereum": stateMachineConfig, + }, + Relayer: config.ConfigRelayer{ + Marshalizer: chainConfig.MarshalizerConfig{ + Type: "json", + SizeCheckDelta: 10, + }, + RoleProvider: config.RoleProviderConfig{ + PollingIntervalInMillis: 1000, + }, + }, + } +} diff --git a/integrationTests/relayers/ethToMultiversXWithChainSimulator_test.go b/integrationTests/relayers/ethToMultiversXWithChainSimulator_test.go index 27052de1..201d8c9c 100644 --- a/integrationTests/relayers/ethToMultiversXWithChainSimulator_test.go +++ b/integrationTests/relayers/ethToMultiversXWithChainSimulator_test.go @@ -1,8 +1,15 @@ +//go:build slow + +// To run these slow tests, simply add the slow tag on the go test command. Also, provide a chain simulator instance on the 8085 port +// example: go test -tags slow + package relayers import ( + "bytes" "context" "encoding/hex" + "encoding/pem" "fmt" "math/big" "os" @@ -25,32 +32,28 @@ import ( "github.com/multiversx/mx-bridge-eth-go/status" "github.com/multiversx/mx-bridge-eth-go/testsCommon" "github.com/multiversx/mx-bridge-eth-go/testsCommon/bridge" - "github.com/multiversx/mx-chain-core-go/core" + "github.com/multiversx/mx-chain-core-go/core/pubkeyConverter" + "github.com/multiversx/mx-chain-crypto-go/signing" + "github.com/multiversx/mx-chain-crypto-go/signing/ed25519" "github.com/multiversx/mx-chain-go/testscommon/statusHandler" sdkCore "github.com/multiversx/mx-sdk-go/core" "github.com/multiversx/mx-sdk-go/data" "github.com/stretchr/testify/require" ) +var addressPubkeyConverter, _ = pubkeyConverter.NewBech32PubkeyConverter(32, "erd") + const ( - ownerPem = "testdata/wallets/owner.pem" - mvxReceiverPem = "testdata/wallets/mvxReceiver.pem" safeContract = "testdata/contracts/esdt-safe.wasm" multisigContract = "testdata/contracts/multisig.wasm" multiTransferContract = "testdata/contracts/multi-transfer-esdt.wasm" bridgeProxyContract = "testdata/contracts/bridge-proxy.wasm" aggregatorContract = "testdata/contracts/aggregator.wasm" wrapperContract = "testdata/contracts/bridged-tokens-wrapper.wasm" - nodeConfig = "testdata/config/nodeConfig" - proxyConfig = "testdata/config/proxyConfig" minRelayerStake = "10000000000000000000" // 10egld slashAmount = "00" quorum = "03" - relayerPemPathFormat = "testdata/multiversx%d.pem" - roundDurationInMs = 1000 - roundsPerEpoch = 20 - numOfShards = 3 - serverPort = 8085 + relayerPemPathFormat = "multiversx%d.pem" proxyCacherExpirationSeconds = 600 proxyMaxNoncesDelta = 7 zeroValue = "0" @@ -94,16 +97,17 @@ const ( setPairDecimals = "setPairDecimals" ) -type proxyWithChainSimulator interface { +type chainSimulatorWrapper interface { Proxy() multiversx.Proxy GetNetworkAddress() string DeploySC(ctx context.Context, path string, ownerPK string, ownerSK []byte, extraParams []string) (string, error) ScCall(ctx context.Context, senderPK string, senderSK []byte, contract string, value string, function string, parameters []string) (string, error) SendTx(ctx context.Context, senderPK string, senderSK []byte, receiver string, value string, dataField []byte) (string, error) - GetTransactionResult(ctx context.Context, hash string) (data.TransactionOnNetwork, error) - FundWallets(wallets []string) + GetTransactionResult(ctx context.Context, hash string) (*data.TransactionOnNetwork, error) + FundWallets(ctx context.Context, wallets []string) + GenerateBlocksUntilEpochReached(ctx context.Context, epoch uint32) + GenerateBlocks(ctx context.Context, numBlocks int) GetESDTBalance(ctx context.Context, address sdkCore.AddressHandler, token string) (string, error) - Close() } type keysHolder struct { @@ -112,21 +116,14 @@ type keysHolder struct { } func TestRelayersShouldExecuteTransfersFromEthToMultiversXWithChainSimulator(t *testing.T) { - t.Skip("this is a long test") - safeContractEthAddress := testsCommon.CreateRandomEthereumAddress() token1Erc20 := testsCommon.CreateRandomEthereumAddress() value1 := big.NewInt(200000000) - // read the receiver keys - receiverSK, receiverPK, err := core.LoadSkPkFromPemFile(mvxReceiverPem, 0) - require.NoError(t, err) - receiverKeys := keysHolder{ - pk: receiverPK, - sk: receiverSK, - } + receiverKeys := generateMvxPrivatePublicKey(t) + log.Info("receiver is", "address", receiverKeys.pk) - receiverAddress, err := data.NewAddressFromBech32String(receiverPK) + receiverAddress, err := data.NewAddressFromBech32String(receiverKeys.pk) require.NoError(t, err) depositor := testsCommon.CreateRandomEthereumAddress() @@ -168,63 +165,60 @@ func TestRelayersShouldExecuteTransfersFromEthToMultiversXWithChainSimulator(t * return expectedStatuses } + tempDir := t.TempDir() relayersKeys := make([]keysHolder, 0, numRelayers) for i := 0; i < numRelayers; i++ { - relayerSK, relayerPK, err := core.LoadSkPkFromPemFile(fmt.Sprintf(relayerPemPathFormat, i), 0) - require.Nil(t, err) - - relayersKeys = append(relayersKeys, keysHolder{ - pk: relayerPK, - sk: relayerSK, - }) + relayerKeys := generateMvxPrivatePublicKey(t) + log.Info("generated relayer", "index", i, "address", relayerKeys.pk) + relayersKeys = append(relayersKeys, relayerKeys) + saveRelayerKey(t, tempDir, i, relayerKeys) } - multiversXProxyWithChainSimulator := startProxyWithChainSimulator(t) - defer multiversXProxyWithChainSimulator.Close() + mvxChainSimulatorWrapper := startChainSimulatorWrapper(t) // create a test context ctx, cancel := context.WithCancel(context.Background()) defer cancel() - // read the owner keys - ownerSK, ownerPK, err := core.LoadSkPkFromPemFile(ownerPem, 0) - require.NoError(t, err) - ownerKeys := keysHolder{ - pk: ownerPK, - sk: ownerSK, - } + ownerKeys := generateMvxPrivatePublicKey(t) + log.Info("owner is", "address", receiverKeys.pk) + + // we need to wait until epoch 1 is reached so SC deployment will work + mvxChainSimulatorWrapper.GenerateBlocksUntilEpochReached(ctx, 1) // deploy all contracts and execute all txs needed - safeAddress, multisigAddress, wrapperAddress, aggregatorAddress := executeContractsTxs(t, ctx, multiversXProxyWithChainSimulator, relayersKeys, ownerKeys, receiverKeys) + safeAddress, multisigAddress, wrapperAddress, aggregatorAddress := executeContractsTxs(t, ctx, mvxChainSimulatorWrapper, relayersKeys, ownerKeys, receiverKeys) // issue and whitelist token - newUniversalToken, newChainSpecificToken := issueAndWhitelistToken(t, ctx, multiversXProxyWithChainSimulator, ownerKeys, wrapperAddress, safeAddress, multisigAddress, aggregatorAddress, hex.EncodeToString(token1Erc20.Bytes())) + newUniversalToken, newChainSpecificToken := issueAndWhitelistToken(t, ctx, mvxChainSimulatorWrapper, ownerKeys, wrapperAddress, safeAddress, multisigAddress, aggregatorAddress, hex.EncodeToString(token1Erc20.Bytes())) // start relayers - relayers := startRelayers(t, numRelayers, multiversXProxyWithChainSimulator, ethereumChainMock, safeContractEthAddress, erc20ContractsHolder, safeAddress, multisigAddress) + relayers := startRelayers(t, tempDir, numRelayers, mvxChainSimulatorWrapper, ethereumChainMock, safeContractEthAddress, erc20ContractsHolder, safeAddress, multisigAddress) defer closeRelayers(relayers) - checkESDTBalance(t, ctx, multiversXProxyWithChainSimulator, receiverAddress, newUniversalToken, "0", true) + checkESDTBalance(t, ctx, mvxChainSimulatorWrapper, receiverAddress, newUniversalToken, "0", true) - // wait for signal interrupt or time out - roundDuration := time.Duration(roundDurationInMs) * time.Millisecond - timerBetweenBalanceChecks := time.NewTimer(roundDuration) interrupt := make(chan os.Signal, 1) signal.Notify(interrupt, syscall.SIGINT, syscall.SIGTERM) ethToMVXDone := false mvxToETHDone := false for { - timerBetweenBalanceChecks.Reset(roundDuration) select { - case <-timerBetweenBalanceChecks.C: - isTransferDoneFromETH := checkESDTBalance(t, ctx, multiversXProxyWithChainSimulator, receiverAddress, newUniversalToken, value1.String(), false) + case <-interrupt: + require.Fail(t, "signal interrupted") + return + case <-time.After(time.Minute * 15): + require.Fail(t, "time out") + return + default: + isTransferDoneFromETH := checkESDTBalance(t, ctx, mvxChainSimulatorWrapper, receiverAddress, newUniversalToken, value1.String(), false) if !ethToMVXDone && isTransferDoneFromETH { ethToMVXDone = true log.Info("ETH->MVX transfer finished, now sending back to ETH...") // send half of the amount back to ETH value := big.NewInt(0).Div(value1, big.NewInt(2)) - sendMVXToEthTransaction(t, ctx, multiversXProxyWithChainSimulator, value.Bytes(), newUniversalToken, newChainSpecificToken, receiverKeys, safeAddress, wrapperAddress, depositor.Bytes()) + sendMVXToEthTransaction(t, ctx, mvxChainSimulatorWrapper, value.Bytes(), newUniversalToken, newChainSpecificToken, receiverKeys, safeAddress, wrapperAddress, depositor.Bytes()) } isTransferDoneFromMVX := checkETHStatus(ethereumChainMock, depositor, token1Erc20) @@ -237,46 +231,66 @@ func TestRelayersShouldExecuteTransfersFromEthToMultiversXWithChainSimulator(t * return } - case <-interrupt: - require.Fail(t, "signal interrupted") - return - case <-time.After(time.Minute * 15): - require.Fail(t, "time out") - return + mvxChainSimulatorWrapper.GenerateBlocks(ctx, 1) } } } -func startProxyWithChainSimulator(t *testing.T) proxyWithChainSimulator { +func generateMvxPrivatePublicKey(t *testing.T) keysHolder { + keyGenerator := signing.NewKeyGenerator(ed25519.NewEd25519()) + sk, pk := keyGenerator.GeneratePair() + + skBytes, err := sk.ToByteArray() + require.Nil(t, err) + + pkBytes, err := pk.ToByteArray() + require.Nil(t, err) + + address, err := addressPubkeyConverter.Encode(pkBytes) + require.Nil(t, err) + + return keysHolder{ + pk: address, + sk: skBytes, + } +} + +func saveRelayerKey(t *testing.T, tempDir string, index int, key keysHolder) { + blk := pem.Block{ + Type: "PRIVATE KEY for " + key.pk, + Bytes: []byte(hex.EncodeToString(key.sk)), + } + + buff := bytes.NewBuffer(make([]byte, 0)) + err := pem.Encode(buff, &blk) + require.Nil(t, err) + + err = os.WriteFile(path.Join(tempDir, fmt.Sprintf(relayerPemPathFormat, index)), buff.Bytes(), os.ModePerm) + require.Nil(t, err) +} + +func startChainSimulatorWrapper(t *testing.T) chainSimulatorWrapper { // create a new working directory tmpDir := path.Join(t.TempDir(), "test") err := os.MkdirAll(tmpDir, os.ModePerm) require.NoError(t, err) // start the chain simulator - args := integrationTests.ArgProxyWithChainSimulator{ - BypassTxsSignature: true, - WorkingDir: tmpDir, - RoundDurationInMs: roundDurationInMs, - RoundsPerEpoch: roundsPerEpoch, - NodeConfigs: nodeConfig, - ProxyConfigs: proxyConfig, - NumOfShards: numOfShards, - BlockTimeInMs: roundDurationInMs, - ServerPort: serverPort, + args := integrationTests.ArgChainSimulatorWrapper{ ProxyCacherExpirationSeconds: proxyCacherExpirationSeconds, ProxyMaxNoncesDelta: proxyMaxNoncesDelta, } - multiversXProxyWithChainSimulator, err := integrationTests.CreateProxyWithChainSimulator(args) + mvxChainSimulatorWrapper, err := integrationTests.CreateChainSimulatorWrapper(args) require.NoError(t, err) - return multiversXProxyWithChainSimulator + return mvxChainSimulatorWrapper } func startRelayers( t *testing.T, + workingDir string, numRelayers int, - multiversXProxyWithChainSimulator proxyWithChainSimulator, + mvxChainSimulator chainSimulatorWrapper, ethereumChainMock *mock.EthereumChainMock, safeContractEthAddress common.Address, erc20ContractsHolder *bridge.ERC20ContractsHolderStub, @@ -288,7 +302,7 @@ func startRelayers( messengers := integrationTests.CreateLinkedMessengers(numRelayers) for i := 0; i < numRelayers; i++ { - generalConfigs := createBridgeComponentsConfig(i) + generalConfigs := createBridgeComponentsConfig(i, workingDir) argsBridgeComponents := factory.ArgsEthereumToMultiversXBridge{ Configs: config.Configs{ GeneralConfig: generalConfigs, @@ -297,7 +311,7 @@ func startRelayers( RestApiInterface: bridgeCore.WebServerOffString, }, }, - Proxy: multiversXProxyWithChainSimulator.Proxy(), + Proxy: mvxChainSimulator.Proxy(), ClientWrapper: ethereumChainMock, Messenger: messengers[i], StatusStorer: testsCommon.NewStorerMock(), @@ -309,7 +323,7 @@ func startRelayers( } argsBridgeComponents.Configs.GeneralConfig.Eth.SafeContractAddress = safeContractEthAddress.Hex() argsBridgeComponents.Erc20ContractsHolder = erc20ContractsHolder - argsBridgeComponents.Configs.GeneralConfig.MultiversX.NetworkAddress = multiversXProxyWithChainSimulator.GetNetworkAddress() + argsBridgeComponents.Configs.GeneralConfig.MultiversX.NetworkAddress = mvxChainSimulator.GetNetworkAddress() argsBridgeComponents.Configs.GeneralConfig.MultiversX.SafeContractAddress = safeAddress argsBridgeComponents.Configs.GeneralConfig.MultiversX.MultisigContractAddress = multisigAddress argsBridgeComponents.Configs.GeneralConfig.MultiversX.GasMap = config.MultiversXGasMapConfig{ @@ -343,7 +357,7 @@ func startRelayers( func executeContractsTxs( t *testing.T, ctx context.Context, - multiversXProxyWithChainSimulator proxyWithChainSimulator, + mvxChainSimulator chainSimulatorWrapper, relayersKeys []keysHolder, ownerKeys keysHolder, receiver keysHolder, @@ -355,10 +369,9 @@ func executeContractsTxs( } walletsToFund = append(walletsToFund, ownerKeys.pk) walletsToFund = append(walletsToFund, receiver.pk) - multiversXProxyWithChainSimulator.FundWallets(walletsToFund) + mvxChainSimulator.FundWallets(ctx, walletsToFund) - // wait for epoch 1 before sc deploys - time.Sleep(time.Duration(roundDurationInMs*(roundsPerEpoch+2)) * time.Millisecond) + mvxChainSimulator.GenerateBlocks(ctx, 1) // deploy aggregator stakeValue, _ := big.NewInt(0).SetString(minRelayerStake, 10) @@ -371,7 +384,7 @@ func executeContractsTxs( getHexAddress(t, ownerKeys.pk), } - aggregatorAddress, err := multiversXProxyWithChainSimulator.DeploySC( + aggregatorAddress, err := mvxChainSimulator.DeploySC( ctx, aggregatorContract, ownerKeys.pk, @@ -384,7 +397,7 @@ func executeContractsTxs( log.Info("aggregator contract deployed", "address", aggregatorAddress) // deploy wrapper - wrapperAddress, err := multiversXProxyWithChainSimulator.DeploySC( + wrapperAddress, err := mvxChainSimulator.DeploySC( ctx, wrapperContract, ownerKeys.pk, @@ -397,7 +410,7 @@ func executeContractsTxs( log.Info("wrapper contract deployed", "address", wrapperAddress) // deploy safe - safeAddress, err := multiversXProxyWithChainSimulator.DeploySC( + safeAddress, err := mvxChainSimulator.DeploySC( ctx, safeContract, ownerKeys.pk, @@ -410,7 +423,7 @@ func executeContractsTxs( log.Info("safe contract deployed", "address", safeAddress) // deploy multi-transfer - multiTransferAddress, err := multiversXProxyWithChainSimulator.DeploySC( + multiTransferAddress, err := mvxChainSimulator.DeploySC( ctx, multiTransferContract, ownerKeys.pk, @@ -429,7 +442,7 @@ func executeContractsTxs( for _, relayerKeys := range relayersKeys { params = append(params, getHexAddress(t, relayerKeys.pk)) } - multisigAddress, err := multiversXProxyWithChainSimulator.DeploySC( + multisigAddress, err := mvxChainSimulator.DeploySC( ctx, multisigContract, ownerKeys.pk, @@ -442,7 +455,7 @@ func executeContractsTxs( log.Info("multisig contract deployed", "address", multisigAddress) // deploy bridge proxy - bridgeProxyAddress, err := multiversXProxyWithChainSimulator.DeploySC( + bridgeProxyAddress, err := mvxChainSimulator.DeploySC( ctx, bridgeProxyContract, ownerKeys.pk, @@ -455,7 +468,7 @@ func executeContractsTxs( log.Info("bridge proxy contract deployed", "address", bridgeProxyAddress) // setBridgeProxyContractAddress - hash, err := multiversXProxyWithChainSimulator.ScCall( + hash, err := mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -465,13 +478,13 @@ func executeContractsTxs( []string{getHexAddress(t, bridgeProxyAddress)}, ) require.NoError(t, err) - txResult, err := multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err := mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("setBridgeProxyContractAddress tx executed", "hash", hash, "status", txResult.Status) // setWrappingContractAddress - hash, err = multiversXProxyWithChainSimulator.ScCall( + hash, err = mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -481,13 +494,13 @@ func executeContractsTxs( []string{getHexAddress(t, wrapperAddress)}, ) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("setWrappingContractAddress tx executed", "hash", hash, "status", txResult.Status) // ChangeOwnerAddress for safe - hash, err = multiversXProxyWithChainSimulator.ScCall( + hash, err = mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -497,13 +510,13 @@ func executeContractsTxs( []string{getHexAddress(t, multisigAddress)}, ) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("ChangeOwnerAddress for safe tx executed", "hash", hash, "status", txResult.Status) // ChangeOwnerAddress for multi-transfer - hash, err = multiversXProxyWithChainSimulator.ScCall( + hash, err = mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -513,13 +526,13 @@ func executeContractsTxs( []string{getHexAddress(t, multisigAddress)}, ) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("ChangeOwnerAddress for multi-transfer tx executed", "hash", hash, "status", txResult.Status) // ChangeOwnerAddress for bridge proxy - hash, err = multiversXProxyWithChainSimulator.ScCall( + hash, err = mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -529,13 +542,13 @@ func executeContractsTxs( []string{getHexAddress(t, multisigAddress)}, ) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("ChangeOwnerAddress for bridge proxy tx executed", "hash", hash, "status", txResult.Status) // setMultiTransferOnEsdtSafe - hash, err = multiversXProxyWithChainSimulator.ScCall( + hash, err = mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -545,13 +558,13 @@ func executeContractsTxs( []string{}, ) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("setMultiTransferOnEsdtSafe tx executed", "hash", hash, "status", txResult.Status) // setEsdtSafeOnMultiTransfer - hash, err = multiversXProxyWithChainSimulator.ScCall( + hash, err = mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -561,13 +574,13 @@ func executeContractsTxs( []string{}, ) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("setEsdtSafeOnMultiTransfer tx executed", "hash", hash, "status", txResult.Status) // setPairDecimals on aggregator - hash, err = multiversXProxyWithChainSimulator.ScCall( + hash, err = mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -576,57 +589,57 @@ func executeContractsTxs( setPairDecimals, []string{hex.EncodeToString([]byte(gwei)), hex.EncodeToString([]byte(chainSpecificTokenTicker)), numOfDecimalsChainSpecific}) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("setPairDecimals tx executed", "hash", hash, "status", txResult.Status) // stake relayers on multisig - stakeAddressesOnContract(t, ctx, multiversXProxyWithChainSimulator, multisigAddress, relayersKeys) + stakeAddressesOnContract(t, ctx, mvxChainSimulator, multisigAddress, relayersKeys) // stake relayers on price aggregator - stakeAddressesOnContract(t, ctx, multiversXProxyWithChainSimulator, aggregatorAddress, []keysHolder{ownerKeys}) + stakeAddressesOnContract(t, ctx, mvxChainSimulator, aggregatorAddress, []keysHolder{ownerKeys}) // unpause multisig - hash = unpauseContract(t, ctx, multiversXProxyWithChainSimulator, ownerKeys, multisigAddress, []byte(unpause)) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + hash = unpauseContract(t, ctx, mvxChainSimulator, ownerKeys, multisigAddress, []byte(unpause)) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("unpaused multisig executed", "hash", hash, "status", txResult.Status) // unpause safe - hash = unpauseContract(t, ctx, multiversXProxyWithChainSimulator, ownerKeys, multisigAddress, []byte(unpauseEsdtSafe)) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + hash = unpauseContract(t, ctx, mvxChainSimulator, ownerKeys, multisigAddress, []byte(unpauseEsdtSafe)) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("unpaused safe executed", "hash", hash, "status", txResult.Status) // unpause aggregator - hash = unpauseContract(t, ctx, multiversXProxyWithChainSimulator, ownerKeys, aggregatorAddress, []byte(unpause)) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + hash = unpauseContract(t, ctx, mvxChainSimulator, ownerKeys, aggregatorAddress, []byte(unpause)) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("unpaused aggregator executed", "hash", hash, "status", txResult.Status) // unpause wrapper - hash = unpauseContract(t, ctx, multiversXProxyWithChainSimulator, ownerKeys, wrapperAddress, []byte(unpause)) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + hash = unpauseContract(t, ctx, mvxChainSimulator, ownerKeys, wrapperAddress, []byte(unpause)) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("unpaused wrapper executed", "hash", hash, "status", txResult.Status) return safeAddress, multisigAddress, wrapperAddress, aggregatorAddress } -func stakeAddressesOnContract(t *testing.T, ctx context.Context, multiversXProxyWithChainSimulator proxyWithChainSimulator, contract string, allKeys []keysHolder) { +func stakeAddressesOnContract(t *testing.T, ctx context.Context, mvxChainSimulator chainSimulatorWrapper, contract string, allKeys []keysHolder) { for _, keys := range allKeys { - hash, err := multiversXProxyWithChainSimulator.SendTx(ctx, keys.pk, keys.sk, contract, minRelayerStake, []byte("stake")) + hash, err := mvxChainSimulator.SendTx(ctx, keys.pk, keys.sk, contract, minRelayerStake, []byte("stake")) require.NoError(t, err) - txResult, err := multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err := mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info(fmt.Sprintf("address %s staked on contract %s with hash %s, status %s", keys.pk, contract, hash, txResult.Status)) } } -func unpauseContract(t *testing.T, ctx context.Context, multiversXProxyWithChainSimulator proxyWithChainSimulator, ownerKeys keysHolder, contract string, dataField []byte) string { - hash, err := multiversXProxyWithChainSimulator.SendTx(ctx, ownerKeys.pk, ownerKeys.sk, contract, zeroValue, dataField) +func unpauseContract(t *testing.T, ctx context.Context, mvxChainSimulator chainSimulatorWrapper, ownerKeys keysHolder, contract string, dataField []byte) string { + hash, err := mvxChainSimulator.SendTx(ctx, ownerKeys.pk, ownerKeys.sk, contract, zeroValue, dataField) require.NoError(t, err) return hash @@ -635,7 +648,7 @@ func unpauseContract(t *testing.T, ctx context.Context, multiversXProxyWithChain func issueAndWhitelistToken( t *testing.T, ctx context.Context, - multiversXProxyWithChainSimulator proxyWithChainSimulator, + mvxChainSimulator chainSimulatorWrapper, ownerKeys keysHolder, wrapperAddress string, safeAddress string, @@ -644,7 +657,7 @@ func issueAndWhitelistToken( erc20Token string, ) (string, string) { // issue universal token - hash, err := multiversXProxyWithChainSimulator.ScCall( + hash, err := mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -653,15 +666,15 @@ func issueAndWhitelistToken( issue, []string{hex.EncodeToString([]byte(universalTokenDisplayName)), hex.EncodeToString([]byte(universalTokenTicker)), "00", numOfDecimalsUniversal, hex.EncodeToString([]byte(canAddSpecialRoles)), hex.EncodeToString([]byte(trueStr))}) require.NoError(t, err) - txResult, err := multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err := mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) - newUniversalToken := getTokenNameFromResult(t, txResult) + newUniversalToken := getTokenNameFromResult(t, *txResult) log.Info("issue universal token tx executed", "hash", hash, "status", txResult.Status, "token", newUniversalToken) // issue chain specific token valueToMintInt, _ := big.NewInt(0).SetString(valueToMint, 10) - hash, err = multiversXProxyWithChainSimulator.ScCall( + hash, err = mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -670,14 +683,14 @@ func issueAndWhitelistToken( issue, []string{hex.EncodeToString([]byte(chainSpecificTokenDisplayName)), hex.EncodeToString([]byte(chainSpecificTokenTicker)), hex.EncodeToString(valueToMintInt.Bytes()), numOfDecimalsChainSpecific, hex.EncodeToString([]byte(canAddSpecialRoles)), hex.EncodeToString([]byte(trueStr))}) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) - newChainSpecificToken := getTokenNameFromResult(t, txResult) + newChainSpecificToken := getTokenNameFromResult(t, *txResult) log.Info("issue chain specific token tx executed", "hash", hash, "status", txResult.Status, "token", newChainSpecificToken) // set local roles bridged tokens wrapper - hash, err = multiversXProxyWithChainSimulator.ScCall( + hash, err = mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -686,13 +699,13 @@ func issueAndWhitelistToken( setSpecialRole, []string{hex.EncodeToString([]byte(newUniversalToken)), getHexAddress(t, wrapperAddress), hex.EncodeToString([]byte(esdtRoleLocalMint)), hex.EncodeToString([]byte(esdtRoleLocalBurn))}) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("set local roles bridged tokens wrapper tx executed", "hash", hash, "status", txResult.Status) // transfer to sc - hash, err = multiversXProxyWithChainSimulator.ScCall( + hash, err = mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -701,13 +714,13 @@ func issueAndWhitelistToken( esdtTransfer, []string{hex.EncodeToString([]byte(newChainSpecificToken)), hex.EncodeToString(valueToMintInt.Bytes()), hex.EncodeToString([]byte(depositLiquidity))}) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("transfer to sc tx executed", "hash", hash, "status", txResult.Status) // add wrapped token - hash, err = multiversXProxyWithChainSimulator.ScCall( + hash, err = mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -716,13 +729,13 @@ func issueAndWhitelistToken( addWrappedToken, []string{hex.EncodeToString([]byte(newUniversalToken)), numOfDecimalsUniversal}) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("add wrapped token tx executed", "hash", hash, "status", txResult.Status) // wrapper whitelist token - hash, err = multiversXProxyWithChainSimulator.ScCall( + hash, err = mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -731,13 +744,13 @@ func issueAndWhitelistToken( whitelistToken, []string{hex.EncodeToString([]byte(newChainSpecificToken)), numOfDecimalsChainSpecific, hex.EncodeToString([]byte(newUniversalToken))}) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("wrapper whitelist token tx executed", "hash", hash, "status", txResult.Status) // set local roles esdt safe - hash, err = multiversXProxyWithChainSimulator.ScCall( + hash, err = mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -746,13 +759,13 @@ func issueAndWhitelistToken( setSpecialRole, []string{hex.EncodeToString([]byte(newChainSpecificToken)), getHexAddress(t, safeAddress), hex.EncodeToString([]byte(esdtRoleLocalMint)), hex.EncodeToString([]byte(esdtRoleLocalBurn))}) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("set local roles esdt safe tx executed", "hash", hash, "status", txResult.Status) // add mapping - hash, err = multiversXProxyWithChainSimulator.ScCall( + hash, err = mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -761,13 +774,13 @@ func issueAndWhitelistToken( addMapping, []string{erc20Token, hex.EncodeToString([]byte(newChainSpecificToken))}) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("add mapping tx executed", "hash", hash, "status", txResult.Status) // whitelist token - hash, err = multiversXProxyWithChainSimulator.ScCall( + hash, err = mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -776,17 +789,17 @@ func issueAndWhitelistToken( esdtSafeAddTokenToWhitelist, []string{hex.EncodeToString([]byte(newChainSpecificToken)), hex.EncodeToString([]byte(chainSpecificTokenTicker)), "01", "01"}) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("whitelist token tx executed", "hash", hash, "status", txResult.Status) // submit aggregator batch - submitAggregatorBatch(t, ctx, multiversXProxyWithChainSimulator, aggregatorAddress, ownerKeys) + submitAggregatorBatch(t, ctx, mvxChainSimulator, aggregatorAddress, ownerKeys) // safe set max bridge amount for token maxBridgedAmountForTokenInt, _ := big.NewInt(0).SetString(maxBridgedAmountForToken, 10) - hash, err = multiversXProxyWithChainSimulator.ScCall( + hash, err = mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -795,13 +808,13 @@ func issueAndWhitelistToken( esdtSafeSetMaxBridgedAmountForToken, []string{hex.EncodeToString([]byte(newChainSpecificToken)), hex.EncodeToString(maxBridgedAmountForTokenInt.Bytes())}) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("safe set max bridge amount for token tx executed", "hash", hash, "status", txResult.Status) // multi-transfer set max bridge amount for token - hash, err = multiversXProxyWithChainSimulator.ScCall( + hash, err = mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -810,7 +823,7 @@ func issueAndWhitelistToken( multiTransferEsdtSetMaxBridgedAmountForToken, []string{hex.EncodeToString([]byte(newChainSpecificToken)), hex.EncodeToString(maxBridgedAmountForTokenInt.Bytes())}) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("multi-transfer set max bridge amount for token tx executed", "hash", hash, "status", txResult.Status) @@ -841,13 +854,13 @@ func getHexAddress(t *testing.T, bech32Address string) string { func checkESDTBalance( t *testing.T, ctx context.Context, - multiversXProxyWithChainSimulator proxyWithChainSimulator, + mvxChainSimulator chainSimulatorWrapper, address sdkCore.AddressHandler, token string, expectedBalance string, checkResult bool, ) bool { - balance, err := multiversXProxyWithChainSimulator.GetESDTBalance(ctx, address, token) + balance, err := mvxChainSimulator.GetESDTBalance(ctx, address, token) require.NoError(t, err) if checkResult { @@ -869,7 +882,7 @@ func checkETHStatus(ethereumChainMock *mock.EthereumChainMock, receiver common.A func sendMVXToEthTransaction( t *testing.T, ctx context.Context, - multiversXProxyWithChainSimulator proxyWithChainSimulator, + mvxChainSimulator chainSimulatorWrapper, value []byte, universalToken string, chainSpecificToken string, @@ -886,9 +899,9 @@ func sendMVXToEthTransaction( hex.EncodeToString([]byte(chainSpecificToken)), } - hash, err := multiversXProxyWithChainSimulator.ScCall(ctx, senderKeys.pk, senderKeys.sk, wrapperAddress, zeroValue, esdtTransfer, paramsUnwrap) + hash, err := mvxChainSimulator.ScCall(ctx, senderKeys.pk, senderKeys.sk, wrapperAddress, zeroValue, esdtTransfer, paramsUnwrap) require.NoError(t, err) - txResult, err := multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err := mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("unwrap transaction sent", "hash", hash, "token", universalToken, "status", txResult.Status) @@ -901,10 +914,10 @@ func sendMVXToEthTransaction( hex.EncodeToString(receiver), } - hash, err = multiversXProxyWithChainSimulator.ScCall(ctx, senderKeys.pk, senderKeys.sk, safeAddress, zeroValue, esdtTransfer, params) + hash, err = mvxChainSimulator.ScCall(ctx, senderKeys.pk, senderKeys.sk, safeAddress, zeroValue, esdtTransfer, params) require.NoError(t, err) - txResult, err = multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err = mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("MVX->ETH transaction sent", "hash", hash, "status", txResult.Status) @@ -912,10 +925,10 @@ func sendMVXToEthTransaction( return hash } -func submitAggregatorBatch(t *testing.T, ctx context.Context, multiversXProxyWithChainSimulator proxyWithChainSimulator, aggregatorAddress string, ownerKeys keysHolder) { +func submitAggregatorBatch(t *testing.T, ctx context.Context, mvxChainSimulator chainSimulatorWrapper, aggregatorAddress string, ownerKeys keysHolder) { feeInt, _ := big.NewInt(0).SetString(fee, 10) timestamp := big.NewInt(time.Now().Unix()) - hash, err := multiversXProxyWithChainSimulator.ScCall( + hash, err := mvxChainSimulator.ScCall( ctx, ownerKeys.pk, ownerKeys.sk, @@ -924,7 +937,7 @@ func submitAggregatorBatch(t *testing.T, ctx context.Context, multiversXProxyWit submitBatch, []string{hex.EncodeToString([]byte(gwei)), hex.EncodeToString([]byte(chainSpecificTokenTicker)), hex.EncodeToString(timestamp.Bytes()), hex.EncodeToString(feeInt.Bytes()), numOfDecimalsChainSpecific}) require.NoError(t, err) - txResult, err := multiversXProxyWithChainSimulator.GetTransactionResult(ctx, hash) + txResult, err := mvxChainSimulator.GetTransactionResult(ctx, hash) require.NoError(t, err) log.Info("submit aggregator batch tx executed", "hash", hash, "submitter", ownerKeys.pk, "status", txResult.Status) diff --git a/integrationTests/relayers/ethToMultiversX_test.go b/integrationTests/relayers/ethToMultiversX_test.go index b3204a43..fcd27238 100644 --- a/integrationTests/relayers/ethToMultiversX_test.go +++ b/integrationTests/relayers/ethToMultiversX_test.go @@ -1,9 +1,10 @@ +//go:build !slow + package relayers import ( "context" "encoding/hex" - "fmt" "math/big" "testing" "time" @@ -13,7 +14,6 @@ import ( "github.com/ethereum/go-ethereum/core/types" ethmultiversx "github.com/multiversx/mx-bridge-eth-go/bridges/ethMultiversX" "github.com/multiversx/mx-bridge-eth-go/clients" - "github.com/multiversx/mx-bridge-eth-go/clients/chain" "github.com/multiversx/mx-bridge-eth-go/clients/ethereum/contract" "github.com/multiversx/mx-bridge-eth-go/config" "github.com/multiversx/mx-bridge-eth-go/core" @@ -23,7 +23,6 @@ import ( "github.com/multiversx/mx-bridge-eth-go/status" "github.com/multiversx/mx-bridge-eth-go/testsCommon" "github.com/multiversx/mx-bridge-eth-go/testsCommon/bridge" - chainConfig "github.com/multiversx/mx-chain-go/config" "github.com/multiversx/mx-chain-go/p2p" "github.com/multiversx/mx-chain-go/testscommon/statusHandler" "github.com/stretchr/testify/assert" @@ -374,7 +373,7 @@ func createMockBridgeComponentsArgs( ethereumChainMock *mock.EthereumChainMock, ) factory.ArgsEthereumToMultiversXBridge { - generalConfigs := createBridgeComponentsConfig(index) + generalConfigs := createBridgeComponentsConfig(index, "testdata") return factory.ArgsEthereumToMultiversXBridge{ Configs: config.Configs{ GeneralConfig: generalConfigs, @@ -394,53 +393,3 @@ func createMockBridgeComponentsArgs( MultiversXClientStatusHandler: &testsCommon.StatusHandlerStub{}, } } - -func createBridgeComponentsConfig(index int) config.Config { - stateMachineConfig := config.ConfigStateMachine{ - StepDurationInMillis: 1000, - IntervalForLeaderInSeconds: 60, - } - - return config.Config{ - Eth: config.EthereumConfig{ - Chain: chain.Ethereum, - NetworkAddress: "mock", - MultisigContractAddress: "3009d97FfeD62E57d444e552A9eDF9Ee6Bc8644c", - PrivateKeyFile: fmt.Sprintf("testdata/ethereum%d.sk", index), - IntervalToResendTxsInSeconds: 10, - GasLimitBase: 200000, - GasLimitForEach: 30000, - GasStation: config.GasStationConfig{ - Enabled: false, - }, - MaxRetriesOnQuorumReached: 1, - IntervalToWaitForTransferInSeconds: 1, - MaxBlocksDelta: 5, - }, - MultiversX: config.MultiversXConfig{ - NetworkAddress: "mock", - MultisigContractAddress: "erd1qqqqqqqqqqqqqpgqzyuaqg3dl7rqlkudrsnm5ek0j3a97qevd8sszj0glf", - SafeContractAddress: "erd1qqqqqqqqqqqqqpgqtvnswnzxxz8susupesys0hvg7q2z5nawrcjq06qdus", - PrivateKeyFile: fmt.Sprintf("testdata/multiversx%d.pem", index), - IntervalToResendTxsInSeconds: 10, - GasMap: testsCommon.CreateTestMultiversXGasMap(), - MaxRetriesOnQuorumReached: 1, - MaxRetriesOnWasTransferProposed: 3, - ProxyMaxNoncesDelta: 5, - }, - P2P: config.ConfigP2P{}, - StateMachine: map[string]config.ConfigStateMachine{ - "EthereumToMultiversX": stateMachineConfig, - "MultiversXToEthereum": stateMachineConfig, - }, - Relayer: config.ConfigRelayer{ - Marshalizer: chainConfig.MarshalizerConfig{ - Type: "json", - SizeCheckDelta: 10, - }, - RoleProvider: config.RoleProviderConfig{ - PollingIntervalInMillis: 1000, - }, - }, - } -} diff --git a/integrationTests/relayers/multiversXToEth_test.go b/integrationTests/relayers/multiversXToEth_test.go index 9f326742..a7fa525d 100644 --- a/integrationTests/relayers/multiversXToEth_test.go +++ b/integrationTests/relayers/multiversXToEth_test.go @@ -1,3 +1,5 @@ +//go:build !slow + package relayers import ( @@ -13,13 +15,10 @@ import ( "github.com/multiversx/mx-bridge-eth-go/integrationTests" "github.com/multiversx/mx-bridge-eth-go/integrationTests/mock" "github.com/multiversx/mx-bridge-eth-go/testsCommon" - logger "github.com/multiversx/mx-chain-logger-go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) -var log = logger.GetOrCreate("integrationTests/relayers") - func asyncCancelCall(cancelHandler func(), delay time.Duration) { go func() { time.Sleep(delay) @@ -219,12 +218,6 @@ func createTransaction(index int) (mock.MultiversXDeposit, common.Address) { }, tokenAddress } -func closeRelayers(relayers []bridgeComponents) { - for _, r := range relayers { - _ = r.Close() - } -} - func checkTestStatus( t *testing.T, multiversXChainMock *mock.MultiversXChainMock, diff --git a/integrationTests/relayers/testdata/config/nodeConfig/api.toml b/integrationTests/relayers/testdata/config/nodeConfig/api.toml deleted file mode 100644 index 04afa90b..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/api.toml +++ /dev/null @@ -1,309 +0,0 @@ -# Logging holds settings related to api requests logging -[Logging] - # LoggingEnabled - if this flag is set to true, then if a requests exceeds a threshold or it is unsuccessful, then - # a log will be printed - LoggingEnabled = false - - # ThresholdInMicroSeconds represents the maximum duration to consider a request as normal. Above this, if the LoggingEnabled - # flag is set to true, then a log will be printed - ThresholdInMicroSeconds = 1000 - -# API routes configuration -[APIPackages] - -[APIPackages.node] - Routes = [ - # /node/status will return all metrics stored inside a node - { Name = "/status", Open = true }, - - # /node/metrics will return all metrics stored inside a node in the format that Prometheus expects them - { Name = "/metrics", Open = true }, - - # /node/heartbeatstatus will return all heartbeats messages from the nodes in the network - { Name = "/heartbeatstatus", Open = true }, - - # /node/p2pstatus will return the metrics related to p2p - { Name = "/p2pstatus", Open = true }, - - # /node/debug will return the debug information after the query has been interpreted - { Name = "/debug", Open = true }, - - # /node/peerinfo will return the p2p peer info of the provided pid - { Name = "/peerinfo", Open = true }, - - # /node/epoch-start/:epoch will return the epoch start data for a given epoch - { Name = "/epoch-start/:epoch", Open = true }, - - # /node/bootstrapstatus will return all metrics available during bootstrap - { Name = "/bootstrapstatus", Open = true }, - - # /node/connected-peers-ratings will return the peers ratings - { Name = "/connected-peers-ratings", Open = true }, - - # /node/managed-keys will return the keys managed by the node - { Name = "/managed-keys", Open = true }, - - # /node/loaded-keys will return the keys loaded by the node - { Name = "/loaded-keys", Open = true }, - - # /node/managed-keys/count will return the number of keys managed by the node - { Name = "/managed-keys/count", Open = true }, - - # /node/managed-keys/eligible will return the eligible keys managed by the node on the current epoch - { Name = "/managed-keys/eligible", Open = true }, - - # /node/managed-keys/waiting will return the waiting keys managed by the node on the current epoch - { Name = "/managed-keys/waiting", Open = true }, - - # /waiting-epochs-left/:key will return the number of epochs left in waiting state for the provided key - { Name = "/waiting-epochs-left/:key", Open = true } - ] - -[APIPackages.address] - Routes = [ - # /address/:address will return data about a given account - { Name = "/:address", Open = true }, - - # /address/bulk will return the state of the accounts provided in the bulk - { Name = "/bulk", Open = true }, - - # /address/:address/balance will return the balance of a given account - { Name = "/:address/balance", Open = true }, - - # /address/:address/username will return the username of a given account - { Name = "/:address/username", Open = true }, - - # /address/:address/code-hash will return the code hash of a given account - { Name = "/:address/code-hash", Open = true }, - - # /address/:address/keys will return all the key-value pairs of a given account - { Name = "/:address/keys", Open = true }, - - # /address/:address/key/:key will return the value of a key for a given account - { Name = "/:address/key/:key", Open = true }, - - # /:address/guardian-data will return the guardian data for the given account - { Name = "/:address/guardian-data", Open = true}, - - # /address/:address/esdt will return the list of esdt tokens for a given account - { Name = "/:address/esdt", Open = true }, - - # /:address/esdts/roles will return the list of esdt tokens and roles for a given account - { Name = "/:address/esdts/roles", Open = true }, - - # /address/:address/esdt/:tokenIdentifier will return the balance for a given account and esdt tokenID - { Name = "/:address/esdt/:tokenIdentifier", Open = true }, - - # /address/:address/nft/:tokenIdentifier/nonce/:nonce will return data of an nft esdt token for a given account, tokenID and nonce - { Name = "/:address/nft/:tokenIdentifier/nonce/:nonce", Open = true }, - - # /address/:address/esdts-with-role/:role will return the token identifiers with the given role for an address - { Name = "/:address/esdts-with-role/:role", Open = true }, - - # /address/:address/registered-nfts will return the token identifiers of the tokens registered by the address - { Name = "/:address/registered-nfts", Open = true }, - - # /address/:address/is-data-trie-migrated will return the status of the data trie migration for the given address - { Name = "/:address/is-data-trie-migrated", Open = true } - ] - -[APIPackages.hardfork] - Routes = [ - # /hardfork/trigger will receive a trigger request from the client and propagate it for processing - { Name = "/trigger", Open = true } - ] - -[APIPackages.network] - Routes = [ - # /network/status will return metrics related to current status of the chain (epoch, nonce, round) - { Name = "/status", Open = true }, - - # /network/economics will return all economics related metrics - { Name = "/economics", Open = true }, - - # /network/config will return metrics related to current configuration of the network (number of shards, - # consensus group size and so on) - { Name = "/config", Open = true }, - - # /network/enable-epochs will return metrics related to activation epochs - { Name = "/enable-epochs", Open = true }, - - # /network/esdts will return all the issued esdts on the protocol - { Name = "/esdts", Open = true }, - - # /network/fungible-tokens will return all the issued fungible tokens on the protocol - { Name = "/esdt/fungible-tokens", Open = true }, - - # /network/semi-fungible-tokens will return all the issued semi fungible tokens on the protocol - { Name = "/esdt/semi-fungible-tokens", Open = true }, - - # /network/non-fungible-tokens will return all the issued non fungible tokens on the protocol - { Name = "/esdt/non-fungible-tokens", Open = true }, - - # /network/esdt/supply/:token will return the supply for a given token - { Name = "/esdt/supply/:token", Open = true }, - - # /network/direct-staked-info will return a list containing direct staked list of addresses - # and their staked values - { Name = "/direct-staked-info", Open = true}, - - # /network/delegated-info will return a list containing delegated list of addresses - # and their staked values on the system delegation smart contracts - { Name = "/delegated-info", Open = true}, - - # /network/ratings will return metrics related to ratings config - { Name = "/ratings", Open = true }, - - # /network/genesis-nodes will return the genesis nodes public keys - { Name = "/genesis-nodes", Open = true }, - - # /network/genesis-balances will return the balances minted at genesis - { Name = "/genesis-balances", Open = true }, - - # /network/gas-configs will return currently scheduled gas configs - { Name = "/gas-configs", Open = true } - ] - -[APIPackages.log] - Routes = [ - # /log will handle sending the log information - { Name = "/log", Open = true } - ] - -[APIPackages.validator] - Routes = [ - # /validator/statistics will return a list of validators statistics for all validators - { Name = "/statistics", Open = true } - ] - -[APIPackages.vm-values] - Routes = [ - # /vm-values/hex will return the data as bytes in hex format - { Name = "/hex", Open = true }, - - # /vm-values/string will return the data in string format - { Name = "/string", Open = true }, - - # /vm-values/int will return the data as big int - { Name = "/int", Open = true }, - - # /vm-values/query will return the data in string format - { Name = "/query", Open = true } - ] - -[APIPackages.transaction] - Routes = [ - # /transaction/send will receive a single transaction in JSON format and will propagate it through the network - # if it's fields are valid. It will return the hash of the transaction - { Name = "/send", Open = true }, - - # /transaction/simulate will receive a single transaction in JSON format and will simulate it's execution - # in order to check that it will be successfully executed when sending it for propagation - { Name = "/simulate", Open = true }, - - # /transaction/send-multiple will receive an array of transactions in JSON format and will propagate through - # the network those whose fields are valid. It will return the number of valid transactions propagated - { Name = "/send-multiple", Open = true }, - - # /transaction/cost will receive a single transaction in JSON format and will return the estimated cost of it - { Name = "/cost", Open = true }, - - # /transaction/pool will return the hashes of the transactions that are currently in the pool - # /transaction/pool?fields=sender,receiver,gaslimit,gasprice will return hashes and all the optional fields mentioned that are currently in the pool - # /transaction/pool?by-sender=erd1... will return the hashes of the transactions that are currently in the pool for the sender - # /transaction/pool?by-sender=erd1...&fields=sender,receiver,gaslimit,gasprice will return the hashes and all the optional fields mentioned of the transactions that are currently in the pool for the sender - # /transaction/pool?by-sender=erd1...&last-nonce=true will return the last nonce for the sender from the pool - # /transaction/pool?by-sender=erd1...&nonce-gaps=true will return all nonce gaps for the sender from the pool, if applicable - { Name = "/pool", Open = true }, - - # /transaction/:txhash will return the transaction in JSON format based on its hash - { Name = "/:txhash", Open = true }, - ] - -[APIPackages.block] - Routes = [ - # /block/by-nonce/:nonce will return the block in JSON format based on its nonce - { Name = "/by-nonce/:nonce", Open = true }, - - # /block/by-hash/:hash will return the block in JSON format based on its hash - { Name = "/by-hash/:hash", Open = true }, - - # /block/by-round/:round will return the block in JSON format based on round - { Name = "/by-round/:round", Open = true }, - - # /altered-accounts/by-nonce/:nonce will return the altered accounts of a block with the provided nonce - { Name = "/altered-accounts/by-nonce/:nonce", Open = true }, - - # /altered-accounts/by-hash/:hash will return the altered accounts of a block with the provided hash - { Name = "/altered-accounts/by-hash/:hash", Open = true } - ] - -[APIPackages.internal] - Routes = [ - # /internal/raw/metablock/by-nonce/:nonce will return the meta block in raw format based on its nonce - { Name = "/raw/metablock/by-nonce/:nonce", Open = true }, - - # /internal/raw/metablock/by-hash/:hash will return the meta block in raw format based on its hash - { Name = "/raw/metablock/by-hash/:hash", Open = true }, - - # /internal/raw/metablock/by-round/:round will return the meta block in raw format based on round - { Name = "/raw/metablock/by-round/:round", Open = true }, - - # /internal/raw/startofepoch/metablock/by-epoch/:epoch will return the start of epoch meta block in raw format based on epoch - { Name = "/raw/startofepoch/metablock/by-epoch/:epoch", Open = true }, - - # /internal/raw/shardblock/by-nonce/:nonce will return the shard block in raw format based on its nonce - { Name = "/raw/shardblock/by-nonce/:nonce", Open = true }, - - # /internal/raw/shardblock/by-hash/:hash will return the shard block in raw format based on its hash - { Name = "/raw/shardblock/by-hash/:hash", Open = true }, - - # /internal/raw/shardblock/by-round/:round will return the shard block in raw format based on round - { Name = "/raw/shardblock/by-round/:round", Open = true }, - - # /internal/json/metablock/by-round/:nonce will return the meta block in JSON format based on nonce - { Name = "/json/metablock/by-nonce/:nonce", Open = true }, - - # /internal/json/metablock/by-round/:hash will return the meta block in JSON format based on hash - { Name = "/json/metablock/by-hash/:hash", Open = true }, - - # /internal/json/metablock/by-round/:round will return the meta block in JSON format based on roud - { Name = "/json/metablock/by-round/:round", Open = true }, - - # /internal/json/startofepoch/metablock/by-epoch/:epoch will return the start of epoch meta block in json format based on epoch - { Name = "/json/startofepoch/metablock/by-epoch/:epoch", Open = true }, - - # /internal/json/shardblock/by-round/:nonce will return the shard block in JSON format based on nonce - { Name = "/json/shardblock/by-nonce/:nonce", Open = true }, - - # /internal/json/shardblock/by-round/:hash will return the shard block in JSON format based on hash - { Name = "/json/shardblock/by-hash/:hash", Open = true }, - - # /internal/json/shardblock/by-round/:round will return the shard block in JSON format based on round - { Name = "/json/shardblock/by-round/:round", Open = true }, - - # /internal/raw/miniblock/by-hash/:hash will return the miniblock in raw format based on hash for a specified epoch - { Name = "/raw/miniblock/by-hash/:hash/epoch/:epoch", Open = true }, - - # /internal/json/miniblock/by-hash/:hash will return the miniblock in JSON format based on hash for a specified epoch - { Name = "/json/miniblock/by-hash/:hash/epoch/:epoch", Open = true }, - - # /internal/raw/startofepoch/validators/by-epoch/:epoch will return the start of epoch validators info in json format based on epoch - { Name = "/json/startofepoch/validators/by-epoch/:epoch", Open = true } - - ] - -[APIPackages.proof] - Routes = [ - # /proof/root-hash/:roothash/address/:address will compute and return the proof in JSON format - { Name = "/root-hash/:roothash/address/:address", Open = true }, - - # /proof/root-hash/:roothash/address/:address/key/:key will compute and return the proof in JSON format - { Name = "/root-hash/:roothash/address/:address/key/:key", Open = true }, - - # /proof/address/:address will compute and return the proof and root hash in JSON format - { Name = "/address/:address", Open = true }, - - # /proof/verify will return the response from Merkle proof verification in JSON format - { Name = "/verify", Open = true }, - ] diff --git a/integrationTests/relayers/testdata/config/nodeConfig/config.toml b/integrationTests/relayers/testdata/config/nodeConfig/config.toml deleted file mode 100644 index b6c11452..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/config.toml +++ /dev/null @@ -1,942 +0,0 @@ -# GeneralSettings section of the node -[GeneralSettings] - # StatusPollingIntervalSec represents the no of seconds between multiple polling for the status for AppStatusHandler - StatusPollingIntervalSec = 2 - - # MaxComputableRounds represents the max number of rounds computable in a round - # by the validator statistics processor - MaxComputableRounds = 100 - - # StartInEpochEnabled represents that the fast bootstrap mechanism from the network is enabled if data is not - # available in local disk - StartInEpochEnabled = true - - # ChainID represents the chain identifier - # The currently supported constants are: - # "1" for Mainnet - # "D" for Devnet - # "T" for Testnet - ChainID = "undefined" - - # MinTransactionVersion represents the minimum transaction version accepted - MinTransactionVersion = 1 - - # GenesisString represents the encoded string for the genesis block - GenesisString = "67656E65736973" - - # GenesisMaxNumberOfShards represents the maximum number of shards to be created at genesis (excluding metaChain shard) - GenesisMaxNumberOfShards = 3 - - # MaxConsecutiveRoundsOfRatingDecrease represents the max number of consecutive rounds in which a block is not proposed - # on a shard and the validators' rating could be decreased. If, for instance, a shard gets stuck for more rounds - # than this value, then the validators rating decrease should stop so they won't get jailed - MaxConsecutiveRoundsOfRatingDecrease = 600 - - # SyncProcessTimeInMillis is the value in milliseconds used when processing blocks while synchronizing blocks - SyncProcessTimeInMillis = 12000 - - # SetGuardianEpochsDelay represents the delay in epochs between the execution time of the SetGuardian transaction and - # the activation of the configured guardian. - # Make sure that this is greater than the unbonding period! - SetGuardianEpochsDelay = 2 # TODO: for mainnet should be 20, 2 is just for testing - -[HardwareRequirements] - CPUFlags = ["SSE4", "SSE42"] - -[Versions] - DefaultVersion = "default" - VersionsByEpochs = [ - { StartEpoch = 0, Version = "*" }, - # The value of StartEpoch parameter for version 2 should be the same with the ScheduledMiniBlocksEnableEpoch flag from enableEpoch.toml file - { StartEpoch = 1, Version = "2" }, - ] - [Versions.Cache] - Name = "VersionsCache" - Capacity = 100 - Type = "LRU" - -[StoragePruning] - # If the Enabled flag is set to false, then the storers won't divide epochs into separate dbs - Enabled = true - - # If this flag is set to false, the node won't delete any database between epochs - # Applicable only for validators - ValidatorCleanOldEpochsData = true - - # If this flag is set to false, the node won't delete any database between epochs - # Applicable only for observers - ObserverCleanOldEpochsData = false - - # If this flag is set to false, the node won't delete the AccountsTrie database for old epochs - # Applicable for both observers and validators - # WARNING! Setting this to false will increase each epoch's directory size with the trie snapshot, - # which might easily cause the node to run out of disk space. - AccountsTrieCleanOldEpochsData = true - - # AccountsTrieSkipRemovalCustomPattern represents the custom pattern that determines when AccountsTrie database - # doesn't have to be cleaned - # Format: %x,%y - if an epoch is divisible by x or by y, then the AccountsTrie database won't be removed - # If empty, then all databases will be removed - # If invalid format, then an error will be returned - # Applicable only if AccountsTrieCleanOldEpochsData is set to true - AccountsTrieSkipRemovalCustomPattern = "%50" - - # NumEpochsToKeep - if the flag above is set to true, this will set the number of epochs to keep in the storage. - # Epochs older that (current epoch - NumOfEpochsToKeep) will be removed - NumEpochsToKeep = 4 - - # NumActivePersisters - this will set the number of persisters to keep active at a moment. This works even if - # the node removes old epochs data or not. In case of a node which removes old epochs data, this value has to be - # smaller or equal to the NumOfEpochsToKeep flag - NumActivePersisters = 3 - - # FullArchiveNumActivePersisters represents the number of persisters to be kept in cache as to allow better response - # to inquiring peers. This value will get multiplied by the number of persisters required by the node to function so - # it is a good idea to increase the maximum number of opened files allowed by the operating system - FullArchiveNumActivePersisters = 10 - -[MiniBlocksStorage] - [MiniBlocksStorage.Cache] - Name = "MiniBlocksStorage" - Capacity = 1000 - Type = "SizeLRU" - SizeInBytes = 104857600 #100MB - [MiniBlocksStorage.DB] - FilePath = "MiniBlocks" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 100 - MaxOpenFiles = 10 - -[ReceiptsStorage] - [ReceiptsStorage.Cache] - Name = "ReceiptsStorage" - Capacity = 1000 - Type = "SizeLRU" - SizeInBytes = 10485760 #10MB - [ReceiptsStorage.DB] - FilePath = "Receipts" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 100 - MaxOpenFiles = 10 - -[ScheduledSCRsStorage] - [ScheduledSCRsStorage.Cache] - Name = "ScheduledSCRsStorage" - Capacity = 1000 - Type = "SizeLRU" - SizeInBytes = 10485760 #10MB - [ScheduledSCRsStorage.DB] - FilePath = "ScheduledSCRs" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 100 - MaxOpenFiles = 10 - -[PeerBlockBodyStorage] - [PeerBlockBodyStorage.Cache] - Name = "PeerBlockBodyStorage" - Capacity = 1000 - Type = "SizeLRU" - SizeInBytes = 104857600 #100MB - [PeerBlockBodyStorage.DB] - FilePath = "PeerBlocks" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 100 - MaxOpenFiles = 10 - -[BlockHeaderStorage] - [BlockHeaderStorage.Cache] - Name = "BlockHeaderStorage" - Capacity = 1000 - Type = "SizeLRU" - SizeInBytes = 3145728 #3MB - [BlockHeaderStorage.DB] - FilePath = "BlockHeaders" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 100 - MaxOpenFiles = 10 - -[BootstrapStorage] - [BootstrapStorage.Cache] - Name = "BootstrapStorage" - Capacity = 1000 - Type = "SizeLRU" - SizeInBytes = 104857600 #100MB - [BootstrapStorage.DB] - FilePath = "BootstrapData" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 100 - MaxOpenFiles = 10 - -[MetaBlockStorage] - [MetaBlockStorage.Cache] - Name = "MetaBlockStorage" - Capacity = 1000 - Type = "SizeLRU" - SizeInBytes = 20971520 #20MB - [MetaBlockStorage.DB] - FilePath = "MetaBlock" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 100 - MaxOpenFiles = 10 - -[TxStorage] - [TxStorage.Cache] - Name = "TxStorage" - Capacity = 500000 - Type = "SizeLRU" - SizeInBytes = 209715200 #200MB - [TxStorage.DB] - FilePath = "Transactions" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 30000 - MaxOpenFiles = 10 - -[UnsignedTransactionStorage] - [UnsignedTransactionStorage.Cache] - Name = "UnsignedTransactionStorage" - Capacity = 250000 - Type = "SizeLRU" - SizeInBytes = 104857600 #100MB - [UnsignedTransactionStorage.DB] - FilePath = "UnsignedTransactions" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 20000 - MaxOpenFiles = 10 - -[RewardTxStorage] - [RewardTxStorage.Cache] - Name = "RewardTxStorage" - Capacity = 75000 - Type = "SizeLRU" - SizeInBytes = 52428800 #50MB - [RewardTxStorage.DB] - FilePath = "RewardTransactions" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 20000 - MaxOpenFiles = 10 - -[SmartContractsStorage] - [SmartContractsStorage.Cache] - Name = "SmartContractsStorage" - Capacity = 1000 - Type = "SizeLRU" - SizeInBytes = 52428800 #50MB - [SmartContractsStorage.DB] - FilePath = "SmartContractsStorage" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 100 - MaxOpenFiles = 10 - -[SmartContractsStorageSimulate] - [SmartContractsStorageSimulate.Cache] - Name = "SmartContractsStorageSimulate" - Capacity = 1000 - Type = "SizeLRU" - SizeInBytes = 52428800 #50MB - [SmartContractsStorageSimulate.DB] - FilePath = "SmartContractsStorageSimulate" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 100 - MaxOpenFiles = 10 - -[SmartContractsStorageForSCQuery] - [SmartContractsStorageForSCQuery.Cache] - Name = "SmartContractsStorageForSCQuery" - Capacity = 1000 - Type = "SizeLRU" - SizeInBytes = 52428800 #50MB - [SmartContractsStorageForSCQuery.DB] - FilePath = "SmartContractsStorageForSCQuery" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 100 - MaxOpenFiles = 10 - -[StatusMetricsStorage] - [StatusMetricsStorage.Cache] - Name = "StatusMetricsStorage" - Capacity = 1000 - Type = "LRU" - [StatusMetricsStorage.DB] - FilePath = "StatusMetricsStorageDB" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 100 - MaxOpenFiles = 10 - -[TrieEpochRootHashStorage] - [TrieEpochRootHashStorage.Cache] - Name = "TrieEpochRootHashCache" - Capacity = 1000 - Type = "SizeLRU" - SizeInBytes = 314572800 #300MB - [TrieEpochRootHashStorage.DB] - FilePath = "TrieEpochRootHashStorageDB" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 500 - MaxOpenFiles = 10 - -[ShardHdrNonceHashStorage] - [ShardHdrNonceHashStorage.Cache] - Name = "ShardHdrNonceHashStorage" - Capacity = 1000 - Type = "SizeLRU" - SizeInBytes = 3145728 #3MB - [ShardHdrNonceHashStorage.DB] - FilePath = "ShardHdrHashNonce" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 100 - MaxOpenFiles = 10 - -[MetaHdrNonceHashStorage] - [MetaHdrNonceHashStorage.Cache] - Name = "MetaHdrNonceHashStorage" - Capacity = 1000 - Type = "SizeLRU" - SizeInBytes = 3145728 #3MB - [MetaHdrNonceHashStorage.DB] - FilePath = "MetaHdrHashNonce" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 100 - MaxOpenFiles = 10 - -[AccountsTrieStorage] - [AccountsTrieStorage.Cache] - Name = "AccountsTrieStorage" - Capacity = 500000 - Type = "SizeLRU" - SizeInBytes = 314572800 #300MB - [AccountsTrieStorage.DB] - FilePath = "AccountsTrie" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 45000 - MaxOpenFiles = 10 - ShardIDProviderType = "BinarySplit" - NumShards = 4 - -[PeerAccountsTrieStorage] - [PeerAccountsTrieStorage.Cache] - Name = "PeerAccountsTrieStorage" - Capacity = 5000 - Type = "SizeLRU" - SizeInBytes = 104857600 #100MB - [PeerAccountsTrieStorage.DB] - FilePath = "PeerAccountsTrie" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 1000 - MaxOpenFiles = 10 - ShardIDProviderType = "BinarySplit" - NumShards = 4 - -[EvictionWaitingList] - #total max size ~ 2 * [(RoothashesSize * 32) + (HashesSize * 32)] - RootHashesSize = 10000 - HashesSize = 100000 - [EvictionWaitingList.DB] - FilePath = "EvictionWaitingList" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 100 - MaxOpenFiles = 10 - -[TrieStorageManagerConfig] - PruningBufferLen = 100000 - SnapshotsBufferLen = 1000000 - SnapshotsGoroutineNum = 200 - -[HeadersPoolConfig] - MaxHeadersPerShard = 1000 - NumElementsToRemoveOnEviction = 200 - -[BadBlocksCache] - Name = "BadBlocksCache" - Capacity = 1000 - Type = "SizeLRU" - SizeInBytes = 3145728 #3MB - -[TxBlockBodyDataPool] - Name = "TxBlockBodyDataPool" - Capacity = 100000 - Type = "SizeLRU" - SizeInBytes = 314572800 #300MB - -[PeerBlockBodyDataPool] - Name = "PeerBlockBodyDataPool" - Capacity = 1000 - Type = "SizeLRU" - SizeInBytes = 314572800 #300MB - -[TxDataPool] - Name = "TxDataPool" - Capacity = 600000 - SizePerSender = 20000 - SizeInBytes = 419430400 #400MB - SizeInBytesPerSender = 12288000 - Type = "TxCache" - Shards = 16 - -[TrieNodesChunksDataPool] - Name = "TrieNodesDataPool" - Capacity = 400 - Type = "SizeLRU" - SizeInBytes = 104857600 #100MB - -[SmartContractDataPool] - Name = "SmartContractDataPool" - Capacity = 900000 - Type = "SizeLRU" - SizeInBytes = 209715200 #200MB - -[WhiteListPool] - Name = "WhiteListPool" - Capacity = 100000 - Type = "FIFOSharded" - Shards = 10 - -[WhiteListerVerifiedTxs] - Name = "WhiteListerVerifiedTxs" - Capacity = 50000 - Type = "FIFOSharded" - Shards = 50 - -[UnsignedTransactionDataPool] - Name = "UnsignedTransactionDataPool" - Capacity = 75000 # per each pair (sourceShard, destinationShard) - SizeInBytes = 31457280 # 30MB per each pair (sourceShard, destinationShard) - Shards = 4 - -[RewardTransactionDataPool] - Name = "RewardTransactionDataPool" - Capacity = 75000 # per each pair (metachain, destinationShard) - SizeInBytes = 26214400 # 25MB per each pair (metachain, destinationShard) - Shards = 4 - -[ValidatorInfoPool] - Name = "ValidatorInfoPool" - Capacity = 10000 - SizeInBytes = 31457280 #30MB - Shards = 4 - -#PublicKeyPeerId represents the main cache used to map MultiversX block signing public keys to their associated peer id's. -[PublicKeyPeerId] - Name = "PublicKeyPeerId" - Capacity = 30000 - Type = "LRU" - -#PublicKeyShardId is the fallback cache used to map public keys to the shard they belong. -[PublicKeyShardId] - Name = "PublicKeyShardId" - Capacity = 30000 - Type = "LRU" - -#PublicKeyPIDSignature is the cache that is used to map a public key to a peerId-signature pair. -[PublicKeyPIDSignature] - Name = "PublicKeyPIDSignature" - Capacity = 3000 - Type = "LRU" - -#PeerIdShardId is the fallback cache used in network sharding to allow direct connection between peer id and shard. -# Used mainly for observers. -[PeerIdShardId] - Name = "PeerIdShardId" - Capacity = 30000 - Type = "LRU" - -[PeerHonesty] - Name = "PeerHonesty" - Capacity = 5000 - Type = "LRU" - -[VMOutputCacher] - Name = "VMOutputCacher" - Capacity = 10000 - Type = "LRU" - -[PeersRatingConfig] - TopRatedCacheCapacity = 5000 - BadRatedCacheCapacity = 5000 - -[PoolsCleanersConfig] - MaxRoundsToKeepUnprocessedMiniBlocks = 300 # max number of rounds unprocessed miniblocks are kept in pool - MaxRoundsToKeepUnprocessedTransactions = 300 # max number of rounds unprocessed transactions are kept in pool - -[TrieSyncStorage] - Capacity = 300000 - SizeInBytes = 104857600 #100MB - EnableDB = false - [TrieSyncStorage.DB] - FilePath = "TrieSyncStorageDB" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 45000 - MaxOpenFiles = 10 - UseTmpAsFilePath = true - -[Antiflood] - Enabled = true - NumConcurrentResolverJobs = 50 - NumConcurrentResolvingTrieNodesJobs = 3 - [Antiflood.FastReacting] - IntervalInSeconds = 1 - ReservedPercent = 20.0 - [Antiflood.FastReacting.PeerMaxInput] - BaseMessagesPerInterval = 140 - TotalSizePerInterval = 4194304 #4MB/s - [Antiflood.FastReacting.PeerMaxInput.IncreaseFactor] - Threshold = 10 #if consensus size will exceed this value, then - Factor = 1.0 #increase the base value with [factor*consensus size] - [Antiflood.FastReacting.BlackList] - ThresholdNumMessagesPerInterval = 1000 - ThresholdSizePerInterval = 8388608 #8MB/s - NumFloodingRounds = 10 - PeerBanDurationInSeconds = 300 - - [Antiflood.SlowReacting] - IntervalInSeconds = 30 - ReservedPercent = 20.0 - [Antiflood.SlowReacting.PeerMaxInput] - BaseMessagesPerInterval = 6000 - TotalSizePerInterval = 18874368 # 18MB/interval - [Antiflood.SlowReacting.PeerMaxInput.IncreaseFactor] - Threshold = 10 #if consensus size will exceed this value, then - Factor = 0.0 #increase the base value with [factor*consensus size] - [Antiflood.SlowReacting.BlackList] - ThresholdNumMessagesPerInterval = 10000 - ThresholdSizePerInterval = 37748736 # 36MB/interval - NumFloodingRounds = 2 - PeerBanDurationInSeconds = 3600 - - [Antiflood.OutOfSpecs] - IntervalInSeconds = 1 - ReservedPercent = 0.0 - [Antiflood.OutOfSpecs.PeerMaxInput] - BaseMessagesPerInterval = 2000 - TotalSizePerInterval = 10485760 # 10MB/interval - [Antiflood.OutOfSpecs.PeerMaxInput.IncreaseFactor] - Threshold = 0 #if consensus size will exceed this value, then - Factor = 0.0 #increase the base value with [factor*consensus size] - [Antiflood.OutOfSpecs.BlackList] - ThresholdNumMessagesPerInterval = 3600 - ThresholdSizePerInterval = 12582912 # 12MB/interval - NumFloodingRounds = 2 - PeerBanDurationInSeconds = 3600 - - [Antiflood.PeerMaxOutput] - BaseMessagesPerInterval = 75 - TotalSizePerInterval = 2097152 #2MB/s - - [Antiflood.Cache] - Name = "Antiflood" - Capacity = 7000 - Type = "LRU" - [Antiflood.Topic] - DefaultMaxMessagesPerSec = 15000 - MaxMessages = [{ Topic = "shardBlocks*", NumMessagesPerSec = 30 }, - { Topic = "metachainBlocks", NumMessagesPerSec = 30 }] - - [Antiflood.TxAccumulator] - # MaxAllowedTimeInMilliseconds is used as a time frame in which the node gathers transactions. - # After this period, collected transactions will be sent on the p2p topics - MaxAllowedTimeInMilliseconds = 250 - # MaxDeviationTimeInMilliseconds represents the time in miliseconds that will cause the effectual time frame be - # less than the specified max value. This is used to create desynchronizations between senders as to not - # clutter the network exactly in the same moment - MaxDeviationTimeInMilliseconds = 25 - -[WebServerAntiflood] - WebServerAntifloodEnabled = true - # SimultaneousRequests represents the number of concurrent requests accepted by the web server - # this is a global throttler that acts on all http connections regardless of the originating source - SimultaneousRequests = 100 - # SameSourceRequests defines how many requests are allowed from the same source in the specified - # time frame (SameSourceResetIntervalInSec) - SameSourceRequests = 10000 - # SameSourceResetIntervalInSec time frame between counter reset, in seconds - SameSourceResetIntervalInSec = 1 - # TrieOperationsDeadlineMilliseconds represents the maximum duration that an API call targeting a trie operation - # can take. - TrieOperationsDeadlineMilliseconds = 10000 - # GetAddressesBulkMaxSize represents the maximum number of addresses to be fetched in a bulk per API request. 0 means unlimited - GetAddressesBulkMaxSize = 100 - # VmQueryDelayAfterStartInSec represents the number of seconds to wait when starting node before accepting vm query requests - VmQueryDelayAfterStartInSec = 120 - # EndpointsThrottlers represents a map for maximum simultaneous go routines for an endpoint - EndpointsThrottlers = [{ Endpoint = "/transaction/:hash", MaxNumGoRoutines = 10 }, - { Endpoint = "/transaction/send", MaxNumGoRoutines = 2 }, - { Endpoint = "/transaction/simulate", MaxNumGoRoutines = 1 }, - { Endpoint = "/transaction/send-multiple", MaxNumGoRoutines = 2 }] - -[AddressPubkeyConverter] - Length = 32 - Type = "bech32" - SignatureLength = 64 - Hrp = "erd" - -[ValidatorPubkeyConverter] - Length = 96 - Type = "hex" - SignatureLength = 48 - -[Hasher] - Type = "blake2b" - -[MultisigHasher] - Type = "blake2b" - -[TxSignHasher] - Type = "keccak" - -# The main marshalizer, used in internodes communication -# Type identifies the marshalizer -# SizeCheckDelta the maximum allow drift between the input data buffer and -# the reencoded version (in percents). -# 0 disables the feature. -[Marshalizer] - Type = "gogo protobuf" - SizeCheckDelta = 10 - -# The marshalizer used for smartcontracts data exchange -[VmMarshalizer] - Type = "json" - -# The marshalizer used in transaction signing -[TxSignMarshalizer] - Type = "json" - -[EpochStartConfig] - GenesisEpoch = 0 - MinRoundsBetweenEpochs = 20 - RoundsPerEpoch = 200 - # Min and Max ShuffledOutRestartThreshold represents the minimum and maximum duration of an epoch (in percentage) after a node which - # has been shuffled out has to restart its process in order to start in a new shard - MinShuffledOutRestartThreshold = 0.05 - MaxShuffledOutRestartThreshold = 0.25 - - MinNumConnectedPeersToStart = 2 - MinNumOfPeersToConsiderBlockValid = 2 - ExtraDelayForRequestBlockInfoInMilliseconds = 3000 - -# ResourceStats, if enabled, will output in a folder called "stats" -# resource statistics. For example: number of active go routines, memory allocation, number of GC sweeps, etc. -# RefreshIntervalInSec will tell how often a new line containing stats should be added in stats file -[ResourceStats] - Enabled = true - RefreshIntervalInSec = 30 - -[ValidatorStatistics] - CacheRefreshIntervalInSec = 60 - -# Consensus type which will be used (the current implementation can manage "bn" and "bls") -# When consensus type is "bls" the multisig hasher type should be "blake2b" -[Consensus] - Type = "bls" - -[NTPConfig] - Hosts = ["time.google.com", "time.cloudflare.com", "time.apple.com"] - Port = 123 - TimeoutMilliseconds = 100 - SyncPeriodSeconds = 3600 - Version = 0 # Setting 0 means 'use default value' - -[StateTriesConfig] - SnapshotsEnabled = true - AccountsStatePruningEnabled = false - PeerStatePruningEnabled = true - MaxStateTrieLevelInMemory = 5 - MaxPeerTrieLevelInMemory = 5 - StateStatisticsEnabled = false - -[BlockSizeThrottleConfig] - MinSizeInBytes = 104857 # 104857 is 10% from 1MB - MaxSizeInBytes = 943718 # 943718 is 90% from 1MB - -[VirtualMachine] - [VirtualMachine.Execution] - TimeOutForSCExecutionInMilliseconds = 10000 # 10 seconds = 10000 milliseconds - WasmerSIGSEGVPassthrough = false # must be false for release - WasmVMVersions = [ - { StartEpoch = 0, Version = "v1.4" }, - { StartEpoch = 1, Version = "v1.5" }, # TODO: set also the RoundActivations.DisableAsyncCallV1 accordingly - ] - - [VirtualMachine.Querying] - NumConcurrentVMs = 1 - TimeOutForSCExecutionInMilliseconds = 10000 # 10 seconds = 10000 milliseconds - WasmerSIGSEGVPassthrough = false # must be false for release - WasmVMVersions = [ - { StartEpoch = 0, Version = "v1.4" }, - { StartEpoch = 1, Version = "v1.5" }, # TODO: set also the RoundActivations.DisableAsyncCallV1 accordingly - ] - - [VirtualMachine.GasConfig] - # The following values define the maximum amount of gas to be allocated for VM Queries coming from API - # If set to 0, then MaxUInt64 will be used - ShardMaxGasPerVmQuery = 1500000000 #1.5b - MetaMaxGasPerVmQuery = 0 #unlimited - -[BuiltInFunctions] - AutomaticCrawlerAddresses =[ - "erd1he8wwxn4az3j82p7wwqsdk794dm7hcrwny6f8dfegkfla34udx7qrf7xje", #shard 0 - "erd1fpkcgel4gcmh8zqqdt043yfcn5tyx8373kg6q2qmkxzu4dqamc0swts65c", #shard 1 - "erd1najnxxweyw6plhg8efql330nttrj6l5cf87wqsuym85s9ha0hmdqnqgenp", #shard 2 - ] - MaxNumAddressesInTransferRole = 100 - DNSV2Addresses =[ - "erd1qqqqqqqqqqqqqpgqr46jrxr6r2unaqh75ugd308dwx5vgnhwh47qtvepe3", - ] - -[Hardfork] - EnableTrigger = true - EnableTriggerFromP2P = true - PublicKeyToListenFrom = "153dae6cb3963260f309959bf285537b77ae16d82e9933147be7827f7394de8dc97d9d9af41e970bc72aecb44b77e819621081658c37f7000d21e2d0e8963df83233407bde9f46369ba4fcd03b57f40b80b06c191a428cfb5c447ec510e79307" - CloseAfterExportInMinutes = 10000 - AfterHardFork = false - ImportFolder = "export" - StartRound = 10000 - StartNonce = 10000 - StartEpoch = 100 - GenesisTime = 0 - ValidatorGracePeriodInEpochs = 1 #defines how long is the rating computation disabled after hardfork - [Hardfork.ExportStateStorageConfig] - [Hardfork.ExportStateStorageConfig.Cache] - Name = "HardFork.ExportStateStorageConfig" - Capacity = 5000 - Type = "LRU" - [Hardfork.ExportStateStorageConfig.DB] - FilePath = "ExportStateStorage/MainDB" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 1000 - MaxOpenFiles = 10 - [Hardfork.ExportKeysStorageConfig] - [Hardfork.ExportKeysStorageConfig.Cache] - Name = "HardFork.ExportKeysStorageConfig" - Capacity = 5000 - Type = "LRU" - [Hardfork.ExportKeysStorageConfig.DB] - FilePath = "ExportKeysStorageConfig/MainDB" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 1000 - MaxOpenFiles = 10 - [Hardfork.ExportTriesStorageConfig] - [Hardfork.ExportTriesStorageConfig.Cache] - Name = "HardFork.ExportTriesStorageConfig" - Capacity = 5000 - Type = "LRU" - [Hardfork.ExportTriesStorageConfig.DB] - FilePath = "ExportTrieStorage/MainTrie" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 1000 - MaxOpenFiles = 10 - [Hardfork.ImportStateStorageConfig] - [Hardfork.ImportStateStorageConfig.Cache] - Name = "HardFork.ImportStateStorageConfig" - Capacity = 5000 - Type = "LRU" - [Hardfork.ImportStateStorageConfig.DB] - FilePath = "ExportStateStorage/MainDB" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 1000 - MaxOpenFiles = 10 - [Hardfork.ImportKeysStorageConfig] - [Hardfork.ImportKeysStorageConfig.Cache] - Name = "HardFork.ImportKeysStorageConfig" - Capacity = 5000 - Type = "LRU" - [Hardfork.ImportKeysStorageConfig.DB] - FilePath = "ExportKeysStorageConfig/MainDB" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 1000 - MaxOpenFiles = 10 - -[Debug] - [Debug.InterceptorResolver] - Enabled = true - CacheSize = 10000 - EnablePrint = true - IntervalAutoPrintInSeconds = 20 - NumRequestsThreshold = 9 - NumResolveFailureThreshold = 3 - DebugLineExpiration = 10 #Will remove the debug line after a `DebugLineExpiration` number of prints - [Debug.Antiflood] - Enabled = true - CacheSize = 10000 - IntervalAutoPrintInSeconds = 20 - [Debug.ShuffleOut] - CallGCWhenShuffleOut = true - ExtraPrintsOnShuffleOut = true - DoProfileOnShuffleOut = true - [Debug.EpochStart] - GoRoutineAnalyserEnabled = true - ProcessDataTrieOnCommitEpoch = true - [Debug.Process] - Enabled = true - DebuggingLogLevel = "*:DEBUG,p2p:TRACE,debug:DEBUG,process:TRACE,intercept:TRACE" - GoRoutinesDump = true - PollingTimeInSeconds = 240 # 4 minutes - # setting this to 0 disables the automatic revert of the log level - RevertLogLevelTimeInSeconds = 600 # 10 minutes - -[Health] - IntervalVerifyMemoryInSeconds = 30 - IntervalDiagnoseComponentsInSeconds = 30 - IntervalDiagnoseComponentsDeeplyInSeconds = 120 - MemoryUsageToCreateProfiles = 3221225472 # 3 GB - NumMemoryUsageRecordsToKeep = 100 - FolderPath = "health-records" - -[SoftwareVersionConfig] - StableTagLocation = "https://api.github.com/repos/multiversx/mx-chain-go/releases/latest" - PollingIntervalInMinutes = 65 - -[GatewayMetricsConfig] - # TODO: set this to gateway URL based on testnet/devnet/mainnet env - URL = "" - -[LogsAndEvents] - SaveInStorageEnabled = false - [LogsAndEvents.TxLogsStorage.Cache] - Name = "TxLogsStorage" - Capacity = 1000 - Type = "SizeLRU" - SizeInBytes = 20971520 #20MB - [LogsAndEvents.TxLogsStorage.DB] - FilePath = "Logs" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 100 - MaxOpenFiles = 10 - -[DbLookupExtensions] - Enabled = false - DbLookupMaxActivePersisters = 10 - [DbLookupExtensions.MiniblocksMetadataStorageConfig.Cache] - Name = "DbLookupExtensions.MiniblocksMetadataStorage" - Capacity = 20000 - Type = "LRU" - [DbLookupExtensions.MiniblocksMetadataStorageConfig.DB] - FilePath = "DbLookupExtensions/MiniblocksMetadata" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 20000 - MaxOpenFiles = 10 - [DbLookupExtensions.MiniblockHashByTxHashStorageConfig.Cache] - Name = "DbLookupExtensions.MiniblockHashByTxHashStorage" - Capacity = 20000 - Type = "LRU" - [DbLookupExtensions.MiniblockHashByTxHashStorageConfig.DB] - FilePath = "DbLookupExtensions_MiniblockHashByTxHash" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 20000 - MaxOpenFiles = 10 - [DbLookupExtensions.EpochByHashStorageConfig.Cache] - Name = "DbLookupExtensions.EpochByHashStorage" - Capacity = 20000 - Type = "LRU" - [DbLookupExtensions.EpochByHashStorageConfig.DB] - FilePath = "DbLookupExtensions_EpochByHash" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 20000 - MaxOpenFiles = 10 - [DbLookupExtensions.ResultsHashesByTxHashStorageConfig.Cache] - Name = "DbLookupExtensions.ResultsHashesByTxHashStorage" - Capacity = 20000 - Type = "LRU" - [DbLookupExtensions.ResultsHashesByTxHashStorageConfig.DB] - FilePath = "DbLookupExtensions_ResultsHashesByTx" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 20000 - MaxOpenFiles = 10 - [DbLookupExtensions.ESDTSuppliesStorageConfig.Cache] - Name = "DbLookupExtensions.ESDTSuppliesStorage" - Capacity = 20000 - Type = "LRU" - [DbLookupExtensions.ESDTSuppliesStorageConfig.DB] - FilePath = "DbLookupExtensions_ESDTSupplies" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 20000 - MaxOpenFiles = 10 - [DbLookupExtensions.RoundHashStorageConfig.Cache] - Name = "DbLookupExtensions.RoundHashStorage" - Capacity = 20000 - Type = "LRU" - [DbLookupExtensions.RoundHashStorageConfig.DB] - FilePath = "DbLookupExtensions_RoundHash" - Type = "LvlDBSerial" - BatchDelaySeconds = 2 - MaxBatchSize = 20000 - MaxOpenFiles = 10 - -[Logs] - LogFileLifeSpanInMB = 1024 # 1GB - LogFileLifeSpanInSec = 86400 # 1 day - -[TrieSync] - NumConcurrentTrieSyncers = 200 - MaxHardCapForMissingNodes = 5000 - #available versions: 1, 2 and 3. 1 is the initial version, 2 is updated, more efficient version employing 2 lists - #the 3-rd one uses depth-first algorithm which keeps the memory consumption low - TrieSyncerVersion = 3 - CheckNodesOnDisk = false - -[Requesters] - NumCrossShardPeers = 2 - NumTotalPeers = 3 # NumCrossShardPeers + num intra shard - NumFullHistoryPeers = 3 - -[HeartbeatV2] - PeerAuthenticationTimeBetweenSendsInSec = 600 # 10min TODO: change this for mainnet/devnet/testnet - PeerAuthenticationTimeBetweenSendsWhenErrorInSec = 60 # 1min - PeerAuthenticationTimeThresholdBetweenSends = 0.1 # 10% # max random threshold between messages, representing a percent of PeerAuthenticationTimeBetweenSendsInSec - HeartbeatTimeBetweenSendsInSec = 60 # 1min - HeartbeatTimeBetweenSendsDuringBootstrapInSec = 60 # 1min - HeartbeatTimeBetweenSendsWhenErrorInSec = 60 # 1min - HeartbeatTimeThresholdBetweenSends = 0.1 # 10% # max random threshold between messages, representing a percent of HeartbeatTimeBetweenSendsInSec - HeartbeatExpiryTimespanInSec = 3600 # 1h # heartbeat message max age allowed - MinPeersThreshold = 0.8 # 80% # min threshold of peers to consider enough peer auths received - DelayBetweenPeerAuthenticationRequestsInSec = 5 # 5sec # delay between requests - PeerAuthenticationMaxTimeoutForRequestsInSec = 7200 # 2h # max timeout allowed to receive peer auth messages from peers - PeerShardTimeBetweenSendsInSec = 7200 # 2h - PeerShardTimeThresholdBetweenSends = 0.1 # 10% # max random threshold between messages, representing a percent of PeerShardTimeBetweenSendsInSec - MaxMissingKeysInRequest = 500 # max number of missing keys allowed in a request - MaxDurationPeerUnresponsiveInSec = 900 # 15min # max duration after which a peer is considered inactive - HideInactiveValidatorIntervalInSec = 3600 # 1h # time that an inactive validator is returned through api - HardforkTimeBetweenSendsInSec = 60 # 1min # time between hardfork messages - TimeBetweenConnectionsMetricsUpdateInSec = 30 # 30sec # time between consecutive connections metrics updates - TimeToReadDirectConnectionsInSec = 15 # 15sec # time between consecutive peer shard mapper updates with direct connections - PeerAuthenticationTimeBetweenChecksInSec = 6 # 6sec - [HeartbeatV2.HeartbeatPool] - Name = "HeartbeatPool" - Capacity = 50000 - Type = "SizeLRU" - SizeInBytes = 314572800 #300MB - -[Redundancy] - # MaxRoundsOfInactivityAccepted defines the number of rounds missed by a main or higher level backup machine before - # the current machine will take over and propose/sign blocks. Used in both single-key and multi-key modes. - MaxRoundsOfInactivityAccepted = 3 diff --git a/integrationTests/relayers/testdata/config/nodeConfig/economics.toml b/integrationTests/relayers/testdata/config/nodeConfig/economics.toml deleted file mode 100644 index f0bac97a..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/economics.toml +++ /dev/null @@ -1,50 +0,0 @@ -#Economics config of the node -[GlobalSettings] - GenesisTotalSupply = "20000000000000000000000000" #20MIL eGLD - MinimumInflation = 0.0 - YearSettings = [ - {Year = 1, MaximumInflation = 0.10845130}, - {Year = 2, MaximumInflation = 0.09703538}, - {Year = 3, MaximumInflation = 0.08561945}, - {Year = 4, MaximumInflation = 0.07420352}, - {Year = 5, MaximumInflation = 0.06278760}, - {Year = 6, MaximumInflation = 0.05137167}, - {Year = 7, MaximumInflation = 0.03995574}, - {Year = 8, MaximumInflation = 0.02853982}, - {Year = 9, MaximumInflation = 0.01712389}, - {Year = 10, MaximumInflation = 0.00570796}, - {Year = 11, MaximumInflation = 0.0}, - ] - Denomination = 18 # represents the smallest eGLD subdivision (10^-X eGLD for a denomination of X) - GenesisMintingSenderAddress = "erd17rc0pu8s7rc0pu8s7rc0pu8s7rc0pu8s7rc0pu8s7rc0pu8s7rcqqkhty3" - -[RewardsSettings] - [[RewardsSettings.RewardsConfigByEpoch]] - EpochEnable = 0 - LeaderPercentage = 0.1 #fraction of value 0.1 - 10% - DeveloperPercentage = 0.3 #fraction of value 0.3 - 30% - ProtocolSustainabilityPercentage = 0.1 #fraction of value 0.1 - 10% - ProtocolSustainabilityAddress = "erd1j25xk97yf820rgdp3mj5scavhjkn6tjyn0t63pmv5qyjj7wxlcfqqe2rw5" - TopUpGradientPoint = "3000000000000000000000000" # 3MIL eGLD (eligible topUp) - TopUpFactor = 0.25 # fraction of value 0.25 - 25% - - [[RewardsSettings.RewardsConfigByEpoch]] - EpochEnable = 1 - LeaderPercentage = 0.1 #fraction of value 0.1 - 10% - DeveloperPercentage = 0.3 #fraction of value 0.3 - 30% - ProtocolSustainabilityPercentage = 0.1 #fraction of value 0.1 - 10% - ProtocolSustainabilityAddress = "erd1j25xk97yf820rgdp3mj5scavhjkn6tjyn0t63pmv5qyjj7wxlcfqqe2rw5" - TopUpGradientPoint = "2000000000000000000000000" # 2MIL eGLD (eligible topUp) - TopUpFactor = 0.5 # fraction of value 0.5 - 50% - -[FeeSettings] - GasLimitSettings = [ - {EnableEpoch = 0, MaxGasLimitPerBlock = "1500000000", MaxGasLimitPerMiniBlock = "1500000000", MaxGasLimitPerMetaBlock = "15000000000", MaxGasLimitPerMetaMiniBlock = "15000000000", MaxGasLimitPerTx = "1500000000", MinGasLimit = "50000", ExtraGasLimitGuardedTx = "50000"}, - {EnableEpoch = 1, MaxGasLimitPerBlock = "1500000000", MaxGasLimitPerMiniBlock = "250000000", MaxGasLimitPerMetaBlock = "15000000000", MaxGasLimitPerMetaMiniBlock = "250000000", MaxGasLimitPerTx = "600000000", MinGasLimit = "50000", ExtraGasLimitGuardedTx = "50000"}, - {EnableEpoch = 2, MaxGasLimitPerBlock = "1500000000", MaxGasLimitPerMiniBlock = "250000000", MaxGasLimitPerMetaBlock = "15000000000", MaxGasLimitPerMetaMiniBlock = "250000000", MaxGasLimitPerTx = "600000000", MinGasLimit = "50000", ExtraGasLimitGuardedTx = "50000"}, - ] - MinGasPrice = "1000000000" #will yield min tx fee of 0.00005 eGLD - GasPriceModifier = 0.01 - GasPerDataByte = "1500" - DataLimitForBaseCalc = "10000" - MaxGasPriceSetGuardian = "2000000000" diff --git a/integrationTests/relayers/testdata/config/nodeConfig/enableEpochs.toml b/integrationTests/relayers/testdata/config/nodeConfig/enableEpochs.toml deleted file mode 100644 index 7c850955..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/enableEpochs.toml +++ /dev/null @@ -1,312 +0,0 @@ -[EnableEpochs] - # SCDeployEnableEpoch represents the epoch when the deployment of smart contracts will be enabled - SCDeployEnableEpoch = 1 - - # BuiltInFunctionsEnableEpoch represents the epoch when the built in functions will be enabled - BuiltInFunctionsEnableEpoch = 1 - - # RelayedTransactionsEnableEpoch represents the epoch when the relayed transactions will be enabled - RelayedTransactionsEnableEpoch = 1 - - # PenalizedTooMuchGasEnableEpoch represents the epoch when the penalization for using too much gas will be enabled - PenalizedTooMuchGasEnableEpoch = 0 - - # SwitchJailWaitingEnableEpoch represents the epoch when the system smart contract processing at end of epoch is enabled - SwitchJailWaitingEnableEpoch = 0 - - # BelowSignedThresholdEnableEpoch represents the epoch when the change for computing rating for validators below signed rating is enabled - BelowSignedThresholdEnableEpoch = 0 - - # SwitchHysteresisForMinNodesEnableEpoch represents the epoch when the system smart contract changes its config to consider - # also (minimum) hysteresis nodes for the minimum number of nodes - SwitchHysteresisForMinNodesEnableEpoch = 1 - - # TransactionSignedWithTxHashEnableEpoch represents the epoch when the node will also accept transactions that are - # signed with the hash of transaction - TransactionSignedWithTxHashEnableEpoch = 1 - - # MetaProtectionEnableEpoch represents the epoch when the transactions to the metachain are checked to have enough gas - MetaProtectionEnableEpoch = 1 - - # AheadOfTimeGasUsageEnableEpoch represents the epoch when the cost of smart contract prepare changes from compiler per byte to ahead of time prepare per byte - AheadOfTimeGasUsageEnableEpoch = 1 - - # GasPriceModifierEnableEpoch represents the epoch when the gas price modifier in fee computation is enabled - GasPriceModifierEnableEpoch = 1 - - # RepairCallbackEnableEpoch represents the epoch when the callback repair is activated for scrs - RepairCallbackEnableEpoch = 1 - - # BlockGasAndFeesReCheckEnableEpoch represents the epoch when gas and fees used in each created or processed block are re-checked - BlockGasAndFeesReCheckEnableEpoch = 1 - - # BalanceWaitingListsEnableEpoch represents the epoch when the shard waiting lists are balanced at the start of an epoch - BalanceWaitingListsEnableEpoch = 1 - - # ReturnDataToLastTransferEnableEpoch represents the epoch when returned data is added to last output transfer for callbacks - ReturnDataToLastTransferEnableEpoch = 1 - - # SenderInOutTransferEnableEpoch represents the epoch when the feature of having different senders in output transfer is enabled - SenderInOutTransferEnableEpoch = 1 - - # StakeEnableEpoch represents the epoch when staking is enabled - StakeEnableEpoch = 0 - - # StakingV2EnableEpoch represents the epoch when staking v2 is enabled - StakingV2EnableEpoch = 1 - - # DoubleKeyProtectionEnableEpoch represents the epoch when the double key protection will be enabled - DoubleKeyProtectionEnableEpoch = 1 - - # ESDTEnableEpoch represents the epoch when ESDT is enabled - ESDTEnableEpoch = 1 - - # GovernanceEnableEpoch represents the epoch when governance is enabled - GovernanceEnableEpoch = 1 - - # DelegationManagerEnableEpoch represents the epoch when the delegation manager is enabled - # epoch should not be 0 - DelegationManagerEnableEpoch = 1 - - # DelegationSmartContractEnableEpoch represents the epoch when delegation smart contract is enabled - # epoch should not be 0 - DelegationSmartContractEnableEpoch = 1 - - # CorrectLastUnjailedEnableEpoch represents the epoch when the fix regaring the last unjailed node should apply - CorrectLastUnjailedEnableEpoch = 1 - - # RelayedTransactionsV2EnableEpoch represents the epoch when the relayed transactions V2 will be enabled - RelayedTransactionsV2EnableEpoch = 1 - - # UnbondTokensV2EnableEpoch represents the epoch when the new implementation of the unbond tokens function is available - UnbondTokensV2EnableEpoch = 1 - - # SaveJailedAlwaysEnableEpoch represents the epoch when saving jailed status at end of epoch will happen in all cases - SaveJailedAlwaysEnableEpoch = 1 - - # ReDelegateBelowMinCheckEnableEpoch represents the epoch when the check for the re-delegated value will be enabled - ReDelegateBelowMinCheckEnableEpoch = 1 - - # ValidatorToDelegationEnableEpoch represents the epoch when the validator-to-delegation feature will be enabled - ValidatorToDelegationEnableEpoch = 1 - - # WaitingListFixEnableEpoch represents the epoch when the 6 epoch waiting list fix is enabled - WaitingListFixEnableEpoch = 1000000 - - # IncrementSCRNonceInMultiTransferEnableEpoch represents the epoch when the fix for preventing the generation of the same SCRs - # is enabled. The fix is done by adding an extra increment. - IncrementSCRNonceInMultiTransferEnableEpoch = 1 - - # ESDTMultiTransferEnableEpoch represents the epoch when esdt multitransfer built in function is enabled - ESDTMultiTransferEnableEpoch = 1 - - # GlobalMintBurnDisableEpoch represents the epoch when the global mint and burn functions are disabled - GlobalMintBurnDisableEpoch = 1 - - # ESDTTransferRoleEnableEpoch represents the epoch when esdt transfer role set is enabled - ESDTTransferRoleEnableEpoch = 1 - - # BuiltInFunctionOnMetaEnableEpoch represents the epoch when built in function processing on metachain is enabled - BuiltInFunctionOnMetaEnableEpoch = 1000000 - - # ComputeRewardCheckpointEnableEpoch represents the epoch when compute rewards checkpoint epoch is enabled - ComputeRewardCheckpointEnableEpoch = 1 - - # SCRSizeInvariantCheckEnableEpoch represents the epoch when the scr size invariant check is enabled - SCRSizeInvariantCheckEnableEpoch = 1 - - # BackwardCompSaveKeyValueEnableEpoch represents the epoch when the backward compatibility for save key value error is enabled - BackwardCompSaveKeyValueEnableEpoch = 1 - - # ESDTNFTCreateOnMultiShardEnableEpoch represents the epoch when esdt nft creation is enabled on multiple shards - ESDTNFTCreateOnMultiShardEnableEpoch = 1 - - # MetaESDTSetEnableEpoch represents the epoch when the backward compatibility for save key value error is enabled - MetaESDTSetEnableEpoch = 1 - - # AddTokensToDelegationEnableEpoch represents the epoch when adding tokens to delegation is enabled for whitelisted address - AddTokensToDelegationEnableEpoch = 1 - - # MultiESDTTransferFixOnCallBackOnEnableEpoch represents the epoch when multi esdt transfer on callback fix is enabled - MultiESDTTransferFixOnCallBackOnEnableEpoch = 1 - - # OptimizeGasUsedInCrossMiniBlocksEnableEpoch represents the epoch when gas used in cross shard mini blocks will be optimized - OptimizeGasUsedInCrossMiniBlocksEnableEpoch = 1 - - # CorrectFirstQueuedEpoch represents the epoch when the backward compatibility for setting the first queued node is enabled - CorrectFirstQueuedEpoch = 1 - - # DeleteDelegatorAfterClaimRewardsEnableEpoch represents the epoch when the delegators data is deleted for delegators that have to claim rewards after they withdraw all funds - DeleteDelegatorAfterClaimRewardsEnableEpoch = 1 - - # FixOOGReturnCodeEnableEpoch represents the epoch when the backward compatibility returning out of gas error is enabled - FixOOGReturnCodeEnableEpoch = 1 - - # RemoveNonUpdatedStorageEnableEpoch represents the epoch when the backward compatibility for removing non updated storage is enabled - RemoveNonUpdatedStorageEnableEpoch = 1 - - # OptimizeNFTStoreEnableEpoch represents the epoch when optimizations on NFT metadata store and send are enabled - OptimizeNFTStoreEnableEpoch = 1 - - # CreateNFTThroughExecByCallerEnableEpoch represents the epoch when nft creation through execution on destination by caller is enabled - CreateNFTThroughExecByCallerEnableEpoch = 1 - - # StopDecreasingValidatorRatingWhenStuckEnableEpoch represents the epoch when we should stop decreasing validator's rating if, for instance, a shard gets stuck - StopDecreasingValidatorRatingWhenStuckEnableEpoch = 1 - - # FrontRunningProtectionEnableEpoch represents the epoch when the first version of protection against front running is enabled - FrontRunningProtectionEnableEpoch = 1 - - # IsPayableBySCEnableEpoch represents the epoch when a new flag isPayable by SC is enabled - IsPayableBySCEnableEpoch = 1 - - # CleanUpInformativeSCRsEnableEpoch represents the epoch when the informative-only scrs are cleaned from miniblocks and logs are created from them - CleanUpInformativeSCRsEnableEpoch = 1 - - # StorageAPICostOptimizationEnableEpoch represents the epoch when new storage helper functions are enabled and cost is reduced in Wasm VM - StorageAPICostOptimizationEnableEpoch = 1 - - # TransformToMultiShardCreateEnableEpoch represents the epoch when the new function on esdt system sc is enabled to transfer create role into multishard - TransformToMultiShardCreateEnableEpoch = 1 - - # ESDTRegisterAndSetAllRolesEnableEpoch represents the epoch when new function to register tickerID and set all roles is enabled - ESDTRegisterAndSetAllRolesEnableEpoch = 1 - - # ScheduledMiniBlocksEnableEpoch represents the epoch when scheduled mini blocks would be created if needed - ScheduledMiniBlocksEnableEpoch = 1 - - # CorrectJailedNotUnstakedEpoch represents the epoch when the jailed validators will also be unstaked if the queue is empty - CorrectJailedNotUnstakedEmptyQueueEpoch = 1 - - # DoNotReturnOldBlockInBlockchainHookEnableEpoch represents the epoch when the fetch old block operation is - # disabled in the blockchain hook component - DoNotReturnOldBlockInBlockchainHookEnableEpoch = 1 - - # AddFailedRelayedTxToInvalidMBsDisableEpoch represents the epoch when adding the failed relayed txs to invalid miniblocks is disabled - AddFailedRelayedTxToInvalidMBsDisableEpoch = 1 - - # SCRSizeInvariantOnBuiltInResultEnableEpoch represents the epoch when scr size invariant on built in result is enabled - SCRSizeInvariantOnBuiltInResultEnableEpoch = 1 - - # CheckCorrectTokenIDForTransferRoleEnableEpoch represents the epoch when the correct token ID check is applied for transfer role verification - CheckCorrectTokenIDForTransferRoleEnableEpoch = 1 - - # DisableExecByCallerEnableEpoch represents the epoch when the check on value is disabled on exec by caller - DisableExecByCallerEnableEpoch = 1 - - # RefactorContextEnableEpoch represents the epoch when refactoring/simplifying is enabled in contexts - RefactorContextEnableEpoch = 1 - - # FailExecutionOnEveryAPIErrorEnableEpoch represent the epoch when new protection in VM is enabled to fail all wrong API calls - FailExecutionOnEveryAPIErrorEnableEpoch = 1 - - # ManagedCryptoAPIsEnableEpoch represents the epoch when new managed crypto APIs are enabled in the wasm VM - ManagedCryptoAPIsEnableEpoch = 1 - - # CheckFunctionArgumentEnableEpoch represents the epoch when the extra argument check is enabled in vm-common - CheckFunctionArgumentEnableEpoch = 1 - - # CheckExecuteOnReadOnlyEnableEpoch represents the epoch when the extra checks are enabled for execution on read only - CheckExecuteOnReadOnlyEnableEpoch = 1 - - # ESDTMetadataContinuousCleanupEnableEpoch represents the epoch when esdt metadata is automatically deleted according to inshard liquidity - ESDTMetadataContinuousCleanupEnableEpoch = 1 - - # MiniBlockPartialExecutionEnableEpoch represents the epoch when mini block partial execution will be enabled - MiniBlockPartialExecutionEnableEpoch = 1 - - # FixAsyncCallBackArgsListEnableEpoch represents the epoch when the async callback arguments lists fix will be enabled - FixAsyncCallBackArgsListEnableEpoch = 1 - - # FixOldTokenLiquidityEnableEpoch represents the epoch when the fix for old token liquidity is enabled - FixOldTokenLiquidityEnableEpoch = 1 - - # RuntimeMemStoreLimitEnableEpoch represents the epoch when the condition for Runtime MemStore is enabled - RuntimeMemStoreLimitEnableEpoch = 1 - - # SetSenderInEeiOutputTransferEnableEpoch represents the epoch when setting the sender in eei output transfers will be enabled - SetSenderInEeiOutputTransferEnableEpoch = 1 - - # RefactorPeersMiniBlocksEnableEpoch represents the epoch when refactor of the peers mini blocks will be enabled - RefactorPeersMiniBlocksEnableEpoch = 1 - - # MaxBlockchainHookCountersEnableEpoch represents the epoch when the max blockchainhook counters are enabled - MaxBlockchainHookCountersEnableEpoch = 1 - - # WipeSingleNFTLiquidityDecreaseEnableEpoch represents the epoch when the system account liquidity is decreased for wipeSingleNFT as well - WipeSingleNFTLiquidityDecreaseEnableEpoch = 1 - - # AlwaysSaveTokenMetaDataEnableEpoch represents the epoch when the token metadata is always saved - AlwaysSaveTokenMetaDataEnableEpoch = 1 - - # RuntimeCodeSizeFixEnableEpoch represents the epoch when the code size fix in the VM is enabled - RuntimeCodeSizeFixEnableEpoch = 1 - - # RelayedNonceFixEnableEpoch represents the epoch when the nonce fix for relayed txs is enabled - RelayedNonceFixEnableEpoch = 1 - - # SetGuardianEnableEpoch represents the epoch when the guard account feature is enabled in the protocol - SetGuardianEnableEpoch = 1 - - # DeterministicSortOnValidatorsInfoEnableEpoch represents the epoch when the deterministic sorting on validators info is enabled - DeterministicSortOnValidatorsInfoEnableEpoch = 1 - - # SCProcessorV2EnableEpoch represents the epoch when SC processor V2 will be used - SCProcessorV2EnableEpoch = 1 - - # AutoBalanceDataTriesEnableEpoch represents the epoch when the data tries are automatically balanced by inserting at the hashed key instead of the normal key - AutoBalanceDataTriesEnableEpoch = 1 - - # MigrateDataTrieEnableEpoch represents the epoch when the data tries migration is enabled - MigrateDataTrieEnableEpoch = 1 - - # KeepExecOrderOnCreatedSCRsEnableEpoch represents the epoch when the execution order of created SCRs is ensured - KeepExecOrderOnCreatedSCRsEnableEpoch = 1 - - # MultiClaimOnDelegationEnableEpoch represents the epoch when the multi claim on delegation is enabled - MultiClaimOnDelegationEnableEpoch = 1 - - # ChangeUsernameEnableEpoch represents the epoch when changing username is enabled - ChangeUsernameEnableEpoch = 4 - - # ConsistentTokensValuesLengthCheckEnableEpoch represents the epoch when the consistent tokens values length check is enabled - ConsistentTokensValuesLengthCheckEnableEpoch = 1 - - # FixDelegationChangeOwnerOnAccountEnableEpoch represents the epoch when the fix for the delegation system smart contract is enabled - FixDelegationChangeOwnerOnAccountEnableEpoch = 1 - - # DynamicGasCostForDataTrieStorageLoadEnableEpoch represents the epoch when dynamic gas cost for data trie storage load will be enabled - DynamicGasCostForDataTrieStorageLoadEnableEpoch = 1 - - # ScToScLogEventEnableEpoch represents the epoch when the sc to sc log event feature is enabled - ScToScLogEventEnableEpoch = 1 - - # NFTStopCreateEnableEpoch represents the epoch when NFT stop create feature is enabled - NFTStopCreateEnableEpoch = 1 - - # ChangeOwnerAddressCrossShardThroughSCEnableEpoch represents the epoch when the change owner address built in function will work also through a smart contract call cross shard - ChangeOwnerAddressCrossShardThroughSCEnableEpoch = 1 - - # FixGasRemainingForSaveKeyValueBuiltinFunctionEnableEpoch represents the epoch when the fix for the remaining gas in the SaveKeyValue builtin function is enabled - FixGasRemainingForSaveKeyValueBuiltinFunctionEnableEpoch = 1 - - # CurrentRandomnessOnSortingEnableEpoch represents the epoch when the current randomness on sorting is enabled - CurrentRandomnessOnSortingEnableEpoch = 4 - - # BLSMultiSignerEnableEpoch represents the activation epoch for different types of BLS multi-signers - BLSMultiSignerEnableEpoch = [ - { EnableEpoch = 0, Type = "no-KOSK" }, - { EnableEpoch = 1, Type = "KOSK" } - ] - - # MaxNodesChangeEnableEpoch holds configuration for changing the maximum number of nodes and the enabling epoch - MaxNodesChangeEnableEpoch = [ - { EpochEnable = 0, MaxNumNodes = 48, NodesToShufflePerShard = 4 }, # 4 shuffled out keys / shard will not be reached normally - { EpochEnable = 1, MaxNumNodes = 64, NodesToShufflePerShard = 2 } - ] - -[GasSchedule] - # GasScheduleByEpochs holds the configuration for the gas schedule that will be applied from specific epochs - GasScheduleByEpochs = [ - { StartEpoch = 0, FileName = "gasScheduleV7.toml" }, - ] diff --git a/integrationTests/relayers/testdata/config/nodeConfig/enableRounds.toml b/integrationTests/relayers/testdata/config/nodeConfig/enableRounds.toml deleted file mode 100644 index d7be75bb..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/enableRounds.toml +++ /dev/null @@ -1,13 +0,0 @@ -# All activation rounds need to be declared as strings containing valid uint64 numbers. All values will be checked in the -# enableRoundsHandler for correctness. The toml parser library can not correctly parse uint64, currently. - -# Each activation round definition contains an optional slice of strings. These are useful, for example, when we have -# some exceptions to process in a different manner at a special round (say a block, a transaction, a smart contract result and such) - -# The Options field for each activation round can have some custom array of strings (for using them in exceptions or other use cases) -# Example: Options = ["test string1", "test string 2"] - -[RoundActivations] - [RoundActivations.DisableAsyncCallV1] - Options = [] - Round = "100" diff --git a/integrationTests/relayers/testdata/config/nodeConfig/external.toml b/integrationTests/relayers/testdata/config/nodeConfig/external.toml deleted file mode 100644 index 1058e0c3..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/external.toml +++ /dev/null @@ -1,77 +0,0 @@ -# ElasticSearchConnector defines settings related to ElasticSearch such as login information or URL -[ElasticSearchConnector] - ## We do not recommend to activate this indexer on a validator node since - #the node might loose rating (even facing penalties) due to the fact that - #the indexer is called synchronously and might block due to external causes. - #Strongly suggested to activate this on a regular observer node. - Enabled = false - IndexerCacheSize = 0 - BulkRequestMaxSizeInBytes = 4194304 # 4MB - URL = "http://localhost:9200" - UseKibana = false - Username = "" - Password = "" - # EnabledIndexes represents a slice of indexes that will be enabled for indexing. Full list is: - # ["rating", "transactions", "blocks", "validators", "miniblocks", "rounds", "accounts", "accountshistory", "receipts", "scresults", "accountsesdt", "accountsesdthistory", "epochinfo", "scdeploys", "tokens", "tags", "logs", "delegators", "operations", "esdts"] - EnabledIndexes = ["rating", "transactions", "blocks", "validators", "miniblocks", "rounds", "accounts", "accountshistory", "receipts", "scresults", "accountsesdt", "accountsesdthistory", "epochinfo", "scdeploys", "tokens", "tags", "logs", "delegators", "operations", "esdts"] - -# EventNotifierConnector defines settings needed to configure and launch the event notifier component -# HTTP event notifier connector integration will be DEPRECATED in the following iterations -[EventNotifierConnector] - # Enabled will turn on or off the event notifier connector - Enabled = false - - # UseAuthorization signals the proxy to use authorization - # Never run a production setup without authorization - UseAuthorization = false - - # ProxyUrl is used to communicate with the subscriptions hub - # The indexer instance will broadcast data using ProxyUrl - ProxyUrl = "http://localhost:5000" - - # Username and Password need to be specified if UseAuthorization is set to true - Username = "" - - # Password is used to authorize an observer to push event data - Password = "" - - # RequestTimeoutSec defines the timeout in seconds for the http client - RequestTimeoutSec = 60 - - # MarshallerType is used to define the marshaller type to be used for inner - # marshalled structures in block events data - MarshallerType = "json" - -[[HostDriversConfig]] - # This flag shall only be used for observer nodes - Enabled = false - - # This flag will start the WebSocket connector as server or client (can be "client" or "server") - Mode = "client" - - # URL for the WebSocket client/server connection - # This value represents the IP address and port number that the WebSocket client or server will use to establish a connection. - URL = "127.0.0.1:22111" - - # After a message will be sent it will wait for an ack message if this flag is enabled - WithAcknowledge = true - - # The duration in seconds to wait for an acknowledgment message, after this time passes an error will be returned - AcknowledgeTimeoutInSec = 60 - - # This flag defines the marshaller type. Currently supported: "json", "gogo protobuf" - MarshallerType = "json" - - # The number of seconds when the client will try again to send the data - RetryDurationInSec = 5 - - # Sets if, in case of data payload processing error, we should block or not the advancement to the next processing event. Set this to true if you wish the node to stop processing blocks if the client/server encounters errors while processing requests. - BlockingAckOnError = true - - # Set to true to drop messages if there is no active WebSocket connection to send to. - DropMessagesIfNoConnection = false - - # Defines the payload version. Version will be changed when there are breaking - # changes on payload data. The receiver/consumer will have to know how to handle different - # versions. The version will be sent as metadata in the websocket message. - Version = 1 diff --git a/integrationTests/relayers/testdata/config/nodeConfig/fullArchiveP2P.toml b/integrationTests/relayers/testdata/config/nodeConfig/fullArchiveP2P.toml deleted file mode 100644 index 6e9010a4..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/fullArchiveP2P.toml +++ /dev/null @@ -1,87 +0,0 @@ -# FullArchiveP2P config file - -# NodeConfig holds the P2P settings -[Node] - # Port is the port that will be opened by the node on all interfaces so other peers can connect to it - # If the port = 0, the node will search for a free port on the machine and use it - Port = "37373-38383" - - # ThresholdMinConnectedPeers represents the minimum number of connections a node should have before it can start - # the sync and consensus mechanisms - ThresholdMinConnectedPeers = 3 - - # MinNumPeersToWaitForOnBootstrap is the minimum number of peers to wait on bootstrap or the node will wait the default - # time which is now set to ~20 seconds (the const defined in the common package named TimeToWaitForP2PBootstrap) - MinNumPeersToWaitForOnBootstrap = 10 - - # available transports. All defined addresses contains a single '%d' markup that is mandatory and will - # be replaced at runtime with the actual port value - [Node.Transports] - QUICAddress = "" # optional QUIC address. If this transport should be activated, should be in this format: /ip4/0.0.0.0/udp/%d/quic-v1 - WebSocketAddress = "" # optional WebSocket address. If this transport should be activated, should be in this format: /ip4/0.0.0.0/tcp/%d/ws - WebTransportAddress = "" # optional WebTransport address. If this transport should be activated, should be in this format: /ip4/0.0.0.0/udp/%d/quic-v1/webtransport - [Node.Transports.TCP] - ListenAddress = "/ip4/0.0.0.0/tcp/%d" # TCP listen address - PreventPortReuse = false - - [Node.ResourceLimiter] - Type = "default autoscale" #available options "default autoscale", "infinite", "default with manual scale". - ManualSystemMemoryInMB = 0 # not taken into account if the type is not "default with manual scale" - ManualMaximumFD = 0 # not taken into account if the type is not "default with manual scale" - -# P2P peer discovery section - -# The following sections correspond to the way new peers will be discovered -# If all config types are disabled then the peer will run in single mode (will not try to find other peers) -# If more than one peer discovery mechanism is enabled, the application will output an error and will not start - -[KadDhtPeerDiscovery] - # Enabled: true/false to enable/disable this discovery mechanism - Enabled = true - - # Type represents the kad-dht glue code implementation. - # "legacy" will define the first implementation. - # "optimized" represents the new variant able to connect to multiple seeders at once. This implementation also has - # a built-in timer that will try to automatically reconnect to the seeders (in case the seeders recover after a - # premature shutdown) - Type = "optimized" - - # RefreshIntervalInSec represents the time in seconds between querying for new peers - RefreshIntervalInSec = 10 - - # ProtocolID represents the protocol that this node will advertize to other peers - # To connect to other nodes, those nodes should have the same ProtocolID string - ProtocolID = "/erd/kad/1.0.0" - - # InitialPeerList represents the list of strings of some known nodes that will bootstrap this node - # The address will be in a self-describing addressing format. - # More can be found here: https://github.com/libp2p/specs/blob/master/3-requirements.md#34-transport-agnostic - # Example: - # /ip6/fe80::8823:6dff:fee7:f172/tcp/4001/p2p/QmYJyUMAcXEw1b5bFfbBbzYu5wyyjLMRHXGUkCXpag74Fu - # /ip4/162.246.145.218/udp/4001/utp/ipfs/QmYJyUMAcXEw1b5bFfbBbzYu5wyyjLMRHXGUkCXpag74Fu - # - # If the initial peers list is left empty, the node will not try to connect to other peers during initial bootstrap - # phase but will accept connections and will do the network discovery if another peer connects to it - InitialPeerList = ["/ip4/127.0.0.1/tcp/9999/p2p/16Uiu2HAkw5SNNtSvH1zJiQ6Gc3WoGNSxiyNueRKe6fuAuh57G3Bk"] - - # kademlia's routing table bucket size - BucketSize = 100 - - # RoutingTableRefreshIntervalInSec defines how many seconds should pass between 2 kad routing table auto refresh calls - RoutingTableRefreshIntervalInSec = 300 - -[Sharding] - # The targeted number of peer connections - TargetPeerCount = 41 - MaxIntraShardValidators = 7 - MaxCrossShardValidators = 15 - MaxIntraShardObservers = 7 - MaxCrossShardObservers = 3 - MaxSeeders = 2 - - # available options: - # `ListsSharder` will split the peers based on the shard membership (intra, cross or unknown) - # `OneListSharder` will do just the connection triming (upto TargetPeerCount value) not taking into account - # the shard membership of the connected peers - # `NilListSharder` will disable conection trimming (sharder is off) - Type = "ListsSharder" diff --git a/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV1.toml b/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV1.toml deleted file mode 100644 index 52175a22..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV1.toml +++ /dev/null @@ -1,827 +0,0 @@ -[BuiltInCost] - ChangeOwnerAddress = 5000000 - ClaimDeveloperRewards = 5000000 - SaveUserName = 5000000 - SaveKeyValue = 250000 - ESDTTransfer = 250000 - ESDTBurn = 250000 - ESDTLocalMint = 250000 - ESDTLocalBurn = 250000 - ESDTNFTCreate = 500000 - ESDTNFTAddQuantity = 500000 - ESDTNFTBurn = 500000 - ESDTNFTTransfer = 500000 - ESDTNFTChangeCreateOwner = 1000000 - ESDTNFTAddUri = 500000 - ESDTNFTUpdateAttributes = 500000 - ESDTNFTMultiTransfer = 1000000 - SetGuardian = 250000 - GuardAccount = 250000 - UnGuardAccount = 250000 - TrieLoadPerNode = 100000 - TrieStorePerNode = 50000 - -[MetaChainSystemSCsCost] - Stake = 5000000 - UnStake = 5000000 - UnBond = 5000000 - Claim = 5000000 - Get = 5000000 - ChangeRewardAddress = 5000000 - ChangeValidatorKeys = 5000000 - UnJail = 5000000 - ESDTIssue = 50000000 - ESDTOperations = 50000000 - Proposal = 5000000 - Vote = 500000 - DelegateVote = 1000000 - RevokeVote = 500000 - CloseProposal = 1000000 - DelegationOps = 1000000 - UnstakeTokens = 5000000 - UnbondTokens = 5000000 - DelegationMgrOps = 50000000 - GetActiveFund = 50000 - ValidatorToDelegation = 500000000 - GetAllNodeStates = 100000000 - FixWaitingListSize = 500000000 - -[BaseOperationCost] - StorePerByte = 50000 - ReleasePerByte = 10000 - DataCopyPerByte = 1000 - PersistPerByte = 10000 - CompilePerByte = 300 - AoTPreparePerByte = 50 - GetCode = 100000 - -[BaseOpsAPICost] - GetSCAddress = 100 - GetOwnerAddress = 100 - IsSmartContract = 100 - GetShardOfAddress = 100 - GetExternalBalance = 7000 - GetBlockHash = 1000 - TransferValue = 150000 - GetArgument = 100 - GetFunction = 100 - GetNumArguments = 100 - StorageStore = 250000 - StorageLoad = 100000 - CachedStorageLoad = 100000 - GetCaller = 100 - GetCallValue = 100 - Log = 3750 - Finish = 1 - SignalError = 1 - GetBlockTimeStamp = 1000 - GetGasLeft = 100 - Int64GetArgument = 100 - Int64StorageStore = 250000 - Int64StorageLoad = 100000 - Int64Finish = 100 - GetStateRootHash = 1000 - GetBlockNonce = 1000 - GetBlockEpoch = 1000 - GetBlockRound = 1000 - GetBlockRandomSeed = 1000 - ExecuteOnSameContext = 160000 - ExecuteOnDestContext = 160000 - DelegateExecution = 160000 - AsyncCallStep = 200000 - AsyncCallbackGasLock = 20000000 - ExecuteReadOnly = 160000 - CreateContract = 300000 - GetReturnData = 100 - GetNumReturnData = 100 - GetReturnDataSize = 100 - CleanReturnData = 100 - DeleteFromReturnData = 100 - GetOriginalTxHash = 10000 - GetPrevTxHash = 10000 - GetCurrentTxHash = 10000 - CreateAsyncCall = 200000 - SetAsyncCallback = 100000 - SetAsyncGroupCallback = 100000 - SetAsyncContextCallback = 100000 - GetCallbackClosure = 10000 - GetCodeMetadata = 10000 - IsBuiltinFunction = 10000 - -[EthAPICost] - UseGas = 100 - GetAddress = 100 - GetExternalBalance = 7000 - GetBlockHash = 1000 - Call = 160000 - CallDataCopy = 200 - GetCallDataSize = 100 - CallCode = 160000 - CallDelegate = 160000 - CallStatic = 160000 - StorageStore = 250000 - StorageLoad = 100000 - GetCaller = 100 - GetCallValue = 100 - CodeCopy = 1000 - GetCodeSize = 100 - GetBlockCoinbase = 100 - Create = 320000 - GetBlockDifficulty = 100 - ExternalCodeCopy = 3000 - GetExternalCodeSize = 2500 - GetGasLeft = 100 - GetBlockGasLimit = 100 - GetTxGasPrice = 100 - Log = 3750 - GetBlockNumber = 1000 - GetTxOrigin = 100 - Finish = 1 - Revert = 1 - GetReturnDataSize = 200 - ReturnDataCopy = 500 - SelfDestruct = 500000 - GetBlockTimeStamp = 1000 - -[BigIntAPICost] - BigIntNew = 100 - BigIntByteLength = 100 - BigIntUnsignedByteLength = 100 - BigIntSignedByteLength = 100 - BigIntGetBytes = 100 - BigIntGetUnsignedBytes = 100 - BigIntGetSignedBytes = 100 - BigIntSetBytes = 100 - BigIntSetUnsignedBytes = 100 - BigIntSetSignedBytes = 100 - BigIntIsInt64 = 100 - BigIntGetInt64 = 100 - BigIntSetInt64 = 100 - BigIntAdd = 100 - BigIntSub = 100 - BigIntMul = 600 - BigIntSqrt = 6000 - BigIntPow = 6000 - BigIntLog = 6000 - BigIntTDiv = 100 - BigIntTMod = 100 - BigIntEDiv = 100 - BigIntEMod = 100 - BigIntAbs = 100 - BigIntNeg = 100 - BigIntSign = 100 - BigIntCmp = 100 - BigIntNot = 100 - BigIntAnd = 100 - BigIntOr = 100 - BigIntXor = 100 - BigIntShr = 100 - BigIntShl = 100 - BigIntFinishUnsigned = 100 - BigIntFinishSigned = 100 - BigIntStorageLoadUnsigned = 100000 - BigIntStorageStoreUnsigned = 250000 - BigIntGetArgument = 100 - BigIntGetUnsignedArgument = 100 - BigIntGetSignedArgument = 100 - BigIntGetCallValue = 100 - BigIntGetExternalBalance = 500 - CopyPerByteForTooBig = 1000 - -[CryptoAPICost] - SHA256 = 600 - Keccak256 = 600 - Ripemd160 = 600 - VerifyBLS = 1000 - VerifyEd25519 = 1000 - VerifySecp256k1 = 1000 - EllipticCurveNew = 10000 - AddECC = 75000 - DoubleECC = 65000 - IsOnCurveECC = 10000 - ScalarMultECC = 400000 - MarshalECC = 13000 - MarshalCompressedECC = 15000 - UnmarshalECC = 20000 - UnmarshalCompressedECC = 270000 - GenerateKeyECC = 7000000 - EncodeDERSig = 10000000 - -[ManagedBufferAPICost] - MBufferNew = 2000 - MBufferNewFromBytes = 4000 - MBufferSetBytes = 2000 - MBufferGetLength = 2000 - MBufferGetBytes = 2000 - MBufferGetByteSlice = 2000 - MBufferCopyByteSlice = 2000 - MBufferAppend = 2000 - MBufferAppendBytes = 2000 - MBufferToBigIntUnsigned = 4000 - MBufferToBigIntSigned = 10000 - MBufferFromBigIntUnsigned = 4000 - MBufferFromBigIntSigned = 10000 - MBufferStorageStore = 250000 - MBufferStorageLoad = 100000 - MBufferGetArgument = 1000 - MBufferFinish = 1000 - MBufferSetRandom = 6000 - MBufferToBigFloat = 2000 - MBufferFromBigFloat = 2000 - -[BigFloatAPICost] - BigFloatNewFromParts = 3000 - BigFloatAdd = 7000 - BigFloatSub = 7000 - BigFloatMul = 7000 - BigFloatDiv = 7000 - BigFloatTruncate = 5000 - BigFloatNeg = 5000 - BigFloatClone = 5000 - BigFloatCmp = 4000 - BigFloatAbs = 5000 - BigFloatSqrt = 7000 - BigFloatPow = 10000 - BigFloatFloor = 5000 - BigFloatCeil = 5000 - BigFloatIsInt = 3000 - BigFloatSetBigInt = 3000 - BigFloatSetInt64 = 1000 - BigFloatGetConst = 1000 - -[WASMOpcodeCost] - Unreachable = 1 - Nop = 1 - Block = 1 - Loop = 1 - If = 1 - Else = 2 - End = 2 - Br = 2 - BrIf = 3 - BrTable = 2 - Return = 3 - Call = 3 - CallIndirect = 3 - Drop = 3 - Select = 3 - TypedSelect = 3 - LocalGet = 3 - LocalSet = 3 - LocalTee = 3 - GlobalGet = 3 - GlobalSet = 3 - I32Load = 3 - I64Load = 3 - F32Load = 6 - F64Load = 6 - I32Load8S = 3 - I32Load8U = 3 - I32Load16S = 3 - I32Load16U = 3 - I64Load8S = 3 - I64Load8U = 3 - I64Load16S = 3 - I64Load16U = 3 - I64Load32S = 3 - I64Load32U = 3 - I32Store = 3 - I64Store = 3 - F32Store = 12 - F64Store = 12 - I32Store8 = 3 - I32Store16 = 3 - I64Store8 = 3 - I64Store16 = 3 - I64Store32 = 3 - MemorySize = 5 - MemoryGrow = 5 - I32Const = 1 - I64Const = 1 - F32Const = 1 - F64Const = 1 - RefNull = 1 - RefIsNull = 1 - RefFunc = 1 - I32Eqz = 1 - I32Eq = 1 - I32Ne = 1 - I32LtS = 1 - I32LtU = 1 - I32GtS = 1 - I32GtU = 1 - I32LeS = 1 - I32LeU = 1 - I32GeS = 1 - I32GeU = 1 - I64Eqz = 1 - I64Eq = 1 - I64Ne = 1 - I64LtS = 1 - I64LtU = 1 - I64GtS = 1 - I64GtU = 1 - I64LeS = 1 - I64LeU = 1 - I64GeS = 1 - I64GeU = 1 - F32Eq = 6 - F32Ne = 6 - F32Lt = 6 - F32Gt = 6 - F32Le = 6 - F32Ge = 6 - F64Eq = 6 - F64Ne = 6 - F64Lt = 6 - F64Gt = 6 - F64Le = 6 - F64Ge = 6 - I32Clz = 100 - I32Ctz = 100 - I32Popcnt = 100 - I32Add = 1 - I32Sub = 1 - I32Mul = 3 - I32DivS = 18 - I32DivU = 18 - I32RemS = 18 - I32RemU = 18 - I32And = 1 - I32Or = 1 - I32Xor = 1 - I32Shl = 3 - I32ShrS = 3 - I32ShrU = 3 - I32Rotl = 5 - I32Rotr = 5 - I64Clz = 100 - I64Ctz = 100 - I64Popcnt = 100 - I64Add = 1 - I64Sub = 1 - I64Mul = 3 - I64DivS = 18 - I64DivU = 18 - I64RemS = 18 - I64RemU = 18 - I64And = 1 - I64Or = 1 - I64Xor = 1 - I64Shl = 3 - I64ShrS = 3 - I64ShrU = 3 - I64Rotl = 5 - I64Rotr = 5 - F32Abs = 5 - F32Neg = 5 - F32Ceil = 100 - F32Floor = 100 - F32Trunc = 100 - F32Nearest = 100 - F32Sqrt = 100 - F32Add = 5 - F32Sub = 5 - F32Mul = 15 - F32Div = 100 - F32Min = 15 - F32Max = 15 - F32Copysign = 5 - F64Abs = 5 - F64Neg = 5 - F64Ceil = 100 - F64Floor = 100 - F64Trunc = 100 - F64Nearest = 100 - F64Sqrt = 100 - F64Add = 5 - F64Sub = 5 - F64Mul = 15 - F64Div = 100 - F64Min = 15 - F64Max = 15 - F64Copysign = 5 - I32WrapI64 = 9 - I32TruncF32S = 100 - I32TruncF32U = 100 - I32TruncF64S = 100 - I32TruncF64U = 100 - I64ExtendI32S = 9 - I64ExtendI32U = 9 - I64TruncF32S = 100 - I64TruncF32U = 100 - I64TruncF64S = 100 - I64TruncF64U = 100 - F32ConvertI32S = 100 - F32ConvertI32U = 100 - F32ConvertI64S = 100 - F32ConvertI64U = 100 - F32DemoteF64 = 100 - F64ConvertI32S = 100 - F64ConvertI32U = 100 - F64ConvertI64S = 100 - F64ConvertI64U = 100 - F64PromoteF32 = 100 - I32ReinterpretF32 = 100 - I64ReinterpretF64 = 100 - F32ReinterpretI32 = 100 - F64ReinterpretI64 = 100 - I32Extend8S = 9 - I32Extend16S = 9 - I64Extend8S = 9 - I64Extend16S = 9 - I64Extend32S = 9 - I32TruncSatF32S = 100 - I32TruncSatF32U = 100 - I32TruncSatF64S = 100 - I32TruncSatF64U = 100 - I64TruncSatF32S = 100 - I64TruncSatF32U = 100 - I64TruncSatF64S = 100 - I64TruncSatF64U = 100 - MemoryInit = 5 - DataDrop = 5 - MemoryCopy = 5 - MemoryFill = 5 - TableInit = 10 - ElemDrop = 10 - TableCopy = 10 - TableFill = 10 - TableGet = 10 - TableSet = 10 - TableGrow = 10 - TableSize = 10 - AtomicNotify = 10 - I32AtomicWait = 10 - I64AtomicWait = 10 - AtomicFence = 10 - I32AtomicLoad = 15 - I64AtomicLoad = 15 - I32AtomicLoad8U = 15 - I32AtomicLoad16U = 15 - I64AtomicLoad8U = 15 - I64AtomicLoad16U = 15 - I64AtomicLoad32U = 15 - I32AtomicStore = 15 - I64AtomicStore = 15 - I32AtomicStore8 = 15 - I32AtomicStore16 = 15 - I64AtomicStore8 = 15 - I64AtomicStore16 = 15 - I64AtomicStore32 = 15 - I32AtomicRmwAdd = 20 - I64AtomicRmwAdd = 20 - I32AtomicRmw8AddU = 20 - I32AtomicRmw16AddU = 20 - I64AtomicRmw8AddU = 20 - I64AtomicRmw16AddU = 20 - I64AtomicRmw32AddU = 20 - I32AtomicRmwSub = 20 - I64AtomicRmwSub = 20 - I32AtomicRmw8SubU = 20 - I32AtomicRmw16SubU = 20 - I64AtomicRmw8SubU = 20 - I64AtomicRmw16SubU = 20 - I64AtomicRmw32SubU = 20 - I32AtomicRmwAnd = 15 - I64AtomicRmwAnd = 15 - I32AtomicRmw8AndU = 15 - I32AtomicRmw16AndU = 15 - I64AtomicRmw8AndU = 15 - I64AtomicRmw16AndU = 15 - I64AtomicRmw32AndU = 15 - I32AtomicRmwOr = 15 - I64AtomicRmwOr = 15 - I32AtomicRmw8OrU = 15 - I32AtomicRmw16OrU = 15 - I64AtomicRmw8OrU = 15 - I64AtomicRmw16OrU = 15 - I64AtomicRmw32OrU = 15 - I32AtomicRmwXor = 15 - I64AtomicRmwXor = 15 - I32AtomicRmw8XorU = 15 - I32AtomicRmw16XorU = 15 - I64AtomicRmw8XorU = 15 - I64AtomicRmw16XorU = 15 - I64AtomicRmw32XorU = 15 - I32AtomicRmwXchg = 30 - I64AtomicRmwXchg = 30 - I32AtomicRmw8XchgU = 30 - I32AtomicRmw16XchgU = 30 - I64AtomicRmw8XchgU = 30 - I64AtomicRmw16XchgU = 30 - I64AtomicRmw32XchgU = 30 - I32AtomicRmwCmpxchg = 30 - I64AtomicRmwCmpxchg = 30 - I32AtomicRmw8CmpxchgU = 30 - I32AtomicRmw16CmpxchgU = 30 - I64AtomicRmw8CmpxchgU = 30 - I64AtomicRmw16CmpxchgU = 30 - I64AtomicRmw32CmpxchgU = 30 - V128Load = 18 - V128Store = 18 - V128Const = 18 - I8x16Splat = 20 - I8x16ExtractLaneS = 20 - I8x16ExtractLaneU = 20 - I8x16ReplaceLane = 20 - I16x8Splat = 20 - I16x8ExtractLaneS = 20 - I16x8ExtractLaneU = 20 - I16x8ReplaceLane = 20 - I32x4Splat = 20 - I32x4ExtractLane = 20 - I32x4ReplaceLane = 20 - I64x2Splat = 20 - I64x2ExtractLane = 20 - I64x2ReplaceLane = 20 - F32x4Splat = 120 - F32x4ExtractLane = 120 - F32x4ReplaceLane = 120 - F64x2Splat = 120 - F64x2ExtractLane = 120 - F64x2ReplaceLane = 120 - I8x16Eq = 30 - I8x16Ne = 30 - I8x16LtS = 40 - I8x16LtU = 40 - I8x16GtS = 40 - I8x16GtU = 40 - I8x16LeS = 40 - I8x16LeU = 40 - I8x16GeS = 40 - I8x16GeU = 40 - I16x8Eq = 30 - I16x8Ne = 30 - I16x8LtS = 40 - I16x8LtU = 40 - I16x8GtS = 40 - I16x8GtU = 40 - I16x8LeS = 40 - I16x8LeU = 40 - I16x8GeS = 40 - I16x8GeU = 40 - I32x4Eq = 30 - I32x4Ne = 30 - I32x4LtS = 40 - I32x4LtU = 40 - I32x4GtS = 40 - I32x4GtU = 40 - I32x4LeS = 40 - I32x4LeU = 40 - I32x4GeS = 40 - I32x4GeU = 40 - F32x4Eq = 120 - F32x4Ne = 120 - F32x4Lt = 120 - F32x4Gt = 120 - F32x4Le = 120 - F32x4Ge = 120 - F64x2Eq = 120 - F64x2Ne = 120 - F64x2Lt = 120 - F64x2Gt = 120 - F64x2Le = 120 - F64x2Ge = 120 - V128Not = 40 - V128And = 40 - V128AndNot = 40 - V128Or = 40 - V128Xor = 40 - V128Bitselect = 40 - I8x16Neg = 20 - I8x16AnyTrue = 20 - I8x16AllTrue = 20 - I8x16Shl = 30 - I8x16ShrS = 30 - I8x16ShrU = 30 - I8x16Add = 20 - I8x16AddSaturateS = 20 - I8x16AddSaturateU = 20 - I8x16Sub = 20 - I8x16SubSaturateS = 20 - I8x16SubSaturateU = 20 - I8x16MinS = 40 - I8x16MinU = 40 - I8x16MaxS = 40 - I8x16MaxU = 40 - I8x16Mul = 80 - I16x8Neg = 40 - I16x8AnyTrue = 40 - I16x8AllTrue = 40 - I16x8Shl = 30 - I16x8ShrS = 30 - I16x8ShrU = 30 - I16x8Add = 20 - I16x8AddSaturateS = 20 - I16x8AddSaturateU = 20 - I16x8Sub = 20 - I16x8SubSaturateS = 20 - I16x8SubSaturateU = 20 - I16x8Mul = 40 - I16x8MinS = 40 - I16x8MinU = 40 - I16x8MaxS = 40 - I16x8MaxU = 40 - I32x4Neg = 20 - I32x4AnyTrue = 20 - I32x4AllTrue = 20 - I32x4Shl = 30 - I32x4ShrS = 30 - I32x4ShrU = 30 - I32x4Add = 20 - I32x4Sub = 20 - I32x4Mul = 80 - I32x4MinS = 40 - I32x4MinU = 40 - I32x4MaxS = 40 - I32x4MaxU = 40 - I64x2Neg = 40 - I64x2AnyTrue = 20 - I64x2AllTrue = 20 - I64x2Shl = 30 - I64x2ShrS = 30 - I64x2ShrU = 30 - I64x2Add = 20 - I64x2Sub = 20 - I64x2Mul = 80 - F32x4Abs = 200 - F32x4Neg = 200 - F32x4Sqrt = 1000 - F32x4Add = 200 - F32x4Sub = 200 - F32x4Mul = 800 - F32x4Div = 1000 - F32x4Min = 500 - F32x4Max = 500 - F64x2Abs = 500 - F64x2Neg = 400 - F64x2Sqrt = 1000 - F64x2Add = 200 - F64x2Sub = 200 - F64x2Mul = 800 - F64x2Div = 1000 - F64x2Min = 500 - F64x2Max = 500 - I32x4TruncSatF32x4S = 1000 - I32x4TruncSatF32x4U = 1000 - I64x2TruncSatF64x2S = 1000 - I64x2TruncSatF64x2U = 1000 - F32x4ConvertI32x4S = 1000 - F32x4ConvertI32x4U = 1000 - F64x2ConvertI64x2S = 1000 - F64x2ConvertI64x2U = 1000 - V8x16Swizzle = 1200 - V8x16Shuffle = 1200 - V8x16LoadSplat = 40 - V16x8LoadSplat = 40 - V32x4LoadSplat = 40 - V64x2LoadSplat = 40 - I8x16NarrowI16x8S = 800 - I8x16NarrowI16x8U = 800 - I16x8NarrowI32x4S = 800 - I16x8NarrowI32x4U = 800 - I16x8WidenLowI8x16S = 800 - I16x8WidenHighI8x16S = 800 - I16x8WidenLowI8x16U = 800 - I16x8WidenHighI8x16U = 800 - I32x4WidenLowI16x8S = 800 - I32x4WidenHighI16x8S = 800 - I32x4WidenLowI16x8U = 800 - I32x4WidenHighI16x8U = 800 - I16x8Load8x8S = 400 - I16x8Load8x8U = 400 - I32x4Load16x4S = 400 - I32x4Load16x4U = 400 - I64x2Load32x2S = 400 - I64x2Load32x2U = 400 - I8x16RoundingAverageU = 200 - I16x8RoundingAverageU = 200 - LocalAllocate = 2 - LocalsUnmetered = 100 - MaxMemoryGrowDelta = 100 - MaxMemoryGrow = 100 - Catch = 1 - CatchAll = 1 - Delegate = 1 - F32x4Ceil = 1 - F32x4DemoteF64x2Zero = 1 - F32x4Floor = 1 - F32x4Nearest = 1 - F32x4PMax = 1 - F32x4PMin = 1 - F32x4Trunc = 1 - F64x2Ceil = 1 - F64x2ConvertLowI32x4S = 1 - F64x2ConvertLowI32x4U = 1 - F64x2Floor = 1 - F64x2Nearest = 1 - F64x2PMax = 1 - F64x2PMin = 1 - F64x2PromoteLowF32x4 = 1 - F64x2Trunc = 1 - I16x8Abs = 1 - I16x8AddSatS = 1 - I16x8AddSatU = 1 - I16x8Bitmask = 1 - I16x8ExtAddPairwiseI8x16S = 1 - I16x8ExtAddPairwiseI8x16U = 1 - I16x8ExtMulHighI8x16S = 1 - I16x8ExtMulHighI8x16U = 1 - I16x8ExtMulLowI8x16S = 1 - I16x8ExtMulLowI8x16U = 1 - I16x8ExtendHighI8x16S = 1 - I16x8ExtendHighI8x16U = 1 - I16x8ExtendLowI8x16S = 1 - I16x8ExtendLowI8x16U = 1 - I16x8Q15MulrSatS = 1 - I16x8SubSatS = 1 - I16x8SubSatU = 1 - I32x4Abs = 1 - I32x4Bitmask = 1 - I32x4DotI16x8S = 1 - I32x4ExtAddPairwiseI16x8S = 1 - I32x4ExtAddPairwiseI16x8U = 1 - I32x4ExtMulHighI16x8S = 1 - I32x4ExtMulHighI16x8U = 1 - I32x4ExtMulLowI16x8S = 1 - I32x4ExtMulLowI16x8U = 1 - I32x4ExtendHighI16x8S = 1 - I32x4ExtendHighI16x8U = 1 - I32x4ExtendLowI16x8S = 1 - I32x4ExtendLowI16x8U = 1 - I32x4TruncSatF64x2SZero = 1 - I32x4TruncSatF64x2UZero = 1 - I64x2Abs = 1 - I64x2Bitmask = 1 - I64x2Eq = 1 - I64x2ExtMulHighI32x4S = 1 - I64x2ExtMulHighI32x4U = 1 - I64x2ExtMulLowI32x4S = 1 - I64x2ExtMulLowI32x4U = 1 - I64x2ExtendHighI32x4S = 1 - I64x2ExtendHighI32x4U = 1 - I64x2ExtendLowI32x4S = 1 - I64x2ExtendLowI32x4U = 1 - I64x2GeS = 1 - I64x2GtS = 1 - I64x2LeS = 1 - I64x2LtS = 1 - I64x2Ne = 1 - I8x16Abs = 1 - I8x16AddSatS = 1 - I8x16AddSatU = 1 - I8x16Bitmask = 1 - I8x16Popcnt = 1 - I8x16Shuffle = 1 - I8x16SubSatS = 1 - I8x16SubSatU = 1 - I8x16Swizzle = 1 - MemoryAtomicNotify = 1 - MemoryAtomicWait32 = 1 - MemoryAtomicWait64 = 1 - Rethrow = 1 - ReturnCall = 1 - ReturnCallIndirect = 1 - Throw = 1 - Try = 1 - Unwind = 1 - V128AnyTrue = 1 - V128Load16Lane = 1 - V128Load16Splat = 1 - V128Load16x4S = 1 - V128Load16x4U = 1 - V128Load32Lane = 1 - V128Load32Splat = 1 - V128Load32Zero = 1 - V128Load32x2S = 1 - V128Load32x2U = 1 - V128Load64Lane = 1 - V128Load64Splat = 1 - V128Load64Zero = 1 - V128Load8Lane = 1 - V128Load8Splat = 1 - V128Load8x8S = 1 - V128Load8x8U = 1 - V128Store16Lane = 1 - V128Store32Lane = 1 - V128Store64Lane = 1 - V128Store8Lane = 1 - -[MaxPerTransaction] - MaxBuiltInCallsPerTx = 100 - MaxNumberOfTransfersPerTx = 250 - MaxNumberOfTrieReadsPerTx = 1500 - -# Quadratic, Linear and Constant are the coefficients for a quadratic func. Separate variables are used for the -# sign of each coefficient, 0 meaning positive and 1 meaning negative -# The current values for the coefficients were computed based on benchmarking. -# For the given coefficients, the minimum of the function must not be lower than MinimumGasCost -[DynamicStorageLoad] - QuadraticCoefficient = 688 - SignOfQuadratic = 0 - LinearCoefficient = 31858 - SignOfLinear = 0 - ConstantCoefficient = 15287 - SignOfConstant = 0 - MinimumGasCost = 10000 diff --git a/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV2.toml b/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV2.toml deleted file mode 100644 index 38157aeb..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV2.toml +++ /dev/null @@ -1,827 +0,0 @@ -[BuiltInCost] - ChangeOwnerAddress = 5000000 - ClaimDeveloperRewards = 5000000 - SaveUserName = 1000000 - SaveKeyValue = 250000 - ESDTTransfer = 250000 - ESDTBurn = 250000 - ESDTLocalMint = 250000 - ESDTLocalBurn = 250000 - ESDTNFTCreate = 500000 - ESDTNFTAddQuantity = 500000 - ESDTNFTBurn = 500000 - ESDTNFTTransfer = 500000 - ESDTNFTChangeCreateOwner = 1000000 - ESDTNFTAddUri = 500000 - ESDTNFTUpdateAttributes = 500000 - ESDTNFTMultiTransfer = 1000000 - SetGuardian = 250000 - GuardAccount = 250000 - UnGuardAccount = 250000 - TrieLoadPerNode = 100000 - TrieStorePerNode = 50000 - -[MetaChainSystemSCsCost] - Stake = 5000000 - UnStake = 5000000 - UnBond = 5000000 - Claim = 5000000 - Get = 5000000 - ChangeRewardAddress = 5000000 - ChangeValidatorKeys = 5000000 - UnJail = 5000000 - ESDTIssue = 50000000 - ESDTOperations = 50000000 - Proposal = 5000000 - Vote = 500000 - DelegateVote = 1000000 - RevokeVote = 500000 - CloseProposal = 1000000 - DelegationOps = 1000000 - UnstakeTokens = 5000000 - UnbondTokens = 5000000 - GetActiveFund = 50000 - DelegationMgrOps = 50000000 - ValidatorToDelegation = 500000000 - GetAllNodeStates = 100000000 - FixWaitingListSize = 500000000 - -[BaseOperationCost] - StorePerByte = 50000 - ReleasePerByte = 10000 - DataCopyPerByte = 1000 - PersistPerByte = 10000 - CompilePerByte = 300 - AoTPreparePerByte = 300 - GetCode = 1000000 - -[BaseOpsAPICost] - GetSCAddress = 100 - GetOwnerAddress = 5000 - IsSmartContract = 5000 - GetShardOfAddress = 5000 - GetExternalBalance = 7000 - GetBlockHash = 10000 - TransferValue = 150000 - GetArgument = 100 - GetFunction = 100 - GetNumArguments = 100 - StorageStore = 250000 - StorageLoad = 100000 - CachedStorageLoad = 100000 - GetCaller = 100 - GetCallValue = 100 - Log = 3750 - Finish = 1 - SignalError = 1 - GetBlockTimeStamp = 10000 - GetGasLeft = 100 - Int64GetArgument = 100 - Int64StorageStore = 250000 - Int64StorageLoad = 100000 - Int64Finish = 1000 - GetStateRootHash = 10000 - GetBlockNonce = 10000 - GetBlockEpoch = 10000 - GetBlockRound = 10000 - GetBlockRandomSeed = 10000 - ExecuteOnSameContext = 160000 - ExecuteOnDestContext = 160000 - DelegateExecution = 160000 - AsyncCallStep = 200000 - AsyncCallbackGasLock = 2000000 - ExecuteReadOnly = 160000 - CreateContract = 300000 - GetReturnData = 100 - GetNumReturnData = 100 - GetReturnDataSize = 100 - CleanReturnData = 100 - DeleteFromReturnData = 100 - GetOriginalTxHash = 10000 - GetPrevTxHash = 10000 - GetCurrentTxHash = 10000 - CreateAsyncCall = 200000 - SetAsyncCallback = 100000 - SetAsyncGroupCallback = 100000 - SetAsyncContextCallback = 100000 - GetCallbackClosure = 10000 - GetCodeMetadata = 10000 - IsBuiltinFunction = 10000 - -[EthAPICost] - UseGas = 100 - GetAddress = 100000 - GetExternalBalance = 70000 - GetBlockHash = 100000 - Call = 160000 - CallDataCopy = 200 - GetCallDataSize = 100 - CallCode = 160000 - CallDelegate = 160000 - CallStatic = 160000 - StorageStore = 250000 - StorageLoad = 100000 - GetCaller = 100 - GetCallValue = 100 - CodeCopy = 1000 - GetCodeSize = 100 - GetBlockCoinbase = 100 - Create = 320000 - GetBlockDifficulty = 100 - ExternalCodeCopy = 3000 - GetExternalCodeSize = 2500 - GetGasLeft = 100 - GetBlockGasLimit = 100000 - GetTxGasPrice = 1000 - Log = 3750 - GetBlockNumber = 100000 - GetTxOrigin = 100000 - Finish = 1 - Revert = 1 - GetReturnDataSize = 200 - ReturnDataCopy = 500 - SelfDestruct = 5000000 - GetBlockTimeStamp = 100000 - -[BigIntAPICost] - BigIntNew = 2000 - BigIntByteLength = 2000 - BigIntUnsignedByteLength = 2000 - BigIntSignedByteLength = 2000 - BigIntGetBytes = 2000 - BigIntGetUnsignedBytes = 2000 - BigIntGetSignedBytes = 2000 - BigIntSetBytes = 2000 - BigIntSetUnsignedBytes = 2000 - BigIntSetSignedBytes = 2000 - BigIntIsInt64 = 2000 - BigIntGetInt64 = 2000 - BigIntSetInt64 = 2000 - BigIntAdd = 2000 - BigIntSub = 2000 - BigIntMul = 6000 - BigIntSqrt = 6000 - BigIntPow = 6000 - BigIntLog = 6000 - BigIntTDiv = 6000 - BigIntTMod = 6000 - BigIntEDiv = 6000 - BigIntEMod = 6000 - BigIntAbs = 2000 - BigIntNeg = 2000 - BigIntSign = 2000 - BigIntCmp = 2000 - BigIntNot = 2000 - BigIntAnd = 2000 - BigIntOr = 2000 - BigIntXor = 2000 - BigIntShr = 2000 - BigIntShl = 2000 - BigIntFinishUnsigned = 1000 - BigIntFinishSigned = 1000 - BigIntStorageLoadUnsigned = 100000 - BigIntStorageStoreUnsigned = 250000 - BigIntGetArgument = 1000 - BigIntGetUnsignedArgument = 1000 - BigIntGetSignedArgument = 1000 - BigIntGetCallValue = 1000 - BigIntGetExternalBalance = 10000 - CopyPerByteForTooBig = 1000 - -[CryptoAPICost] - SHA256 = 1000000 - Keccak256 = 1000000 - Ripemd160 = 1000000 - VerifyBLS = 5000000 - VerifyEd25519 = 2000000 - VerifySecp256k1 = 2000000 - EllipticCurveNew = 10000 - AddECC = 75000 - DoubleECC = 65000 - IsOnCurveECC = 10000 - ScalarMultECC = 400000 - MarshalECC = 13000 - MarshalCompressedECC = 15000 - UnmarshalECC = 20000 - UnmarshalCompressedECC = 270000 - GenerateKeyECC = 7000000 - EncodeDERSig = 10000000 - -[ManagedBufferAPICost] - MBufferNew = 2000 - MBufferNewFromBytes = 4000 - MBufferGetLength = 2000 - MBufferGetBytes = 2000 - MBufferGetByteSlice = 2000 - MBufferCopyByteSlice = 2000 - MBufferSetBytes = 2000 - MBufferAppend = 2000 - MBufferAppendBytes = 2000 - MBufferToBigIntUnsigned = 4000 - MBufferToBigIntSigned = 10000 - MBufferFromBigIntUnsigned = 4000 - MBufferFromBigIntSigned = 10000 - MBufferStorageStore = 250000 - MBufferStorageLoad = 100000 - MBufferGetArgument = 1000 - MBufferFinish = 1000 - MBufferSetRandom = 6000 - MBufferToBigFloat = 2000 - MBufferFromBigFloat = 2000 - -[BigFloatAPICost] - BigFloatNewFromParts = 3000 - BigFloatAdd = 7000 - BigFloatSub = 7000 - BigFloatMul = 7000 - BigFloatDiv = 7000 - BigFloatTruncate = 5000 - BigFloatNeg = 5000 - BigFloatClone = 5000 - BigFloatCmp = 4000 - BigFloatAbs = 5000 - BigFloatSqrt = 7000 - BigFloatPow = 10000 - BigFloatFloor = 5000 - BigFloatCeil = 5000 - BigFloatIsInt = 3000 - BigFloatSetBigInt = 3000 - BigFloatSetInt64 = 1000 - BigFloatGetConst = 1000 - -[WASMOpcodeCost] - Unreachable = 1 - Nop = 1 - Block = 1 - Loop = 1 - If = 1 - Else = 2 - End = 2 - Br = 2 - BrIf = 3 - BrTable = 2 - Return = 3 - Call = 3 - CallIndirect = 3 - Drop = 3 - Select = 3 - TypedSelect = 3 - LocalGet = 3 - LocalSet = 3 - LocalTee = 3 - GlobalGet = 3 - GlobalSet = 3 - I32Load = 3 - I64Load = 3 - F32Load = 6 - F64Load = 6 - I32Load8S = 3 - I32Load8U = 3 - I32Load16S = 3 - I32Load16U = 3 - I64Load8S = 3 - I64Load8U = 3 - I64Load16S = 3 - I64Load16U = 3 - I64Load32S = 3 - I64Load32U = 3 - I32Store = 3 - I64Store = 3 - F32Store = 12 - F64Store = 12 - I32Store8 = 3 - I32Store16 = 3 - I64Store8 = 3 - I64Store16 = 3 - I64Store32 = 3 - MemorySize = 5 - MemoryGrow = 5 - I32Const = 1 - I64Const = 1 - F32Const = 1 - F64Const = 1 - RefNull = 1 - RefIsNull = 1 - RefFunc = 1 - I32Eqz = 1 - I32Eq = 1 - I32Ne = 1 - I32LtS = 1 - I32LtU = 1 - I32GtS = 1 - I32GtU = 1 - I32LeS = 1 - I32LeU = 1 - I32GeS = 1 - I32GeU = 1 - I64Eqz = 1 - I64Eq = 1 - I64Ne = 1 - I64LtS = 1 - I64LtU = 1 - I64GtS = 1 - I64GtU = 1 - I64LeS = 1 - I64LeU = 1 - I64GeS = 1 - I64GeU = 1 - F32Eq = 6 - F32Ne = 6 - F32Lt = 6 - F32Gt = 6 - F32Le = 6 - F32Ge = 6 - F64Eq = 6 - F64Ne = 6 - F64Lt = 6 - F64Gt = 6 - F64Le = 6 - F64Ge = 6 - I32Clz = 100 - I32Ctz = 100 - I32Popcnt = 100 - I32Add = 1 - I32Sub = 1 - I32Mul = 3 - I32DivS = 18 - I32DivU = 18 - I32RemS = 18 - I32RemU = 18 - I32And = 1 - I32Or = 1 - I32Xor = 1 - I32Shl = 3 - I32ShrS = 3 - I32ShrU = 3 - I32Rotl = 5 - I32Rotr = 5 - I64Clz = 100 - I64Ctz = 100 - I64Popcnt = 100 - I64Add = 1 - I64Sub = 1 - I64Mul = 3 - I64DivS = 18 - I64DivU = 18 - I64RemS = 18 - I64RemU = 18 - I64And = 1 - I64Or = 1 - I64Xor = 1 - I64Shl = 3 - I64ShrS = 3 - I64ShrU = 3 - I64Rotl = 5 - I64Rotr = 5 - F32Abs = 5 - F32Neg = 5 - F32Ceil = 100 - F32Floor = 100 - F32Trunc = 100 - F32Nearest = 100 - F32Sqrt = 100 - F32Add = 5 - F32Sub = 5 - F32Mul = 15 - F32Div = 100 - F32Min = 15 - F32Max = 15 - F32Copysign = 5 - F64Abs = 5 - F64Neg = 5 - F64Ceil = 100 - F64Floor = 100 - F64Trunc = 100 - F64Nearest = 100 - F64Sqrt = 100 - F64Add = 5 - F64Sub = 5 - F64Mul = 15 - F64Div = 100 - F64Min = 15 - F64Max = 15 - F64Copysign = 5 - I32WrapI64 = 9 - I32TruncF32S = 100 - I32TruncF32U = 100 - I32TruncF64S = 100 - I32TruncF64U = 100 - I64ExtendI32S = 9 - I64ExtendI32U = 9 - I64TruncF32S = 100 - I64TruncF32U = 100 - I64TruncF64S = 100 - I64TruncF64U = 100 - F32ConvertI32S = 100 - F32ConvertI32U = 100 - F32ConvertI64S = 100 - F32ConvertI64U = 100 - F32DemoteF64 = 100 - F64ConvertI32S = 100 - F64ConvertI32U = 100 - F64ConvertI64S = 100 - F64ConvertI64U = 100 - F64PromoteF32 = 100 - I32ReinterpretF32 = 100 - I64ReinterpretF64 = 100 - F32ReinterpretI32 = 100 - F64ReinterpretI64 = 100 - I32Extend8S = 9 - I32Extend16S = 9 - I64Extend8S = 9 - I64Extend16S = 9 - I64Extend32S = 9 - I32TruncSatF32S = 100 - I32TruncSatF32U = 100 - I32TruncSatF64S = 100 - I32TruncSatF64U = 100 - I64TruncSatF32S = 100 - I64TruncSatF32U = 100 - I64TruncSatF64S = 100 - I64TruncSatF64U = 100 - MemoryInit = 5 - DataDrop = 5 - MemoryCopy = 5 - MemoryFill = 5 - TableInit = 10 - ElemDrop = 10 - TableCopy = 10 - TableFill = 10 - TableGet = 10 - TableSet = 10 - TableGrow = 10 - TableSize = 10 - AtomicNotify = 10 - I32AtomicWait = 10 - I64AtomicWait = 10 - AtomicFence = 10 - I32AtomicLoad = 15 - I64AtomicLoad = 15 - I32AtomicLoad8U = 15 - I32AtomicLoad16U = 15 - I64AtomicLoad8U = 15 - I64AtomicLoad16U = 15 - I64AtomicLoad32U = 15 - I32AtomicStore = 15 - I64AtomicStore = 15 - I32AtomicStore8 = 15 - I32AtomicStore16 = 15 - I64AtomicStore8 = 15 - I64AtomicStore16 = 15 - I64AtomicStore32 = 15 - I32AtomicRmwAdd = 20 - I64AtomicRmwAdd = 20 - I32AtomicRmw8AddU = 20 - I32AtomicRmw16AddU = 20 - I64AtomicRmw8AddU = 20 - I64AtomicRmw16AddU = 20 - I64AtomicRmw32AddU = 20 - I32AtomicRmwSub = 20 - I64AtomicRmwSub = 20 - I32AtomicRmw8SubU = 20 - I32AtomicRmw16SubU = 20 - I64AtomicRmw8SubU = 20 - I64AtomicRmw16SubU = 20 - I64AtomicRmw32SubU = 20 - I32AtomicRmwAnd = 15 - I64AtomicRmwAnd = 15 - I32AtomicRmw8AndU = 15 - I32AtomicRmw16AndU = 15 - I64AtomicRmw8AndU = 15 - I64AtomicRmw16AndU = 15 - I64AtomicRmw32AndU = 15 - I32AtomicRmwOr = 15 - I64AtomicRmwOr = 15 - I32AtomicRmw8OrU = 15 - I32AtomicRmw16OrU = 15 - I64AtomicRmw8OrU = 15 - I64AtomicRmw16OrU = 15 - I64AtomicRmw32OrU = 15 - I32AtomicRmwXor = 15 - I64AtomicRmwXor = 15 - I32AtomicRmw8XorU = 15 - I32AtomicRmw16XorU = 15 - I64AtomicRmw8XorU = 15 - I64AtomicRmw16XorU = 15 - I64AtomicRmw32XorU = 15 - I32AtomicRmwXchg = 30 - I64AtomicRmwXchg = 30 - I32AtomicRmw8XchgU = 30 - I32AtomicRmw16XchgU = 30 - I64AtomicRmw8XchgU = 30 - I64AtomicRmw16XchgU = 30 - I64AtomicRmw32XchgU = 30 - I32AtomicRmwCmpxchg = 30 - I64AtomicRmwCmpxchg = 30 - I32AtomicRmw8CmpxchgU = 30 - I32AtomicRmw16CmpxchgU = 30 - I64AtomicRmw8CmpxchgU = 30 - I64AtomicRmw16CmpxchgU = 30 - I64AtomicRmw32CmpxchgU = 30 - V128Load = 18 - V128Store = 18 - V128Const = 18 - I8x16Splat = 20 - I8x16ExtractLaneS = 20 - I8x16ExtractLaneU = 20 - I8x16ReplaceLane = 20 - I16x8Splat = 20 - I16x8ExtractLaneS = 20 - I16x8ExtractLaneU = 20 - I16x8ReplaceLane = 20 - I32x4Splat = 20 - I32x4ExtractLane = 20 - I32x4ReplaceLane = 20 - I64x2Splat = 20 - I64x2ExtractLane = 20 - I64x2ReplaceLane = 20 - F32x4Splat = 120 - F32x4ExtractLane = 120 - F32x4ReplaceLane = 120 - F64x2Splat = 120 - F64x2ExtractLane = 120 - F64x2ReplaceLane = 120 - I8x16Eq = 30 - I8x16Ne = 30 - I8x16LtS = 40 - I8x16LtU = 40 - I8x16GtS = 40 - I8x16GtU = 40 - I8x16LeS = 40 - I8x16LeU = 40 - I8x16GeS = 40 - I8x16GeU = 40 - I16x8Eq = 30 - I16x8Ne = 30 - I16x8LtS = 40 - I16x8LtU = 40 - I16x8GtS = 40 - I16x8GtU = 40 - I16x8LeS = 40 - I16x8LeU = 40 - I16x8GeS = 40 - I16x8GeU = 40 - I32x4Eq = 30 - I32x4Ne = 30 - I32x4LtS = 40 - I32x4LtU = 40 - I32x4GtS = 40 - I32x4GtU = 40 - I32x4LeS = 40 - I32x4LeU = 40 - I32x4GeS = 40 - I32x4GeU = 40 - F32x4Eq = 120 - F32x4Ne = 120 - F32x4Lt = 120 - F32x4Gt = 120 - F32x4Le = 120 - F32x4Ge = 120 - F64x2Eq = 120 - F64x2Ne = 120 - F64x2Lt = 120 - F64x2Gt = 120 - F64x2Le = 120 - F64x2Ge = 120 - V128Not = 40 - V128And = 40 - V128AndNot = 40 - V128Or = 40 - V128Xor = 40 - V128Bitselect = 40 - I8x16Neg = 20 - I8x16AnyTrue = 20 - I8x16AllTrue = 20 - I8x16Shl = 30 - I8x16ShrS = 30 - I8x16ShrU = 30 - I8x16Add = 20 - I8x16AddSaturateS = 20 - I8x16AddSaturateU = 20 - I8x16Sub = 20 - I8x16SubSaturateS = 20 - I8x16SubSaturateU = 20 - I8x16MinS = 40 - I8x16MinU = 40 - I8x16MaxS = 40 - I8x16MaxU = 40 - I8x16Mul = 80 - I16x8Neg = 40 - I16x8AnyTrue = 40 - I16x8AllTrue = 40 - I16x8Shl = 30 - I16x8ShrS = 30 - I16x8ShrU = 30 - I16x8Add = 20 - I16x8AddSaturateS = 20 - I16x8AddSaturateU = 20 - I16x8Sub = 20 - I16x8SubSaturateS = 20 - I16x8SubSaturateU = 20 - I16x8Mul = 40 - I16x8MinS = 40 - I16x8MinU = 40 - I16x8MaxS = 40 - I16x8MaxU = 40 - I32x4Neg = 20 - I32x4AnyTrue = 20 - I32x4AllTrue = 20 - I32x4Shl = 30 - I32x4ShrS = 30 - I32x4ShrU = 30 - I32x4Add = 20 - I32x4Sub = 20 - I32x4Mul = 80 - I32x4MinS = 40 - I32x4MinU = 40 - I32x4MaxS = 40 - I32x4MaxU = 40 - I64x2Neg = 40 - I64x2AnyTrue = 20 - I64x2AllTrue = 20 - I64x2Shl = 30 - I64x2ShrS = 30 - I64x2ShrU = 30 - I64x2Add = 20 - I64x2Sub = 20 - I64x2Mul = 80 - F32x4Abs = 200 - F32x4Neg = 200 - F32x4Sqrt = 1000 - F32x4Add = 200 - F32x4Sub = 200 - F32x4Mul = 800 - F32x4Div = 1000 - F32x4Min = 500 - F32x4Max = 500 - F64x2Abs = 500 - F64x2Neg = 400 - F64x2Sqrt = 1000 - F64x2Add = 200 - F64x2Sub = 200 - F64x2Mul = 800 - F64x2Div = 1000 - F64x2Min = 500 - F64x2Max = 500 - I32x4TruncSatF32x4S = 1000 - I32x4TruncSatF32x4U = 1000 - I64x2TruncSatF64x2S = 1000 - I64x2TruncSatF64x2U = 1000 - F32x4ConvertI32x4S = 1000 - F32x4ConvertI32x4U = 1000 - F64x2ConvertI64x2S = 1000 - F64x2ConvertI64x2U = 1000 - V8x16Swizzle = 1200 - V8x16Shuffle = 1200 - V8x16LoadSplat = 40 - V16x8LoadSplat = 40 - V32x4LoadSplat = 40 - V64x2LoadSplat = 40 - I8x16NarrowI16x8S = 800 - I8x16NarrowI16x8U = 800 - I16x8NarrowI32x4S = 800 - I16x8NarrowI32x4U = 800 - I16x8WidenLowI8x16S = 800 - I16x8WidenHighI8x16S = 800 - I16x8WidenLowI8x16U = 800 - I16x8WidenHighI8x16U = 800 - I32x4WidenLowI16x8S = 800 - I32x4WidenHighI16x8S = 800 - I32x4WidenLowI16x8U = 800 - I32x4WidenHighI16x8U = 800 - I16x8Load8x8S = 400 - I16x8Load8x8U = 400 - I32x4Load16x4S = 400 - I32x4Load16x4U = 400 - I64x2Load32x2S = 400 - I64x2Load32x2U = 400 - I8x16RoundingAverageU = 200 - I16x8RoundingAverageU = 200 - LocalAllocate = 2 - LocalsUnmetered = 100 - MaxMemoryGrowDelta = 100 - MaxMemoryGrow = 100 - Catch = 1 - CatchAll = 1 - Delegate = 1 - F32x4Ceil = 1 - F32x4DemoteF64x2Zero = 1 - F32x4Floor = 1 - F32x4Nearest = 1 - F32x4PMax = 1 - F32x4PMin = 1 - F32x4Trunc = 1 - F64x2Ceil = 1 - F64x2ConvertLowI32x4S = 1 - F64x2ConvertLowI32x4U = 1 - F64x2Floor = 1 - F64x2Nearest = 1 - F64x2PMax = 1 - F64x2PMin = 1 - F64x2PromoteLowF32x4 = 1 - F64x2Trunc = 1 - I16x8Abs = 1 - I16x8AddSatS = 1 - I16x8AddSatU = 1 - I16x8Bitmask = 1 - I16x8ExtAddPairwiseI8x16S = 1 - I16x8ExtAddPairwiseI8x16U = 1 - I16x8ExtMulHighI8x16S = 1 - I16x8ExtMulHighI8x16U = 1 - I16x8ExtMulLowI8x16S = 1 - I16x8ExtMulLowI8x16U = 1 - I16x8ExtendHighI8x16S = 1 - I16x8ExtendHighI8x16U = 1 - I16x8ExtendLowI8x16S = 1 - I16x8ExtendLowI8x16U = 1 - I16x8Q15MulrSatS = 1 - I16x8SubSatS = 1 - I16x8SubSatU = 1 - I32x4Abs = 1 - I32x4Bitmask = 1 - I32x4DotI16x8S = 1 - I32x4ExtAddPairwiseI16x8S = 1 - I32x4ExtAddPairwiseI16x8U = 1 - I32x4ExtMulHighI16x8S = 1 - I32x4ExtMulHighI16x8U = 1 - I32x4ExtMulLowI16x8S = 1 - I32x4ExtMulLowI16x8U = 1 - I32x4ExtendHighI16x8S = 1 - I32x4ExtendHighI16x8U = 1 - I32x4ExtendLowI16x8S = 1 - I32x4ExtendLowI16x8U = 1 - I32x4TruncSatF64x2SZero = 1 - I32x4TruncSatF64x2UZero = 1 - I64x2Abs = 1 - I64x2Bitmask = 1 - I64x2Eq = 1 - I64x2ExtMulHighI32x4S = 1 - I64x2ExtMulHighI32x4U = 1 - I64x2ExtMulLowI32x4S = 1 - I64x2ExtMulLowI32x4U = 1 - I64x2ExtendHighI32x4S = 1 - I64x2ExtendHighI32x4U = 1 - I64x2ExtendLowI32x4S = 1 - I64x2ExtendLowI32x4U = 1 - I64x2GeS = 1 - I64x2GtS = 1 - I64x2LeS = 1 - I64x2LtS = 1 - I64x2Ne = 1 - I8x16Abs = 1 - I8x16AddSatS = 1 - I8x16AddSatU = 1 - I8x16Bitmask = 1 - I8x16Popcnt = 1 - I8x16Shuffle = 1 - I8x16SubSatS = 1 - I8x16SubSatU = 1 - I8x16Swizzle = 1 - MemoryAtomicNotify = 1 - MemoryAtomicWait32 = 1 - MemoryAtomicWait64 = 1 - Rethrow = 1 - ReturnCall = 1 - ReturnCallIndirect = 1 - Throw = 1 - Try = 1 - Unwind = 1 - V128AnyTrue = 1 - V128Load16Lane = 1 - V128Load16Splat = 1 - V128Load16x4S = 1 - V128Load16x4U = 1 - V128Load32Lane = 1 - V128Load32Splat = 1 - V128Load32Zero = 1 - V128Load32x2S = 1 - V128Load32x2U = 1 - V128Load64Lane = 1 - V128Load64Splat = 1 - V128Load64Zero = 1 - V128Load8Lane = 1 - V128Load8Splat = 1 - V128Load8x8S = 1 - V128Load8x8U = 1 - V128Store16Lane = 1 - V128Store32Lane = 1 - V128Store64Lane = 1 - V128Store8Lane = 1 - -[MaxPerTransaction] - MaxBuiltInCallsPerTx = 100 - MaxNumberOfTransfersPerTx = 250 - MaxNumberOfTrieReadsPerTx = 1500 - -# Quadratic, Linear and Constant are the coefficients for a quadratic func. Separate variables are used for the -# sign of each coefficient, 0 meaning positive and 1 meaning negative -# The current values for the coefficients were computed based on benchmarking. -# For the given coefficients, the minimum of the function must not be lower than MinimumGasCost -[DynamicStorageLoad] - QuadraticCoefficient = 688 - SignOfQuadratic = 0 - LinearCoefficient = 31858 - SignOfLinear = 0 - ConstantCoefficient = 15287 - SignOfConstant = 0 - MinimumGasCost = 10000 diff --git a/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV3.toml b/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV3.toml deleted file mode 100644 index 3767f028..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV3.toml +++ /dev/null @@ -1,827 +0,0 @@ -[BuiltInCost] - ChangeOwnerAddress = 5000000 - ClaimDeveloperRewards = 5000000 - SaveUserName = 1000000 - SaveKeyValue = 250000 - ESDTTransfer = 250000 - ESDTBurn = 250000 - ESDTLocalMint = 250000 - ESDTLocalBurn = 250000 - ESDTNFTCreate = 500000 - ESDTNFTAddQuantity = 500000 - ESDTNFTBurn = 500000 - ESDTNFTTransfer = 500000 - ESDTNFTChangeCreateOwner = 1000000 - ESDTNFTAddUri = 500000 - ESDTNFTUpdateAttributes = 500000 - ESDTNFTMultiTransfer = 1000000 - SetGuardian = 250000 - GuardAccount = 250000 - UnGuardAccount = 250000 - TrieLoadPerNode = 100000 - TrieStorePerNode = 50000 - -[MetaChainSystemSCsCost] - Stake = 5000000 - UnStake = 5000000 - UnBond = 5000000 - Claim = 5000000 - Get = 5000000 - ChangeRewardAddress = 5000000 - ChangeValidatorKeys = 5000000 - UnJail = 5000000 - DelegationOps = 1000000 - DelegationMgrOps = 50000000 - ValidatorToDelegation = 500000000 - ESDTIssue = 50000000 - ESDTOperations = 50000000 - Proposal = 50000000 - Vote = 50000000 - DelegateVote = 50000000 - RevokeVote = 50000000 - CloseProposal = 50000000 - GetAllNodeStates = 20000000 - UnstakeTokens = 5000000 - UnbondTokens = 5000000 - GetActiveFund = 50000 - FixWaitingListSize = 500000000 - -[BaseOperationCost] - StorePerByte = 50000 - ReleasePerByte = 10000 - DataCopyPerByte = 1000 - PersistPerByte = 10000 - CompilePerByte = 300 - AoTPreparePerByte = 300 - GetCode = 1000000 - -[BaseOpsAPICost] - GetSCAddress = 100 - GetOwnerAddress = 5000 - IsSmartContract = 5000 - GetShardOfAddress = 5000 - GetExternalBalance = 7000 - GetBlockHash = 10000 - TransferValue = 150000 - GetArgument = 100 - GetFunction = 100 - GetNumArguments = 100 - StorageStore = 250000 - StorageLoad = 100000 - CachedStorageLoad = 100000 - GetCaller = 100 - GetCallValue = 100 - Log = 3750 - Finish = 1 - SignalError = 1 - GetBlockTimeStamp = 10000 - GetGasLeft = 100 - Int64GetArgument = 100 - Int64StorageStore = 250000 - Int64StorageLoad = 100000 - Int64Finish = 1000 - GetStateRootHash = 10000 - GetBlockNonce = 10000 - GetBlockEpoch = 10000 - GetBlockRound = 10000 - GetBlockRandomSeed = 10000 - ExecuteOnSameContext = 160000 - ExecuteOnDestContext = 160000 - DelegateExecution = 160000 - AsyncCallStep = 200000 - AsyncCallbackGasLock = 2000000 - ExecuteReadOnly = 160000 - CreateContract = 300000 - GetReturnData = 100 - GetNumReturnData = 100 - GetReturnDataSize = 100 - CleanReturnData = 100 - DeleteFromReturnData = 100 - GetOriginalTxHash = 10000 - GetPrevTxHash = 10000 - GetCurrentTxHash = 10000 - CreateAsyncCall = 200000 - SetAsyncCallback = 100000 - SetAsyncGroupCallback = 100000 - SetAsyncContextCallback = 100000 - GetCallbackClosure = 10000 - GetCodeMetadata = 10000 - IsBuiltinFunction = 10000 - -[EthAPICost] - UseGas = 100 - GetAddress = 100000 - GetExternalBalance = 70000 - GetBlockHash = 100000 - Call = 160000 - CallDataCopy = 200 - GetCallDataSize = 100 - CallCode = 160000 - CallDelegate = 160000 - CallStatic = 160000 - StorageStore = 250000 - StorageLoad = 100000 - GetCaller = 100 - GetCallValue = 100 - CodeCopy = 1000 - GetCodeSize = 100 - GetBlockCoinbase = 100 - Create = 320000 - GetBlockDifficulty = 100 - ExternalCodeCopy = 3000 - GetExternalCodeSize = 2500 - GetGasLeft = 100 - GetBlockGasLimit = 100000 - GetTxGasPrice = 1000 - Log = 3750 - GetBlockNumber = 100000 - GetTxOrigin = 100000 - Finish = 1 - Revert = 1 - GetReturnDataSize = 200 - ReturnDataCopy = 500 - SelfDestruct = 5000000 - GetBlockTimeStamp = 100000 - -[BigIntAPICost] - BigIntNew = 2000 - BigIntByteLength = 2000 - BigIntUnsignedByteLength = 2000 - BigIntSignedByteLength = 2000 - BigIntGetBytes = 2000 - BigIntGetUnsignedBytes = 2000 - BigIntGetSignedBytes = 2000 - BigIntSetBytes = 2000 - BigIntSetUnsignedBytes = 2000 - BigIntSetSignedBytes = 2000 - BigIntIsInt64 = 2000 - BigIntGetInt64 = 2000 - BigIntSetInt64 = 2000 - BigIntAdd = 2000 - BigIntSub = 2000 - BigIntMul = 6000 - BigIntSqrt = 6000 - BigIntPow = 6000 - BigIntLog = 6000 - BigIntTDiv = 6000 - BigIntTMod = 6000 - BigIntEDiv = 6000 - BigIntEMod = 6000 - BigIntAbs = 2000 - BigIntNeg = 2000 - BigIntSign = 2000 - BigIntCmp = 2000 - BigIntNot = 2000 - BigIntAnd = 2000 - BigIntOr = 2000 - BigIntXor = 2000 - BigIntShr = 2000 - BigIntShl = 2000 - BigIntFinishUnsigned = 1000 - BigIntFinishSigned = 1000 - BigIntStorageLoadUnsigned = 100000 - BigIntStorageStoreUnsigned = 250000 - BigIntGetArgument = 1000 - BigIntGetUnsignedArgument = 1000 - BigIntGetSignedArgument = 1000 - BigIntGetCallValue = 1000 - BigIntGetExternalBalance = 10000 - CopyPerByteForTooBig = 1000 - -[CryptoAPICost] - SHA256 = 1000000 - Keccak256 = 1000000 - Ripemd160 = 1000000 - VerifyBLS = 5000000 - VerifyEd25519 = 2000000 - VerifySecp256k1 = 2000000 - EllipticCurveNew = 10000 - AddECC = 75000 - DoubleECC = 65000 - IsOnCurveECC = 10000 - ScalarMultECC = 400000 - MarshalECC = 13000 - MarshalCompressedECC = 15000 - UnmarshalECC = 20000 - UnmarshalCompressedECC = 270000 - GenerateKeyECC = 7000000 - EncodeDERSig = 10000000 - -[ManagedBufferAPICost] - MBufferNew = 2000 - MBufferNewFromBytes = 4000 - MBufferGetLength = 2000 - MBufferGetBytes = 2000 - MBufferGetByteSlice = 2000 - MBufferCopyByteSlice = 2000 - MBufferSetBytes = 2000 - MBufferAppend = 2000 - MBufferAppendBytes = 2000 - MBufferToBigIntUnsigned = 4000 - MBufferToBigIntSigned = 10000 - MBufferFromBigIntUnsigned = 4000 - MBufferFromBigIntSigned = 10000 - MBufferStorageStore = 250000 - MBufferStorageLoad = 100000 - MBufferGetArgument = 1000 - MBufferFinish = 1000 - MBufferSetRandom = 6000 - MBufferToBigFloat = 2000 - MBufferFromBigFloat = 2000 - -[BigFloatAPICost] - BigFloatNewFromParts = 3000 - BigFloatAdd = 7000 - BigFloatSub = 7000 - BigFloatMul = 7000 - BigFloatDiv = 7000 - BigFloatTruncate = 5000 - BigFloatNeg = 5000 - BigFloatClone = 5000 - BigFloatCmp = 4000 - BigFloatAbs = 5000 - BigFloatSqrt = 7000 - BigFloatPow = 10000 - BigFloatFloor = 5000 - BigFloatCeil = 5000 - BigFloatIsInt = 3000 - BigFloatSetBigInt = 3000 - BigFloatSetInt64 = 1000 - BigFloatGetConst = 1000 - -[WASMOpcodeCost] - Unreachable = 1 - Nop = 1 - Block = 1 - Loop = 1 - If = 1 - Else = 2 - End = 2 - Br = 2 - BrIf = 3 - BrTable = 2 - Return = 3 - Call = 3 - CallIndirect = 3 - Drop = 3 - Select = 3 - TypedSelect = 3 - LocalGet = 3 - LocalSet = 3 - LocalTee = 3 - GlobalGet = 3 - GlobalSet = 3 - I32Load = 3 - I64Load = 3 - F32Load = 6 - F64Load = 6 - I32Load8S = 3 - I32Load8U = 3 - I32Load16S = 3 - I32Load16U = 3 - I64Load8S = 3 - I64Load8U = 3 - I64Load16S = 3 - I64Load16U = 3 - I64Load32S = 3 - I64Load32U = 3 - I32Store = 3 - I64Store = 3 - F32Store = 12 - F64Store = 12 - I32Store8 = 3 - I32Store16 = 3 - I64Store8 = 3 - I64Store16 = 3 - I64Store32 = 3 - MemorySize = 5 - MemoryGrow = 5 - I32Const = 1 - I64Const = 1 - F32Const = 1 - F64Const = 1 - RefNull = 1 - RefIsNull = 1 - RefFunc = 1 - I32Eqz = 1 - I32Eq = 1 - I32Ne = 1 - I32LtS = 1 - I32LtU = 1 - I32GtS = 1 - I32GtU = 1 - I32LeS = 1 - I32LeU = 1 - I32GeS = 1 - I32GeU = 1 - I64Eqz = 1 - I64Eq = 1 - I64Ne = 1 - I64LtS = 1 - I64LtU = 1 - I64GtS = 1 - I64GtU = 1 - I64LeS = 1 - I64LeU = 1 - I64GeS = 1 - I64GeU = 1 - F32Eq = 6 - F32Ne = 6 - F32Lt = 6 - F32Gt = 6 - F32Le = 6 - F32Ge = 6 - F64Eq = 6 - F64Ne = 6 - F64Lt = 6 - F64Gt = 6 - F64Le = 6 - F64Ge = 6 - I32Clz = 100 - I32Ctz = 100 - I32Popcnt = 100 - I32Add = 1 - I32Sub = 1 - I32Mul = 3 - I32DivS = 18 - I32DivU = 18 - I32RemS = 18 - I32RemU = 18 - I32And = 1 - I32Or = 1 - I32Xor = 1 - I32Shl = 3 - I32ShrS = 3 - I32ShrU = 3 - I32Rotl = 5 - I32Rotr = 5 - I64Clz = 100 - I64Ctz = 100 - I64Popcnt = 100 - I64Add = 1 - I64Sub = 1 - I64Mul = 3 - I64DivS = 18 - I64DivU = 18 - I64RemS = 18 - I64RemU = 18 - I64And = 1 - I64Or = 1 - I64Xor = 1 - I64Shl = 3 - I64ShrS = 3 - I64ShrU = 3 - I64Rotl = 5 - I64Rotr = 5 - F32Abs = 5 - F32Neg = 5 - F32Ceil = 100 - F32Floor = 100 - F32Trunc = 100 - F32Nearest = 100 - F32Sqrt = 100 - F32Add = 5 - F32Sub = 5 - F32Mul = 15 - F32Div = 100 - F32Min = 15 - F32Max = 15 - F32Copysign = 5 - F64Abs = 5 - F64Neg = 5 - F64Ceil = 100 - F64Floor = 100 - F64Trunc = 100 - F64Nearest = 100 - F64Sqrt = 100 - F64Add = 5 - F64Sub = 5 - F64Mul = 15 - F64Div = 100 - F64Min = 15 - F64Max = 15 - F64Copysign = 5 - I32WrapI64 = 9 - I32TruncF32S = 100 - I32TruncF32U = 100 - I32TruncF64S = 100 - I32TruncF64U = 100 - I64ExtendI32S = 9 - I64ExtendI32U = 9 - I64TruncF32S = 100 - I64TruncF32U = 100 - I64TruncF64S = 100 - I64TruncF64U = 100 - F32ConvertI32S = 100 - F32ConvertI32U = 100 - F32ConvertI64S = 100 - F32ConvertI64U = 100 - F32DemoteF64 = 100 - F64ConvertI32S = 100 - F64ConvertI32U = 100 - F64ConvertI64S = 100 - F64ConvertI64U = 100 - F64PromoteF32 = 100 - I32ReinterpretF32 = 100 - I64ReinterpretF64 = 100 - F32ReinterpretI32 = 100 - F64ReinterpretI64 = 100 - I32Extend8S = 9 - I32Extend16S = 9 - I64Extend8S = 9 - I64Extend16S = 9 - I64Extend32S = 9 - I32TruncSatF32S = 100 - I32TruncSatF32U = 100 - I32TruncSatF64S = 100 - I32TruncSatF64U = 100 - I64TruncSatF32S = 100 - I64TruncSatF32U = 100 - I64TruncSatF64S = 100 - I64TruncSatF64U = 100 - MemoryInit = 5 - DataDrop = 5 - MemoryCopy = 5 - MemoryFill = 5 - TableInit = 10 - ElemDrop = 10 - TableCopy = 10 - TableFill = 10 - TableGet = 10 - TableSet = 10 - TableGrow = 10 - TableSize = 10 - AtomicNotify = 10 - I32AtomicWait = 10 - I64AtomicWait = 10 - AtomicFence = 10 - I32AtomicLoad = 15 - I64AtomicLoad = 15 - I32AtomicLoad8U = 15 - I32AtomicLoad16U = 15 - I64AtomicLoad8U = 15 - I64AtomicLoad16U = 15 - I64AtomicLoad32U = 15 - I32AtomicStore = 15 - I64AtomicStore = 15 - I32AtomicStore8 = 15 - I32AtomicStore16 = 15 - I64AtomicStore8 = 15 - I64AtomicStore16 = 15 - I64AtomicStore32 = 15 - I32AtomicRmwAdd = 20 - I64AtomicRmwAdd = 20 - I32AtomicRmw8AddU = 20 - I32AtomicRmw16AddU = 20 - I64AtomicRmw8AddU = 20 - I64AtomicRmw16AddU = 20 - I64AtomicRmw32AddU = 20 - I32AtomicRmwSub = 20 - I64AtomicRmwSub = 20 - I32AtomicRmw8SubU = 20 - I32AtomicRmw16SubU = 20 - I64AtomicRmw8SubU = 20 - I64AtomicRmw16SubU = 20 - I64AtomicRmw32SubU = 20 - I32AtomicRmwAnd = 15 - I64AtomicRmwAnd = 15 - I32AtomicRmw8AndU = 15 - I32AtomicRmw16AndU = 15 - I64AtomicRmw8AndU = 15 - I64AtomicRmw16AndU = 15 - I64AtomicRmw32AndU = 15 - I32AtomicRmwOr = 15 - I64AtomicRmwOr = 15 - I32AtomicRmw8OrU = 15 - I32AtomicRmw16OrU = 15 - I64AtomicRmw8OrU = 15 - I64AtomicRmw16OrU = 15 - I64AtomicRmw32OrU = 15 - I32AtomicRmwXor = 15 - I64AtomicRmwXor = 15 - I32AtomicRmw8XorU = 15 - I32AtomicRmw16XorU = 15 - I64AtomicRmw8XorU = 15 - I64AtomicRmw16XorU = 15 - I64AtomicRmw32XorU = 15 - I32AtomicRmwXchg = 30 - I64AtomicRmwXchg = 30 - I32AtomicRmw8XchgU = 30 - I32AtomicRmw16XchgU = 30 - I64AtomicRmw8XchgU = 30 - I64AtomicRmw16XchgU = 30 - I64AtomicRmw32XchgU = 30 - I32AtomicRmwCmpxchg = 30 - I64AtomicRmwCmpxchg = 30 - I32AtomicRmw8CmpxchgU = 30 - I32AtomicRmw16CmpxchgU = 30 - I64AtomicRmw8CmpxchgU = 30 - I64AtomicRmw16CmpxchgU = 30 - I64AtomicRmw32CmpxchgU = 30 - V128Load = 18 - V128Store = 18 - V128Const = 18 - I8x16Splat = 20 - I8x16ExtractLaneS = 20 - I8x16ExtractLaneU = 20 - I8x16ReplaceLane = 20 - I16x8Splat = 20 - I16x8ExtractLaneS = 20 - I16x8ExtractLaneU = 20 - I16x8ReplaceLane = 20 - I32x4Splat = 20 - I32x4ExtractLane = 20 - I32x4ReplaceLane = 20 - I64x2Splat = 20 - I64x2ExtractLane = 20 - I64x2ReplaceLane = 20 - F32x4Splat = 120 - F32x4ExtractLane = 120 - F32x4ReplaceLane = 120 - F64x2Splat = 120 - F64x2ExtractLane = 120 - F64x2ReplaceLane = 120 - I8x16Eq = 30 - I8x16Ne = 30 - I8x16LtS = 40 - I8x16LtU = 40 - I8x16GtS = 40 - I8x16GtU = 40 - I8x16LeS = 40 - I8x16LeU = 40 - I8x16GeS = 40 - I8x16GeU = 40 - I16x8Eq = 30 - I16x8Ne = 30 - I16x8LtS = 40 - I16x8LtU = 40 - I16x8GtS = 40 - I16x8GtU = 40 - I16x8LeS = 40 - I16x8LeU = 40 - I16x8GeS = 40 - I16x8GeU = 40 - I32x4Eq = 30 - I32x4Ne = 30 - I32x4LtS = 40 - I32x4LtU = 40 - I32x4GtS = 40 - I32x4GtU = 40 - I32x4LeS = 40 - I32x4LeU = 40 - I32x4GeS = 40 - I32x4GeU = 40 - F32x4Eq = 120 - F32x4Ne = 120 - F32x4Lt = 120 - F32x4Gt = 120 - F32x4Le = 120 - F32x4Ge = 120 - F64x2Eq = 120 - F64x2Ne = 120 - F64x2Lt = 120 - F64x2Gt = 120 - F64x2Le = 120 - F64x2Ge = 120 - V128Not = 40 - V128And = 40 - V128AndNot = 40 - V128Or = 40 - V128Xor = 40 - V128Bitselect = 40 - I8x16Neg = 20 - I8x16AnyTrue = 20 - I8x16AllTrue = 20 - I8x16Shl = 30 - I8x16ShrS = 30 - I8x16ShrU = 30 - I8x16Add = 20 - I8x16AddSaturateS = 20 - I8x16AddSaturateU = 20 - I8x16Sub = 20 - I8x16SubSaturateS = 20 - I8x16SubSaturateU = 20 - I8x16MinS = 40 - I8x16MinU = 40 - I8x16MaxS = 40 - I8x16MaxU = 40 - I8x16Mul = 80 - I16x8Neg = 40 - I16x8AnyTrue = 40 - I16x8AllTrue = 40 - I16x8Shl = 30 - I16x8ShrS = 30 - I16x8ShrU = 30 - I16x8Add = 20 - I16x8AddSaturateS = 20 - I16x8AddSaturateU = 20 - I16x8Sub = 20 - I16x8SubSaturateS = 20 - I16x8SubSaturateU = 20 - I16x8Mul = 40 - I16x8MinS = 40 - I16x8MinU = 40 - I16x8MaxS = 40 - I16x8MaxU = 40 - I32x4Neg = 20 - I32x4AnyTrue = 20 - I32x4AllTrue = 20 - I32x4Shl = 30 - I32x4ShrS = 30 - I32x4ShrU = 30 - I32x4Add = 20 - I32x4Sub = 20 - I32x4Mul = 80 - I32x4MinS = 40 - I32x4MinU = 40 - I32x4MaxS = 40 - I32x4MaxU = 40 - I64x2Neg = 40 - I64x2AnyTrue = 20 - I64x2AllTrue = 20 - I64x2Shl = 30 - I64x2ShrS = 30 - I64x2ShrU = 30 - I64x2Add = 20 - I64x2Sub = 20 - I64x2Mul = 80 - F32x4Abs = 200 - F32x4Neg = 200 - F32x4Sqrt = 1000 - F32x4Add = 200 - F32x4Sub = 200 - F32x4Mul = 800 - F32x4Div = 1000 - F32x4Min = 500 - F32x4Max = 500 - F64x2Abs = 500 - F64x2Neg = 400 - F64x2Sqrt = 1000 - F64x2Add = 200 - F64x2Sub = 200 - F64x2Mul = 800 - F64x2Div = 1000 - F64x2Min = 500 - F64x2Max = 500 - I32x4TruncSatF32x4S = 1000 - I32x4TruncSatF32x4U = 1000 - I64x2TruncSatF64x2S = 1000 - I64x2TruncSatF64x2U = 1000 - F32x4ConvertI32x4S = 1000 - F32x4ConvertI32x4U = 1000 - F64x2ConvertI64x2S = 1000 - F64x2ConvertI64x2U = 1000 - V8x16Swizzle = 1200 - V8x16Shuffle = 1200 - V8x16LoadSplat = 40 - V16x8LoadSplat = 40 - V32x4LoadSplat = 40 - V64x2LoadSplat = 40 - I8x16NarrowI16x8S = 800 - I8x16NarrowI16x8U = 800 - I16x8NarrowI32x4S = 800 - I16x8NarrowI32x4U = 800 - I16x8WidenLowI8x16S = 800 - I16x8WidenHighI8x16S = 800 - I16x8WidenLowI8x16U = 800 - I16x8WidenHighI8x16U = 800 - I32x4WidenLowI16x8S = 800 - I32x4WidenHighI16x8S = 800 - I32x4WidenLowI16x8U = 800 - I32x4WidenHighI16x8U = 800 - I16x8Load8x8S = 400 - I16x8Load8x8U = 400 - I32x4Load16x4S = 400 - I32x4Load16x4U = 400 - I64x2Load32x2S = 400 - I64x2Load32x2U = 400 - I8x16RoundingAverageU = 200 - I16x8RoundingAverageU = 200 - LocalAllocate = 2 - LocalsUnmetered = 100 - MaxMemoryGrowDelta = 100 - MaxMemoryGrow = 100 - Catch = 1 - CatchAll = 1 - Delegate = 1 - F32x4Ceil = 1 - F32x4DemoteF64x2Zero = 1 - F32x4Floor = 1 - F32x4Nearest = 1 - F32x4PMax = 1 - F32x4PMin = 1 - F32x4Trunc = 1 - F64x2Ceil = 1 - F64x2ConvertLowI32x4S = 1 - F64x2ConvertLowI32x4U = 1 - F64x2Floor = 1 - F64x2Nearest = 1 - F64x2PMax = 1 - F64x2PMin = 1 - F64x2PromoteLowF32x4 = 1 - F64x2Trunc = 1 - I16x8Abs = 1 - I16x8AddSatS = 1 - I16x8AddSatU = 1 - I16x8Bitmask = 1 - I16x8ExtAddPairwiseI8x16S = 1 - I16x8ExtAddPairwiseI8x16U = 1 - I16x8ExtMulHighI8x16S = 1 - I16x8ExtMulHighI8x16U = 1 - I16x8ExtMulLowI8x16S = 1 - I16x8ExtMulLowI8x16U = 1 - I16x8ExtendHighI8x16S = 1 - I16x8ExtendHighI8x16U = 1 - I16x8ExtendLowI8x16S = 1 - I16x8ExtendLowI8x16U = 1 - I16x8Q15MulrSatS = 1 - I16x8SubSatS = 1 - I16x8SubSatU = 1 - I32x4Abs = 1 - I32x4Bitmask = 1 - I32x4DotI16x8S = 1 - I32x4ExtAddPairwiseI16x8S = 1 - I32x4ExtAddPairwiseI16x8U = 1 - I32x4ExtMulHighI16x8S = 1 - I32x4ExtMulHighI16x8U = 1 - I32x4ExtMulLowI16x8S = 1 - I32x4ExtMulLowI16x8U = 1 - I32x4ExtendHighI16x8S = 1 - I32x4ExtendHighI16x8U = 1 - I32x4ExtendLowI16x8S = 1 - I32x4ExtendLowI16x8U = 1 - I32x4TruncSatF64x2SZero = 1 - I32x4TruncSatF64x2UZero = 1 - I64x2Abs = 1 - I64x2Bitmask = 1 - I64x2Eq = 1 - I64x2ExtMulHighI32x4S = 1 - I64x2ExtMulHighI32x4U = 1 - I64x2ExtMulLowI32x4S = 1 - I64x2ExtMulLowI32x4U = 1 - I64x2ExtendHighI32x4S = 1 - I64x2ExtendHighI32x4U = 1 - I64x2ExtendLowI32x4S = 1 - I64x2ExtendLowI32x4U = 1 - I64x2GeS = 1 - I64x2GtS = 1 - I64x2LeS = 1 - I64x2LtS = 1 - I64x2Ne = 1 - I8x16Abs = 1 - I8x16AddSatS = 1 - I8x16AddSatU = 1 - I8x16Bitmask = 1 - I8x16Popcnt = 1 - I8x16Shuffle = 1 - I8x16SubSatS = 1 - I8x16SubSatU = 1 - I8x16Swizzle = 1 - MemoryAtomicNotify = 1 - MemoryAtomicWait32 = 1 - MemoryAtomicWait64 = 1 - Rethrow = 1 - ReturnCall = 1 - ReturnCallIndirect = 1 - Throw = 1 - Try = 1 - Unwind = 1 - V128AnyTrue = 1 - V128Load16Lane = 1 - V128Load16Splat = 1 - V128Load16x4S = 1 - V128Load16x4U = 1 - V128Load32Lane = 1 - V128Load32Splat = 1 - V128Load32Zero = 1 - V128Load32x2S = 1 - V128Load32x2U = 1 - V128Load64Lane = 1 - V128Load64Splat = 1 - V128Load64Zero = 1 - V128Load8Lane = 1 - V128Load8Splat = 1 - V128Load8x8S = 1 - V128Load8x8U = 1 - V128Store16Lane = 1 - V128Store32Lane = 1 - V128Store64Lane = 1 - V128Store8Lane = 1 - -[MaxPerTransaction] - MaxBuiltInCallsPerTx = 100 - MaxNumberOfTransfersPerTx = 250 - MaxNumberOfTrieReadsPerTx = 1500 - -# Quadratic, Linear and Constant are the coefficients for a quadratic func. Separate variables are used for the -# sign of each coefficient, 0 meaning positive and 1 meaning negative -# The current values for the coefficients were computed based on benchmarking. -# For the given coefficients, the minimum of the function must not be lower than MinimumGasCost -[DynamicStorageLoad] - QuadraticCoefficient = 688 - SignOfQuadratic = 0 - LinearCoefficient = 31858 - SignOfLinear = 0 - ConstantCoefficient = 15287 - SignOfConstant = 0 - MinimumGasCost = 10000 diff --git a/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV4.toml b/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV4.toml deleted file mode 100644 index f7d8e3a0..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV4.toml +++ /dev/null @@ -1,827 +0,0 @@ -[BuiltInCost] - ChangeOwnerAddress = 5000000 - ClaimDeveloperRewards = 5000000 - SaveUserName = 1000000 - SaveKeyValue = 100000 - ESDTTransfer = 200000 - ESDTBurn = 100000 - ESDTLocalMint = 50000 - ESDTLocalBurn = 50000 - ESDTNFTCreate = 150000 - ESDTNFTAddQuantity = 50000 - ESDTNFTBurn = 50000 - ESDTNFTTransfer = 200000 - ESDTNFTChangeCreateOwner = 1000000 - ESDTNFTAddUri = 50000 - ESDTNFTUpdateAttributes = 50000 - ESDTNFTMultiTransfer = 200000 - SetGuardian = 250000 - GuardAccount = 250000 - UnGuardAccount = 250000 - TrieLoadPerNode = 100000 - TrieStorePerNode = 50000 - -[MetaChainSystemSCsCost] - Stake = 5000000 - UnStake = 5000000 - UnBond = 5000000 - Claim = 5000000 - Get = 5000000 - ChangeRewardAddress = 5000000 - ChangeValidatorKeys = 5000000 - UnJail = 5000000 - DelegationOps = 1000000 - DelegationMgrOps = 50000000 - ValidatorToDelegation = 500000000 - ESDTIssue = 50000000 - ESDTOperations = 50000000 - Proposal = 50000000 - Vote = 50000000 - DelegateVote = 50000000 - RevokeVote = 50000000 - CloseProposal = 50000000 - GetAllNodeStates = 20000000 - UnstakeTokens = 5000000 - UnbondTokens = 5000000 - GetActiveFund = 50000 - FixWaitingListSize = 500000000 - -[BaseOperationCost] - StorePerByte = 10000 - ReleasePerByte = 1000 - DataCopyPerByte = 100 - PersistPerByte = 1000 - CompilePerByte = 300 - AoTPreparePerByte = 100 - GetCode = 1000000 - -[BaseOpsAPICost] - GetSCAddress = 100 - GetOwnerAddress = 5000 - IsSmartContract = 5000 - GetShardOfAddress = 5000 - GetExternalBalance = 7000 - GetBlockHash = 10000 - TransferValue = 100000 - GetArgument = 100 - GetFunction = 100 - GetNumArguments = 100 - StorageStore = 75000 - StorageLoad = 50000 - CachedStorageLoad = 50000 - GetCaller = 100 - GetCallValue = 100 - Log = 3750 - Finish = 1 - SignalError = 1 - GetBlockTimeStamp = 10000 - GetGasLeft = 100 - Int64GetArgument = 100 - Int64StorageStore = 75000 - Int64StorageLoad = 50000 - Int64Finish = 1000 - GetStateRootHash = 10000 - GetBlockNonce = 10000 - GetBlockEpoch = 10000 - GetBlockRound = 10000 - GetBlockRandomSeed = 10000 - ExecuteOnSameContext = 100000 - ExecuteOnDestContext = 100000 - DelegateExecution = 100000 - AsyncCallStep = 100000 - AsyncCallbackGasLock = 4000000 - CreateAsyncCall = 200000 - SetAsyncCallback = 100000 - SetAsyncGroupCallback = 100000 - SetAsyncContextCallback = 100000 - ExecuteReadOnly = 160000 - CreateContract = 300000 - GetReturnData = 100 - GetNumReturnData = 100 - GetReturnDataSize = 100 - CleanReturnData = 100 - DeleteFromReturnData = 100 - GetOriginalTxHash = 10000 - GetPrevTxHash = 10000 - GetCurrentTxHash = 10000 - GetCallbackClosure = 10000 - GetCodeMetadata = 10000 - IsBuiltinFunction = 10000 - -[EthAPICost] - UseGas = 100 - GetAddress = 100000 - GetExternalBalance = 70000 - GetBlockHash = 100000 - Call = 160000 - CallDataCopy = 200 - GetCallDataSize = 100 - CallCode = 160000 - CallDelegate = 160000 - CallStatic = 160000 - StorageStore = 250000 - StorageLoad = 100000 - GetCaller = 100 - GetCallValue = 100 - CodeCopy = 1000 - GetCodeSize = 100 - GetBlockCoinbase = 100 - Create = 320000 - GetBlockDifficulty = 100 - ExternalCodeCopy = 3000 - GetExternalCodeSize = 2500 - GetGasLeft = 100 - GetBlockGasLimit = 100000 - GetTxGasPrice = 1000 - Log = 3750 - GetBlockNumber = 100000 - GetTxOrigin = 100000 - Finish = 1 - Revert = 1 - GetReturnDataSize = 200 - ReturnDataCopy = 500 - SelfDestruct = 5000000 - GetBlockTimeStamp = 100000 - -[BigIntAPICost] - BigIntNew = 2000 - BigIntByteLength = 2000 - BigIntUnsignedByteLength = 2000 - BigIntSignedByteLength = 2000 - BigIntGetBytes = 2000 - BigIntGetUnsignedBytes = 2000 - BigIntGetSignedBytes = 2000 - BigIntSetBytes = 2000 - BigIntSetUnsignedBytes = 2000 - BigIntSetSignedBytes = 2000 - BigIntIsInt64 = 2000 - BigIntGetInt64 = 2000 - BigIntSetInt64 = 2000 - BigIntAdd = 2000 - BigIntSub = 2000 - BigIntMul = 6000 - BigIntSqrt = 6000 - BigIntPow = 6000 - BigIntLog = 6000 - BigIntTDiv = 6000 - BigIntTMod = 6000 - BigIntEDiv = 6000 - BigIntEMod = 6000 - BigIntAbs = 2000 - BigIntNeg = 2000 - BigIntSign = 2000 - BigIntCmp = 2000 - BigIntNot = 2000 - BigIntAnd = 2000 - BigIntOr = 2000 - BigIntXor = 2000 - BigIntShr = 2000 - BigIntShl = 2000 - BigIntFinishUnsigned = 1000 - BigIntFinishSigned = 1000 - BigIntStorageLoadUnsigned = 50000 - BigIntStorageStoreUnsigned = 75000 - BigIntGetArgument = 1000 - BigIntGetUnsignedArgument = 1000 - BigIntGetSignedArgument = 1000 - BigIntGetCallValue = 1000 - BigIntGetExternalBalance = 10000 - CopyPerByteForTooBig = 1000 - -[CryptoAPICost] - SHA256 = 1000000 - Keccak256 = 1000000 - Ripemd160 = 1000000 - VerifyBLS = 5000000 - VerifyEd25519 = 2000000 - VerifySecp256k1 = 2000000 - EllipticCurveNew = 10000 - AddECC = 75000 - DoubleECC = 65000 - IsOnCurveECC = 10000 - ScalarMultECC = 400000 - MarshalECC = 13000 - MarshalCompressedECC = 15000 - UnmarshalECC = 20000 - UnmarshalCompressedECC = 270000 - GenerateKeyECC = 7000000 - EncodeDERSig = 10000000 - -[ManagedBufferAPICost] - MBufferNew = 2000 - MBufferNewFromBytes = 2000 - MBufferGetLength = 2000 - MBufferGetBytes = 2000 - MBufferGetByteSlice = 2000 - MBufferCopyByteSlice = 2000 - MBufferSetBytes = 2000 - MBufferAppend = 2000 - MBufferAppendBytes = 2000 - MBufferToBigIntUnsigned = 2000 - MBufferToBigIntSigned = 5000 - MBufferFromBigIntUnsigned = 2000 - MBufferFromBigIntSigned = 5000 - MBufferStorageStore = 75000 - MBufferStorageLoad = 50000 - MBufferGetArgument = 1000 - MBufferFinish = 1000 - MBufferSetRandom = 6000 - MBufferToBigFloat = 2000 - MBufferFromBigFloat = 2000 - -[BigFloatAPICost] - BigFloatNewFromParts = 3000 - BigFloatAdd = 7000 - BigFloatSub = 7000 - BigFloatMul = 7000 - BigFloatDiv = 7000 - BigFloatTruncate = 5000 - BigFloatNeg = 5000 - BigFloatClone = 5000 - BigFloatCmp = 4000 - BigFloatAbs = 5000 - BigFloatSqrt = 7000 - BigFloatPow = 10000 - BigFloatFloor = 5000 - BigFloatCeil = 5000 - BigFloatIsInt = 3000 - BigFloatSetBigInt = 3000 - BigFloatSetInt64 = 1000 - BigFloatGetConst = 1000 - -[WASMOpcodeCost] - Unreachable = 5 - Nop = 5 - Block = 5 - Loop = 5 - If = 5 - Else = 5 - End = 5 - Br = 5 - BrIf = 5 - BrTable = 5 - Return = 5 - Call = 5 - CallIndirect = 5 - Drop = 5 - Select = 5 - TypedSelect = 5 - LocalGet = 5 - LocalSet = 5 - LocalTee = 5 - GlobalGet = 5 - GlobalSet = 5 - I32Load = 5 - I64Load = 5 - F32Load = 6 - F64Load = 6 - I32Load8S = 5 - I32Load8U = 5 - I32Load16S = 5 - I32Load16U = 5 - I64Load8S = 5 - I64Load8U = 5 - I64Load16S = 5 - I64Load16U = 5 - I64Load32S = 5 - I64Load32U = 5 - I32Store = 5 - I64Store = 5 - F32Store = 12 - F64Store = 12 - I32Store8 = 5 - I32Store16 = 5 - I64Store8 = 5 - I64Store16 = 5 - I64Store32 = 5 - MemorySize = 5 - MemoryGrow = 5 - I32Const = 5 - I64Const = 5 - F32Const = 5 - F64Const = 5 - RefNull = 5 - RefIsNull = 5 - RefFunc = 5 - I32Eqz = 5 - I32Eq = 5 - I32Ne = 5 - I32LtS = 5 - I32LtU = 5 - I32GtS = 5 - I32GtU = 5 - I32LeS = 5 - I32LeU = 5 - I32GeS = 5 - I32GeU = 5 - I64Eqz = 5 - I64Eq = 5 - I64Ne = 5 - I64LtS = 5 - I64LtU = 5 - I64GtS = 5 - I64GtU = 5 - I64LeS = 5 - I64LeU = 5 - I64GeS = 5 - I64GeU = 5 - F32Eq = 6 - F32Ne = 6 - F32Lt = 6 - F32Gt = 6 - F32Le = 6 - F32Ge = 6 - F64Eq = 6 - F64Ne = 6 - F64Lt = 6 - F64Gt = 6 - F64Le = 6 - F64Ge = 6 - I32Clz = 100 - I32Ctz = 100 - I32Popcnt = 100 - I32Add = 5 - I32Sub = 5 - I32Mul = 5 - I32DivS = 18 - I32DivU = 18 - I32RemS = 18 - I32RemU = 18 - I32And = 5 - I32Or = 5 - I32Xor = 5 - I32Shl = 5 - I32ShrS = 5 - I32ShrU = 5 - I32Rotl = 5 - I32Rotr = 5 - I64Clz = 100 - I64Ctz = 100 - I64Popcnt = 100 - I64Add = 5 - I64Sub = 5 - I64Mul = 5 - I64DivS = 18 - I64DivU = 18 - I64RemS = 18 - I64RemU = 18 - I64And = 5 - I64Or = 5 - I64Xor = 5 - I64Shl = 5 - I64ShrS = 5 - I64ShrU = 5 - I64Rotl = 5 - I64Rotr = 5 - F32Abs = 5 - F32Neg = 5 - F32Ceil = 100 - F32Floor = 100 - F32Trunc = 100 - F32Nearest = 100 - F32Sqrt = 100 - F32Add = 5 - F32Sub = 5 - F32Mul = 15 - F32Div = 100 - F32Min = 15 - F32Max = 15 - F32Copysign = 5 - F64Abs = 5 - F64Neg = 5 - F64Ceil = 100 - F64Floor = 100 - F64Trunc = 100 - F64Nearest = 100 - F64Sqrt = 100 - F64Add = 5 - F64Sub = 5 - F64Mul = 15 - F64Div = 100 - F64Min = 15 - F64Max = 15 - F64Copysign = 5 - I32WrapI64 = 9 - I32TruncF32S = 100 - I32TruncF32U = 100 - I32TruncF64S = 100 - I32TruncF64U = 100 - I64ExtendI32S = 9 - I64ExtendI32U = 9 - I64TruncF32S = 100 - I64TruncF32U = 100 - I64TruncF64S = 100 - I64TruncF64U = 100 - F32ConvertI32S = 100 - F32ConvertI32U = 100 - F32ConvertI64S = 100 - F32ConvertI64U = 100 - F32DemoteF64 = 100 - F64ConvertI32S = 100 - F64ConvertI32U = 100 - F64ConvertI64S = 100 - F64ConvertI64U = 100 - F64PromoteF32 = 100 - I32ReinterpretF32 = 100 - I64ReinterpretF64 = 100 - F32ReinterpretI32 = 100 - F64ReinterpretI64 = 100 - I32Extend8S = 9 - I32Extend16S = 9 - I64Extend8S = 9 - I64Extend16S = 9 - I64Extend32S = 9 - I32TruncSatF32S = 100 - I32TruncSatF32U = 100 - I32TruncSatF64S = 100 - I32TruncSatF64U = 100 - I64TruncSatF32S = 100 - I64TruncSatF32U = 100 - I64TruncSatF64S = 100 - I64TruncSatF64U = 100 - MemoryInit = 5 - DataDrop = 5 - MemoryCopy = 5 - MemoryFill = 5 - TableInit = 10 - ElemDrop = 10 - TableCopy = 10 - TableFill = 10 - TableGet = 10 - TableSet = 10 - TableGrow = 10 - TableSize = 10 - AtomicNotify = 10 - I32AtomicWait = 10 - I64AtomicWait = 10 - AtomicFence = 10 - I32AtomicLoad = 15 - I64AtomicLoad = 15 - I32AtomicLoad8U = 15 - I32AtomicLoad16U = 15 - I64AtomicLoad8U = 15 - I64AtomicLoad16U = 15 - I64AtomicLoad32U = 15 - I32AtomicStore = 15 - I64AtomicStore = 15 - I32AtomicStore8 = 15 - I32AtomicStore16 = 15 - I64AtomicStore8 = 15 - I64AtomicStore16 = 15 - I64AtomicStore32 = 15 - I32AtomicRmwAdd = 20 - I64AtomicRmwAdd = 20 - I32AtomicRmw8AddU = 20 - I32AtomicRmw16AddU = 20 - I64AtomicRmw8AddU = 20 - I64AtomicRmw16AddU = 20 - I64AtomicRmw32AddU = 20 - I32AtomicRmwSub = 20 - I64AtomicRmwSub = 20 - I32AtomicRmw8SubU = 20 - I32AtomicRmw16SubU = 20 - I64AtomicRmw8SubU = 20 - I64AtomicRmw16SubU = 20 - I64AtomicRmw32SubU = 20 - I32AtomicRmwAnd = 15 - I64AtomicRmwAnd = 15 - I32AtomicRmw8AndU = 15 - I32AtomicRmw16AndU = 15 - I64AtomicRmw8AndU = 15 - I64AtomicRmw16AndU = 15 - I64AtomicRmw32AndU = 15 - I32AtomicRmwOr = 15 - I64AtomicRmwOr = 15 - I32AtomicRmw8OrU = 15 - I32AtomicRmw16OrU = 15 - I64AtomicRmw8OrU = 15 - I64AtomicRmw16OrU = 15 - I64AtomicRmw32OrU = 15 - I32AtomicRmwXor = 15 - I64AtomicRmwXor = 15 - I32AtomicRmw8XorU = 15 - I32AtomicRmw16XorU = 15 - I64AtomicRmw8XorU = 15 - I64AtomicRmw16XorU = 15 - I64AtomicRmw32XorU = 15 - I32AtomicRmwXchg = 30 - I64AtomicRmwXchg = 30 - I32AtomicRmw8XchgU = 30 - I32AtomicRmw16XchgU = 30 - I64AtomicRmw8XchgU = 30 - I64AtomicRmw16XchgU = 30 - I64AtomicRmw32XchgU = 30 - I32AtomicRmwCmpxchg = 30 - I64AtomicRmwCmpxchg = 30 - I32AtomicRmw8CmpxchgU = 30 - I32AtomicRmw16CmpxchgU = 30 - I64AtomicRmw8CmpxchgU = 30 - I64AtomicRmw16CmpxchgU = 30 - I64AtomicRmw32CmpxchgU = 30 - V128Load = 18 - V128Store = 18 - V128Const = 18 - I8x16Splat = 20 - I8x16ExtractLaneS = 20 - I8x16ExtractLaneU = 20 - I8x16ReplaceLane = 20 - I16x8Splat = 20 - I16x8ExtractLaneS = 20 - I16x8ExtractLaneU = 20 - I16x8ReplaceLane = 20 - I32x4Splat = 20 - I32x4ExtractLane = 20 - I32x4ReplaceLane = 20 - I64x2Splat = 20 - I64x2ExtractLane = 20 - I64x2ReplaceLane = 20 - F32x4Splat = 120 - F32x4ExtractLane = 120 - F32x4ReplaceLane = 120 - F64x2Splat = 120 - F64x2ExtractLane = 120 - F64x2ReplaceLane = 120 - I8x16Eq = 30 - I8x16Ne = 30 - I8x16LtS = 40 - I8x16LtU = 40 - I8x16GtS = 40 - I8x16GtU = 40 - I8x16LeS = 40 - I8x16LeU = 40 - I8x16GeS = 40 - I8x16GeU = 40 - I16x8Eq = 30 - I16x8Ne = 30 - I16x8LtS = 40 - I16x8LtU = 40 - I16x8GtS = 40 - I16x8GtU = 40 - I16x8LeS = 40 - I16x8LeU = 40 - I16x8GeS = 40 - I16x8GeU = 40 - I32x4Eq = 30 - I32x4Ne = 30 - I32x4LtS = 40 - I32x4LtU = 40 - I32x4GtS = 40 - I32x4GtU = 40 - I32x4LeS = 40 - I32x4LeU = 40 - I32x4GeS = 40 - I32x4GeU = 40 - F32x4Eq = 120 - F32x4Ne = 120 - F32x4Lt = 120 - F32x4Gt = 120 - F32x4Le = 120 - F32x4Ge = 120 - F64x2Eq = 120 - F64x2Ne = 120 - F64x2Lt = 120 - F64x2Gt = 120 - F64x2Le = 120 - F64x2Ge = 120 - V128Not = 40 - V128And = 40 - V128AndNot = 40 - V128Or = 40 - V128Xor = 40 - V128Bitselect = 40 - I8x16Neg = 20 - I8x16AnyTrue = 20 - I8x16AllTrue = 20 - I8x16Shl = 30 - I8x16ShrS = 30 - I8x16ShrU = 30 - I8x16Add = 20 - I8x16AddSaturateS = 20 - I8x16AddSaturateU = 20 - I8x16Sub = 20 - I8x16SubSaturateS = 20 - I8x16SubSaturateU = 20 - I8x16MinS = 40 - I8x16MinU = 40 - I8x16MaxS = 40 - I8x16MaxU = 40 - I8x16Mul = 80 - I16x8Neg = 40 - I16x8AnyTrue = 40 - I16x8AllTrue = 40 - I16x8Shl = 30 - I16x8ShrS = 30 - I16x8ShrU = 30 - I16x8Add = 20 - I16x8AddSaturateS = 20 - I16x8AddSaturateU = 20 - I16x8Sub = 20 - I16x8SubSaturateS = 20 - I16x8SubSaturateU = 20 - I16x8Mul = 40 - I16x8MinS = 40 - I16x8MinU = 40 - I16x8MaxS = 40 - I16x8MaxU = 40 - I32x4Neg = 20 - I32x4AnyTrue = 20 - I32x4AllTrue = 20 - I32x4Shl = 30 - I32x4ShrS = 30 - I32x4ShrU = 30 - I32x4Add = 20 - I32x4Sub = 20 - I32x4Mul = 80 - I32x4MinS = 40 - I32x4MinU = 40 - I32x4MaxS = 40 - I32x4MaxU = 40 - I64x2Neg = 40 - I64x2AnyTrue = 20 - I64x2AllTrue = 20 - I64x2Shl = 30 - I64x2ShrS = 30 - I64x2ShrU = 30 - I64x2Add = 20 - I64x2Sub = 20 - I64x2Mul = 80 - F32x4Abs = 200 - F32x4Neg = 200 - F32x4Sqrt = 1000 - F32x4Add = 200 - F32x4Sub = 200 - F32x4Mul = 800 - F32x4Div = 1000 - F32x4Min = 500 - F32x4Max = 500 - F64x2Abs = 500 - F64x2Neg = 400 - F64x2Sqrt = 1000 - F64x2Add = 200 - F64x2Sub = 200 - F64x2Mul = 800 - F64x2Div = 1000 - F64x2Min = 500 - F64x2Max = 500 - I32x4TruncSatF32x4S = 1000 - I32x4TruncSatF32x4U = 1000 - I64x2TruncSatF64x2S = 1000 - I64x2TruncSatF64x2U = 1000 - F32x4ConvertI32x4S = 1000 - F32x4ConvertI32x4U = 1000 - F64x2ConvertI64x2S = 1000 - F64x2ConvertI64x2U = 1000 - V8x16Swizzle = 1200 - V8x16Shuffle = 1200 - V8x16LoadSplat = 40 - V16x8LoadSplat = 40 - V32x4LoadSplat = 40 - V64x2LoadSplat = 40 - I8x16NarrowI16x8S = 800 - I8x16NarrowI16x8U = 800 - I16x8NarrowI32x4S = 800 - I16x8NarrowI32x4U = 800 - I16x8WidenLowI8x16S = 800 - I16x8WidenHighI8x16S = 800 - I16x8WidenLowI8x16U = 800 - I16x8WidenHighI8x16U = 800 - I32x4WidenLowI16x8S = 800 - I32x4WidenHighI16x8S = 800 - I32x4WidenLowI16x8U = 800 - I32x4WidenHighI16x8U = 800 - I16x8Load8x8S = 400 - I16x8Load8x8U = 400 - I32x4Load16x4S = 400 - I32x4Load16x4U = 400 - I64x2Load32x2S = 400 - I64x2Load32x2U = 400 - I8x16RoundingAverageU = 200 - I16x8RoundingAverageU = 200 - LocalAllocate = 5 - LocalsUnmetered = 100 - MaxMemoryGrowDelta = 100 - MaxMemoryGrow = 100 - Catch = 1 - CatchAll = 1 - Delegate = 1 - F32x4Ceil = 1 - F32x4DemoteF64x2Zero = 1 - F32x4Floor = 1 - F32x4Nearest = 1 - F32x4PMax = 1 - F32x4PMin = 1 - F32x4Trunc = 1 - F64x2Ceil = 1 - F64x2ConvertLowI32x4S = 1 - F64x2ConvertLowI32x4U = 1 - F64x2Floor = 1 - F64x2Nearest = 1 - F64x2PMax = 1 - F64x2PMin = 1 - F64x2PromoteLowF32x4 = 1 - F64x2Trunc = 1 - I16x8Abs = 1 - I16x8AddSatS = 1 - I16x8AddSatU = 1 - I16x8Bitmask = 1 - I16x8ExtAddPairwiseI8x16S = 1 - I16x8ExtAddPairwiseI8x16U = 1 - I16x8ExtMulHighI8x16S = 1 - I16x8ExtMulHighI8x16U = 1 - I16x8ExtMulLowI8x16S = 1 - I16x8ExtMulLowI8x16U = 1 - I16x8ExtendHighI8x16S = 1 - I16x8ExtendHighI8x16U = 1 - I16x8ExtendLowI8x16S = 1 - I16x8ExtendLowI8x16U = 1 - I16x8Q15MulrSatS = 1 - I16x8SubSatS = 1 - I16x8SubSatU = 1 - I32x4Abs = 1 - I32x4Bitmask = 1 - I32x4DotI16x8S = 1 - I32x4ExtAddPairwiseI16x8S = 1 - I32x4ExtAddPairwiseI16x8U = 1 - I32x4ExtMulHighI16x8S = 1 - I32x4ExtMulHighI16x8U = 1 - I32x4ExtMulLowI16x8S = 1 - I32x4ExtMulLowI16x8U = 1 - I32x4ExtendHighI16x8S = 1 - I32x4ExtendHighI16x8U = 1 - I32x4ExtendLowI16x8S = 1 - I32x4ExtendLowI16x8U = 1 - I32x4TruncSatF64x2SZero = 1 - I32x4TruncSatF64x2UZero = 1 - I64x2Abs = 1 - I64x2Bitmask = 1 - I64x2Eq = 1 - I64x2ExtMulHighI32x4S = 1 - I64x2ExtMulHighI32x4U = 1 - I64x2ExtMulLowI32x4S = 1 - I64x2ExtMulLowI32x4U = 1 - I64x2ExtendHighI32x4S = 1 - I64x2ExtendHighI32x4U = 1 - I64x2ExtendLowI32x4S = 1 - I64x2ExtendLowI32x4U = 1 - I64x2GeS = 1 - I64x2GtS = 1 - I64x2LeS = 1 - I64x2LtS = 1 - I64x2Ne = 1 - I8x16Abs = 1 - I8x16AddSatS = 1 - I8x16AddSatU = 1 - I8x16Bitmask = 1 - I8x16Popcnt = 1 - I8x16Shuffle = 1 - I8x16SubSatS = 1 - I8x16SubSatU = 1 - I8x16Swizzle = 1 - MemoryAtomicNotify = 1 - MemoryAtomicWait32 = 1 - MemoryAtomicWait64 = 1 - Rethrow = 1 - ReturnCall = 1 - ReturnCallIndirect = 1 - Throw = 1 - Try = 1 - Unwind = 1 - V128AnyTrue = 1 - V128Load16Lane = 1 - V128Load16Splat = 1 - V128Load16x4S = 1 - V128Load16x4U = 1 - V128Load32Lane = 1 - V128Load32Splat = 1 - V128Load32Zero = 1 - V128Load32x2S = 1 - V128Load32x2U = 1 - V128Load64Lane = 1 - V128Load64Splat = 1 - V128Load64Zero = 1 - V128Load8Lane = 1 - V128Load8Splat = 1 - V128Load8x8S = 1 - V128Load8x8U = 1 - V128Store16Lane = 1 - V128Store32Lane = 1 - V128Store64Lane = 1 - V128Store8Lane = 1 - -[MaxPerTransaction] - MaxBuiltInCallsPerTx = 100 - MaxNumberOfTransfersPerTx = 250 - MaxNumberOfTrieReadsPerTx = 1500 - -# Quadratic, Linear and Constant are the coefficients for a quadratic func. Separate variables are used for the -# sign of each coefficient, 0 meaning positive and 1 meaning negative -# The current values for the coefficients were computed based on benchmarking. -# For the given coefficients, the minimum of the function must not be lower than MinimumGasCost -[DynamicStorageLoad] - QuadraticCoefficient = 688 - SignOfQuadratic = 0 - LinearCoefficient = 31858 - SignOfLinear = 0 - ConstantCoefficient = 15287 - SignOfConstant = 0 - MinimumGasCost = 10000 diff --git a/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV5.toml b/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV5.toml deleted file mode 100644 index 9e2b3ae7..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV5.toml +++ /dev/null @@ -1,827 +0,0 @@ -[BuiltInCost] - ChangeOwnerAddress = 5000000 - ClaimDeveloperRewards = 5000000 - SaveUserName = 1000000 - SaveKeyValue = 100000 - ESDTTransfer = 200000 - ESDTBurn = 100000 - ESDTLocalMint = 50000 - ESDTLocalBurn = 50000 - ESDTNFTCreate = 150000 - ESDTNFTAddQuantity = 50000 - ESDTNFTBurn = 50000 - ESDTNFTTransfer = 200000 - ESDTNFTChangeCreateOwner = 1000000 - ESDTNFTAddUri = 50000 - ESDTNFTUpdateAttributes = 50000 - ESDTNFTMultiTransfer = 200000 - SetGuardian = 250000 - GuardAccount = 250000 - UnGuardAccount = 250000 - TrieLoadPerNode = 100000 - TrieStorePerNode = 50000 - -[MetaChainSystemSCsCost] - Stake = 5000000 - UnStake = 5000000 - UnBond = 5000000 - Claim = 5000000 - Get = 5000000 - ChangeRewardAddress = 5000000 - ChangeValidatorKeys = 5000000 - UnJail = 5000000 - DelegationOps = 1000000 - DelegationMgrOps = 50000000 - ValidatorToDelegation = 500000000 - ESDTIssue = 50000000 - ESDTOperations = 50000000 - Proposal = 50000000 - Vote = 50000000 - DelegateVote = 50000000 - RevokeVote = 50000000 - CloseProposal = 50000000 - GetAllNodeStates = 20000000 - UnstakeTokens = 5000000 - UnbondTokens = 5000000 - GetActiveFund = 50000 - FixWaitingListSize = 500000000 - -[BaseOperationCost] - StorePerByte = 10000 - ReleasePerByte = 1000 - DataCopyPerByte = 100 - PersistPerByte = 1000 - CompilePerByte = 300 - AoTPreparePerByte = 100 - GetCode = 1000000 - -[BaseOpsAPICost] - GetSCAddress = 100 - GetOwnerAddress = 5000 - IsSmartContract = 5000 - GetShardOfAddress = 5000 - GetExternalBalance = 7000 - GetBlockHash = 10000 - TransferValue = 100000 - GetArgument = 100 - GetFunction = 100 - GetNumArguments = 100 - StorageStore = 75000 - StorageLoad = 50000 - CachedStorageLoad = 50000 - GetCaller = 100 - GetCallValue = 100 - Log = 3750 - Finish = 1 - SignalError = 1 - GetBlockTimeStamp = 10000 - GetGasLeft = 100 - Int64GetArgument = 100 - Int64StorageStore = 75000 - Int64StorageLoad = 50000 - Int64Finish = 1000 - GetStateRootHash = 10000 - GetBlockNonce = 10000 - GetBlockEpoch = 10000 - GetBlockRound = 10000 - GetBlockRandomSeed = 10000 - ExecuteOnSameContext = 100000 - ExecuteOnDestContext = 100000 - DelegateExecution = 100000 - AsyncCallStep = 100000 - AsyncCallbackGasLock = 4000000 - ExecuteReadOnly = 160000 - CreateContract = 300000 - GetReturnData = 100 - GetNumReturnData = 100 - GetReturnDataSize = 100 - CleanReturnData = 100 - DeleteFromReturnData = 100 - GetOriginalTxHash = 10000 - GetPrevTxHash = 10000 - GetCurrentTxHash = 10000 - CreateAsyncCall = 200000 - SetAsyncCallback = 100000 - SetAsyncGroupCallback = 100000 - SetAsyncContextCallback = 100000 - GetCallbackClosure = 10000 - GetCodeMetadata = 10000 - IsBuiltinFunction = 10000 - -[EthAPICost] - UseGas = 100 - GetAddress = 100000 - GetExternalBalance = 70000 - GetBlockHash = 100000 - Call = 160000 - CallDataCopy = 200 - GetCallDataSize = 100 - CallCode = 160000 - CallDelegate = 160000 - CallStatic = 160000 - StorageStore = 250000 - StorageLoad = 100000 - GetCaller = 100 - GetCallValue = 100 - CodeCopy = 1000 - GetCodeSize = 100 - GetBlockCoinbase = 100 - Create = 320000 - GetBlockDifficulty = 100 - ExternalCodeCopy = 3000 - GetExternalCodeSize = 2500 - GetGasLeft = 100 - GetBlockGasLimit = 100000 - GetTxGasPrice = 1000 - Log = 3750 - GetBlockNumber = 100000 - GetTxOrigin = 100000 - Finish = 1 - Revert = 1 - GetReturnDataSize = 200 - ReturnDataCopy = 500 - SelfDestruct = 5000000 - GetBlockTimeStamp = 100000 - -[BigIntAPICost] - BigIntNew = 2000 - BigIntByteLength = 2000 - BigIntUnsignedByteLength = 2000 - BigIntSignedByteLength = 2000 - BigIntGetBytes = 2000 - BigIntGetUnsignedBytes = 2000 - BigIntGetSignedBytes = 2000 - BigIntSetBytes = 2000 - BigIntSetUnsignedBytes = 2000 - BigIntSetSignedBytes = 2000 - BigIntIsInt64 = 2000 - BigIntGetInt64 = 2000 - BigIntSetInt64 = 2000 - BigIntAdd = 2000 - BigIntSub = 2000 - BigIntMul = 6000 - BigIntSqrt = 6000 - BigIntPow = 6000 - BigIntLog = 6000 - BigIntTDiv = 6000 - BigIntTMod = 6000 - BigIntEDiv = 6000 - BigIntEMod = 6000 - BigIntAbs = 2000 - BigIntNeg = 2000 - BigIntSign = 2000 - BigIntCmp = 2000 - BigIntNot = 2000 - BigIntAnd = 2000 - BigIntOr = 2000 - BigIntXor = 2000 - BigIntShr = 2000 - BigIntShl = 2000 - BigIntFinishUnsigned = 1000 - BigIntFinishSigned = 1000 - BigIntStorageLoadUnsigned = 50000 - BigIntStorageStoreUnsigned = 75000 - BigIntGetArgument = 1000 - BigIntGetUnsignedArgument = 1000 - BigIntGetSignedArgument = 1000 - BigIntGetCallValue = 1000 - BigIntGetExternalBalance = 10000 - CopyPerByteForTooBig = 1000 - -[CryptoAPICost] - SHA256 = 1000000 - Keccak256 = 1000000 - Ripemd160 = 1000000 - VerifyBLS = 5000000 - VerifyEd25519 = 2000000 - VerifySecp256k1 = 2000000 - EllipticCurveNew = 10000 - AddECC = 75000 - DoubleECC = 65000 - IsOnCurveECC = 10000 - ScalarMultECC = 400000 - MarshalECC = 13000 - MarshalCompressedECC = 15000 - UnmarshalECC = 20000 - UnmarshalCompressedECC = 270000 - GenerateKeyECC = 7000000 - EncodeDERSig = 10000000 - -[ManagedBufferAPICost] - MBufferNew = 2000 - MBufferNewFromBytes = 2000 - MBufferGetLength = 2000 - MBufferGetBytes = 2000 - MBufferGetByteSlice = 2000 - MBufferCopyByteSlice = 2000 - MBufferSetBytes = 2000 - MBufferAppend = 2000 - MBufferAppendBytes = 2000 - MBufferToBigIntUnsigned = 2000 - MBufferToBigIntSigned = 5000 - MBufferFromBigIntUnsigned = 2000 - MBufferFromBigIntSigned = 5000 - MBufferStorageStore = 75000 - MBufferStorageLoad = 50000 - MBufferGetArgument = 1000 - MBufferFinish = 1000 - MBufferSetRandom = 6000 - MBufferToBigFloat = 2000 - MBufferFromBigFloat = 2000 - -[BigFloatAPICost] - BigFloatNewFromParts = 3000 - BigFloatAdd = 7000 - BigFloatSub = 7000 - BigFloatMul = 7000 - BigFloatDiv = 7000 - BigFloatTruncate = 5000 - BigFloatNeg = 5000 - BigFloatClone = 5000 - BigFloatCmp = 4000 - BigFloatAbs = 5000 - BigFloatSqrt = 7000 - BigFloatPow = 10000 - BigFloatFloor = 5000 - BigFloatCeil = 5000 - BigFloatIsInt = 3000 - BigFloatSetBigInt = 3000 - BigFloatSetInt64 = 1000 - BigFloatGetConst = 1000 - -[WASMOpcodeCost] - Unreachable = 5 - Nop = 5 - Block = 5 - Loop = 5 - If = 5 - Else = 5 - End = 5 - Br = 5 - BrIf = 5 - BrTable = 5 - Return = 5 - Call = 5 - CallIndirect = 5 - Drop = 5 - Select = 5 - TypedSelect = 5 - LocalGet = 5 - LocalSet = 5 - LocalTee = 5 - GlobalGet = 5 - GlobalSet = 5 - I32Load = 5 - I64Load = 5 - F32Load = 6 - F64Load = 6 - I32Load8S = 5 - I32Load8U = 5 - I32Load16S = 5 - I32Load16U = 5 - I64Load8S = 5 - I64Load8U = 5 - I64Load16S = 5 - I64Load16U = 5 - I64Load32S = 5 - I64Load32U = 5 - I32Store = 5 - I64Store = 5 - F32Store = 12 - F64Store = 12 - I32Store8 = 5 - I32Store16 = 5 - I64Store8 = 5 - I64Store16 = 5 - I64Store32 = 5 - MemorySize = 5 - MemoryGrow = 250000000 - I32Const = 5 - I64Const = 5 - F32Const = 5 - F64Const = 5 - RefNull = 5 - RefIsNull = 5 - RefFunc = 5 - I32Eqz = 5 - I32Eq = 5 - I32Ne = 5 - I32LtS = 5 - I32LtU = 5 - I32GtS = 5 - I32GtU = 5 - I32LeS = 5 - I32LeU = 5 - I32GeS = 5 - I32GeU = 5 - I64Eqz = 5 - I64Eq = 5 - I64Ne = 5 - I64LtS = 5 - I64LtU = 5 - I64GtS = 5 - I64GtU = 5 - I64LeS = 5 - I64LeU = 5 - I64GeS = 5 - I64GeU = 5 - F32Eq = 6 - F32Ne = 6 - F32Lt = 6 - F32Gt = 6 - F32Le = 6 - F32Ge = 6 - F64Eq = 6 - F64Ne = 6 - F64Lt = 6 - F64Gt = 6 - F64Le = 6 - F64Ge = 6 - I32Clz = 100 - I32Ctz = 100 - I32Popcnt = 100 - I32Add = 5 - I32Sub = 5 - I32Mul = 5 - I32DivS = 18 - I32DivU = 18 - I32RemS = 18 - I32RemU = 18 - I32And = 5 - I32Or = 5 - I32Xor = 5 - I32Shl = 5 - I32ShrS = 5 - I32ShrU = 5 - I32Rotl = 5 - I32Rotr = 5 - I64Clz = 100 - I64Ctz = 100 - I64Popcnt = 100 - I64Add = 5 - I64Sub = 5 - I64Mul = 5 - I64DivS = 18 - I64DivU = 18 - I64RemS = 18 - I64RemU = 18 - I64And = 5 - I64Or = 5 - I64Xor = 5 - I64Shl = 5 - I64ShrS = 5 - I64ShrU = 5 - I64Rotl = 5 - I64Rotr = 5 - F32Abs = 5 - F32Neg = 5 - F32Ceil = 100 - F32Floor = 100 - F32Trunc = 100 - F32Nearest = 100 - F32Sqrt = 100 - F32Add = 5 - F32Sub = 5 - F32Mul = 15 - F32Div = 100 - F32Min = 15 - F32Max = 15 - F32Copysign = 5 - F64Abs = 5 - F64Neg = 5 - F64Ceil = 100 - F64Floor = 100 - F64Trunc = 100 - F64Nearest = 100 - F64Sqrt = 100 - F64Add = 5 - F64Sub = 5 - F64Mul = 15 - F64Div = 100 - F64Min = 15 - F64Max = 15 - F64Copysign = 5 - I32WrapI64 = 9 - I32TruncF32S = 100 - I32TruncF32U = 100 - I32TruncF64S = 100 - I32TruncF64U = 100 - I64ExtendI32S = 9 - I64ExtendI32U = 9 - I64TruncF32S = 100 - I64TruncF32U = 100 - I64TruncF64S = 100 - I64TruncF64U = 100 - F32ConvertI32S = 100 - F32ConvertI32U = 100 - F32ConvertI64S = 100 - F32ConvertI64U = 100 - F32DemoteF64 = 100 - F64ConvertI32S = 100 - F64ConvertI32U = 100 - F64ConvertI64S = 100 - F64ConvertI64U = 100 - F64PromoteF32 = 100 - I32ReinterpretF32 = 100 - I64ReinterpretF64 = 100 - F32ReinterpretI32 = 100 - F64ReinterpretI64 = 100 - I32Extend8S = 9 - I32Extend16S = 9 - I64Extend8S = 9 - I64Extend16S = 9 - I64Extend32S = 9 - I32TruncSatF32S = 100 - I32TruncSatF32U = 100 - I32TruncSatF64S = 100 - I32TruncSatF64U = 100 - I64TruncSatF32S = 100 - I64TruncSatF32U = 100 - I64TruncSatF64S = 100 - I64TruncSatF64U = 100 - MemoryInit = 5 - DataDrop = 5 - MemoryCopy = 5 - MemoryFill = 5 - TableInit = 10 - ElemDrop = 10 - TableCopy = 10 - TableFill = 10 - TableGet = 10 - TableSet = 10 - TableGrow = 10 - TableSize = 10 - AtomicNotify = 10 - I32AtomicWait = 10 - I64AtomicWait = 10 - AtomicFence = 10 - I32AtomicLoad = 15 - I64AtomicLoad = 15 - I32AtomicLoad8U = 15 - I32AtomicLoad16U = 15 - I64AtomicLoad8U = 15 - I64AtomicLoad16U = 15 - I64AtomicLoad32U = 15 - I32AtomicStore = 15 - I64AtomicStore = 15 - I32AtomicStore8 = 15 - I32AtomicStore16 = 15 - I64AtomicStore8 = 15 - I64AtomicStore16 = 15 - I64AtomicStore32 = 15 - I32AtomicRmwAdd = 20 - I64AtomicRmwAdd = 20 - I32AtomicRmw8AddU = 20 - I32AtomicRmw16AddU = 20 - I64AtomicRmw8AddU = 20 - I64AtomicRmw16AddU = 20 - I64AtomicRmw32AddU = 20 - I32AtomicRmwSub = 20 - I64AtomicRmwSub = 20 - I32AtomicRmw8SubU = 20 - I32AtomicRmw16SubU = 20 - I64AtomicRmw8SubU = 20 - I64AtomicRmw16SubU = 20 - I64AtomicRmw32SubU = 20 - I32AtomicRmwAnd = 15 - I64AtomicRmwAnd = 15 - I32AtomicRmw8AndU = 15 - I32AtomicRmw16AndU = 15 - I64AtomicRmw8AndU = 15 - I64AtomicRmw16AndU = 15 - I64AtomicRmw32AndU = 15 - I32AtomicRmwOr = 15 - I64AtomicRmwOr = 15 - I32AtomicRmw8OrU = 15 - I32AtomicRmw16OrU = 15 - I64AtomicRmw8OrU = 15 - I64AtomicRmw16OrU = 15 - I64AtomicRmw32OrU = 15 - I32AtomicRmwXor = 15 - I64AtomicRmwXor = 15 - I32AtomicRmw8XorU = 15 - I32AtomicRmw16XorU = 15 - I64AtomicRmw8XorU = 15 - I64AtomicRmw16XorU = 15 - I64AtomicRmw32XorU = 15 - I32AtomicRmwXchg = 30 - I64AtomicRmwXchg = 30 - I32AtomicRmw8XchgU = 30 - I32AtomicRmw16XchgU = 30 - I64AtomicRmw8XchgU = 30 - I64AtomicRmw16XchgU = 30 - I64AtomicRmw32XchgU = 30 - I32AtomicRmwCmpxchg = 30 - I64AtomicRmwCmpxchg = 30 - I32AtomicRmw8CmpxchgU = 30 - I32AtomicRmw16CmpxchgU = 30 - I64AtomicRmw8CmpxchgU = 30 - I64AtomicRmw16CmpxchgU = 30 - I64AtomicRmw32CmpxchgU = 30 - V128Load = 18 - V128Store = 18 - V128Const = 18 - I8x16Splat = 20 - I8x16ExtractLaneS = 20 - I8x16ExtractLaneU = 20 - I8x16ReplaceLane = 20 - I16x8Splat = 20 - I16x8ExtractLaneS = 20 - I16x8ExtractLaneU = 20 - I16x8ReplaceLane = 20 - I32x4Splat = 20 - I32x4ExtractLane = 20 - I32x4ReplaceLane = 20 - I64x2Splat = 20 - I64x2ExtractLane = 20 - I64x2ReplaceLane = 20 - F32x4Splat = 120 - F32x4ExtractLane = 120 - F32x4ReplaceLane = 120 - F64x2Splat = 120 - F64x2ExtractLane = 120 - F64x2ReplaceLane = 120 - I8x16Eq = 30 - I8x16Ne = 30 - I8x16LtS = 40 - I8x16LtU = 40 - I8x16GtS = 40 - I8x16GtU = 40 - I8x16LeS = 40 - I8x16LeU = 40 - I8x16GeS = 40 - I8x16GeU = 40 - I16x8Eq = 30 - I16x8Ne = 30 - I16x8LtS = 40 - I16x8LtU = 40 - I16x8GtS = 40 - I16x8GtU = 40 - I16x8LeS = 40 - I16x8LeU = 40 - I16x8GeS = 40 - I16x8GeU = 40 - I32x4Eq = 30 - I32x4Ne = 30 - I32x4LtS = 40 - I32x4LtU = 40 - I32x4GtS = 40 - I32x4GtU = 40 - I32x4LeS = 40 - I32x4LeU = 40 - I32x4GeS = 40 - I32x4GeU = 40 - F32x4Eq = 120 - F32x4Ne = 120 - F32x4Lt = 120 - F32x4Gt = 120 - F32x4Le = 120 - F32x4Ge = 120 - F64x2Eq = 120 - F64x2Ne = 120 - F64x2Lt = 120 - F64x2Gt = 120 - F64x2Le = 120 - F64x2Ge = 120 - V128Not = 40 - V128And = 40 - V128AndNot = 40 - V128Or = 40 - V128Xor = 40 - V128Bitselect = 40 - I8x16Neg = 20 - I8x16AnyTrue = 20 - I8x16AllTrue = 20 - I8x16Shl = 30 - I8x16ShrS = 30 - I8x16ShrU = 30 - I8x16Add = 20 - I8x16AddSaturateS = 20 - I8x16AddSaturateU = 20 - I8x16Sub = 20 - I8x16SubSaturateS = 20 - I8x16SubSaturateU = 20 - I8x16MinS = 40 - I8x16MinU = 40 - I8x16MaxS = 40 - I8x16MaxU = 40 - I8x16Mul = 80 - I16x8Neg = 40 - I16x8AnyTrue = 40 - I16x8AllTrue = 40 - I16x8Shl = 30 - I16x8ShrS = 30 - I16x8ShrU = 30 - I16x8Add = 20 - I16x8AddSaturateS = 20 - I16x8AddSaturateU = 20 - I16x8Sub = 20 - I16x8SubSaturateS = 20 - I16x8SubSaturateU = 20 - I16x8Mul = 40 - I16x8MinS = 40 - I16x8MinU = 40 - I16x8MaxS = 40 - I16x8MaxU = 40 - I32x4Neg = 20 - I32x4AnyTrue = 20 - I32x4AllTrue = 20 - I32x4Shl = 30 - I32x4ShrS = 30 - I32x4ShrU = 30 - I32x4Add = 20 - I32x4Sub = 20 - I32x4Mul = 80 - I32x4MinS = 40 - I32x4MinU = 40 - I32x4MaxS = 40 - I32x4MaxU = 40 - I64x2Neg = 40 - I64x2AnyTrue = 20 - I64x2AllTrue = 20 - I64x2Shl = 30 - I64x2ShrS = 30 - I64x2ShrU = 30 - I64x2Add = 20 - I64x2Sub = 20 - I64x2Mul = 80 - F32x4Abs = 200 - F32x4Neg = 200 - F32x4Sqrt = 1000 - F32x4Add = 200 - F32x4Sub = 200 - F32x4Mul = 800 - F32x4Div = 1000 - F32x4Min = 500 - F32x4Max = 500 - F64x2Abs = 500 - F64x2Neg = 400 - F64x2Sqrt = 1000 - F64x2Add = 200 - F64x2Sub = 200 - F64x2Mul = 800 - F64x2Div = 1000 - F64x2Min = 500 - F64x2Max = 500 - I32x4TruncSatF32x4S = 1000 - I32x4TruncSatF32x4U = 1000 - I64x2TruncSatF64x2S = 1000 - I64x2TruncSatF64x2U = 1000 - F32x4ConvertI32x4S = 1000 - F32x4ConvertI32x4U = 1000 - F64x2ConvertI64x2S = 1000 - F64x2ConvertI64x2U = 1000 - V8x16Swizzle = 1200 - V8x16Shuffle = 1200 - V8x16LoadSplat = 40 - V16x8LoadSplat = 40 - V32x4LoadSplat = 40 - V64x2LoadSplat = 40 - I8x16NarrowI16x8S = 800 - I8x16NarrowI16x8U = 800 - I16x8NarrowI32x4S = 800 - I16x8NarrowI32x4U = 800 - I16x8WidenLowI8x16S = 800 - I16x8WidenHighI8x16S = 800 - I16x8WidenLowI8x16U = 800 - I16x8WidenHighI8x16U = 800 - I32x4WidenLowI16x8S = 800 - I32x4WidenHighI16x8S = 800 - I32x4WidenLowI16x8U = 800 - I32x4WidenHighI16x8U = 800 - I16x8Load8x8S = 400 - I16x8Load8x8U = 400 - I32x4Load16x4S = 400 - I32x4Load16x4U = 400 - I64x2Load32x2S = 400 - I64x2Load32x2U = 400 - I8x16RoundingAverageU = 200 - I16x8RoundingAverageU = 200 - LocalAllocate = 5 - LocalsUnmetered = 100 - MaxMemoryGrowDelta = 100 - MaxMemoryGrow = 100 - Catch = 1 - CatchAll = 1 - Delegate = 1 - F32x4Ceil = 1 - F32x4DemoteF64x2Zero = 1 - F32x4Floor = 1 - F32x4Nearest = 1 - F32x4PMax = 1 - F32x4PMin = 1 - F32x4Trunc = 1 - F64x2Ceil = 1 - F64x2ConvertLowI32x4S = 1 - F64x2ConvertLowI32x4U = 1 - F64x2Floor = 1 - F64x2Nearest = 1 - F64x2PMax = 1 - F64x2PMin = 1 - F64x2PromoteLowF32x4 = 1 - F64x2Trunc = 1 - I16x8Abs = 1 - I16x8AddSatS = 1 - I16x8AddSatU = 1 - I16x8Bitmask = 1 - I16x8ExtAddPairwiseI8x16S = 1 - I16x8ExtAddPairwiseI8x16U = 1 - I16x8ExtMulHighI8x16S = 1 - I16x8ExtMulHighI8x16U = 1 - I16x8ExtMulLowI8x16S = 1 - I16x8ExtMulLowI8x16U = 1 - I16x8ExtendHighI8x16S = 1 - I16x8ExtendHighI8x16U = 1 - I16x8ExtendLowI8x16S = 1 - I16x8ExtendLowI8x16U = 1 - I16x8Q15MulrSatS = 1 - I16x8SubSatS = 1 - I16x8SubSatU = 1 - I32x4Abs = 1 - I32x4Bitmask = 1 - I32x4DotI16x8S = 1 - I32x4ExtAddPairwiseI16x8S = 1 - I32x4ExtAddPairwiseI16x8U = 1 - I32x4ExtMulHighI16x8S = 1 - I32x4ExtMulHighI16x8U = 1 - I32x4ExtMulLowI16x8S = 1 - I32x4ExtMulLowI16x8U = 1 - I32x4ExtendHighI16x8S = 1 - I32x4ExtendHighI16x8U = 1 - I32x4ExtendLowI16x8S = 1 - I32x4ExtendLowI16x8U = 1 - I32x4TruncSatF64x2SZero = 1 - I32x4TruncSatF64x2UZero = 1 - I64x2Abs = 1 - I64x2Bitmask = 1 - I64x2Eq = 1 - I64x2ExtMulHighI32x4S = 1 - I64x2ExtMulHighI32x4U = 1 - I64x2ExtMulLowI32x4S = 1 - I64x2ExtMulLowI32x4U = 1 - I64x2ExtendHighI32x4S = 1 - I64x2ExtendHighI32x4U = 1 - I64x2ExtendLowI32x4S = 1 - I64x2ExtendLowI32x4U = 1 - I64x2GeS = 1 - I64x2GtS = 1 - I64x2LeS = 1 - I64x2LtS = 1 - I64x2Ne = 1 - I8x16Abs = 1 - I8x16AddSatS = 1 - I8x16AddSatU = 1 - I8x16Bitmask = 1 - I8x16Popcnt = 1 - I8x16Shuffle = 1 - I8x16SubSatS = 1 - I8x16SubSatU = 1 - I8x16Swizzle = 1 - MemoryAtomicNotify = 1 - MemoryAtomicWait32 = 1 - MemoryAtomicWait64 = 1 - Rethrow = 1 - ReturnCall = 1 - ReturnCallIndirect = 1 - Throw = 1 - Try = 1 - Unwind = 1 - V128AnyTrue = 1 - V128Load16Lane = 1 - V128Load16Splat = 1 - V128Load16x4S = 1 - V128Load16x4U = 1 - V128Load32Lane = 1 - V128Load32Splat = 1 - V128Load32Zero = 1 - V128Load32x2S = 1 - V128Load32x2U = 1 - V128Load64Lane = 1 - V128Load64Splat = 1 - V128Load64Zero = 1 - V128Load8Lane = 1 - V128Load8Splat = 1 - V128Load8x8S = 1 - V128Load8x8U = 1 - V128Store16Lane = 1 - V128Store32Lane = 1 - V128Store64Lane = 1 - V128Store8Lane = 1 - -[MaxPerTransaction] - MaxBuiltInCallsPerTx = 100 - MaxNumberOfTransfersPerTx = 250 - MaxNumberOfTrieReadsPerTx = 1500 - -# Quadratic, Linear and Constant are the coefficients for a quadratic func. Separate variables are used for the -# sign of each coefficient, 0 meaning positive and 1 meaning negative -# The current values for the coefficients were computed based on benchmarking. -# For the given coefficients, the minimum of the function must not be lower than MinimumGasCost -[DynamicStorageLoad] - QuadraticCoefficient = 688 - SignOfQuadratic = 0 - LinearCoefficient = 31858 - SignOfLinear = 0 - ConstantCoefficient = 15287 - SignOfConstant = 0 - MinimumGasCost = 10000 diff --git a/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV6.toml b/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV6.toml deleted file mode 100644 index 82c658a1..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV6.toml +++ /dev/null @@ -1,827 +0,0 @@ -[BuiltInCost] - ChangeOwnerAddress = 5000000 - ClaimDeveloperRewards = 5000000 - SaveUserName = 1000000 - SaveKeyValue = 100000 - ESDTTransfer = 200000 - ESDTBurn = 100000 - ESDTLocalMint = 50000 - ESDTLocalBurn = 50000 - ESDTNFTCreate = 150000 - ESDTNFTAddQuantity = 50000 - ESDTNFTBurn = 50000 - ESDTNFTTransfer = 200000 - ESDTNFTChangeCreateOwner = 1000000 - ESDTNFTAddUri = 50000 - ESDTNFTUpdateAttributes = 50000 - ESDTNFTMultiTransfer = 200000 - SetGuardian = 250000 - GuardAccount = 250000 - UnGuardAccount = 250000 - TrieLoadPerNode = 100000 - TrieStorePerNode = 50000 - -[MetaChainSystemSCsCost] - Stake = 5000000 - UnStake = 5000000 - UnBond = 5000000 - Claim = 5000000 - Get = 5000000 - ChangeRewardAddress = 5000000 - ChangeValidatorKeys = 5000000 - UnJail = 5000000 - DelegationOps = 1000000 - DelegationMgrOps = 50000000 - ValidatorToDelegation = 500000000 - ESDTIssue = 50000000 - ESDTOperations = 50000000 - Proposal = 50000000 - Vote = 50000000 - DelegateVote = 50000000 - RevokeVote = 50000000 - CloseProposal = 50000000 - GetAllNodeStates = 20000000 - UnstakeTokens = 5000000 - UnbondTokens = 5000000 - GetActiveFund = 50000 - FixWaitingListSize = 500000000 - -[BaseOperationCost] - StorePerByte = 10000 - ReleasePerByte = 1000 - DataCopyPerByte = 50 - PersistPerByte = 1000 - CompilePerByte = 300 - AoTPreparePerByte = 100 - GetCode = 1000000 - -[BaseOpsAPICost] - GetSCAddress = 100 - GetOwnerAddress = 5000 - IsSmartContract = 5000 - GetShardOfAddress = 5000 - GetExternalBalance = 7000 - GetBlockHash = 10000 - TransferValue = 100000 - GetArgument = 100 - GetFunction = 100 - GetNumArguments = 100 - StorageStore = 75000 - StorageLoad = 50000 - CachedStorageLoad = 1000 - GetCaller = 100 - GetCallValue = 100 - Log = 3750 - Finish = 1 - SignalError = 1 - GetBlockTimeStamp = 10000 - GetGasLeft = 100 - Int64GetArgument = 100 - Int64StorageStore = 75000 - Int64StorageLoad = 50000 - Int64Finish = 1000 - GetStateRootHash = 10000 - GetBlockNonce = 10000 - GetBlockEpoch = 10000 - GetBlockRound = 10000 - GetBlockRandomSeed = 10000 - ExecuteOnSameContext = 100000 - ExecuteOnDestContext = 100000 - DelegateExecution = 100000 - AsyncCallStep = 100000 - AsyncCallbackGasLock = 4000000 - ExecuteReadOnly = 160000 - CreateContract = 300000 - GetReturnData = 100 - GetNumReturnData = 100 - GetReturnDataSize = 100 - GetOriginalTxHash = 10000 - CleanReturnData = 100 - DeleteFromReturnData = 100 - GetPrevTxHash = 10000 - GetCurrentTxHash = 10000 - CreateAsyncCall = 200000 - SetAsyncCallback = 100000 - SetAsyncGroupCallback = 100000 - SetAsyncContextCallback = 100000 - GetCallbackClosure = 10000 - GetCodeMetadata = 10000 - IsBuiltinFunction = 10000 - -[EthAPICost] - UseGas = 100 - GetAddress = 100000 - GetExternalBalance = 70000 - GetBlockHash = 100000 - Call = 160000 - CallDataCopy = 200 - GetCallDataSize = 100 - CallCode = 160000 - CallDelegate = 160000 - CallStatic = 160000 - StorageStore = 250000 - StorageLoad = 100000 - GetCaller = 100 - GetCallValue = 100 - CodeCopy = 1000 - GetCodeSize = 100 - GetBlockCoinbase = 100 - Create = 320000 - GetBlockDifficulty = 100 - ExternalCodeCopy = 3000 - GetExternalCodeSize = 2500 - GetGasLeft = 100 - GetBlockGasLimit = 100000 - GetTxGasPrice = 1000 - Log = 3750 - GetBlockNumber = 100000 - GetTxOrigin = 100000 - Finish = 1 - Revert = 1 - GetReturnDataSize = 200 - ReturnDataCopy = 500 - SelfDestruct = 5000000 - GetBlockTimeStamp = 100000 - -[BigIntAPICost] - BigIntNew = 2000 - BigIntByteLength = 2000 - BigIntUnsignedByteLength = 2000 - BigIntSignedByteLength = 2000 - BigIntGetBytes = 2000 - BigIntGetUnsignedBytes = 2000 - BigIntGetSignedBytes = 2000 - BigIntSetBytes = 2000 - BigIntSetUnsignedBytes = 2000 - BigIntSetSignedBytes = 2000 - BigIntIsInt64 = 2000 - BigIntGetInt64 = 2000 - BigIntSetInt64 = 2000 - BigIntAdd = 2000 - BigIntSub = 2000 - BigIntMul = 6000 - BigIntSqrt = 6000 - BigIntPow = 6000 - BigIntLog = 6000 - BigIntTDiv = 6000 - BigIntTMod = 6000 - BigIntEDiv = 6000 - BigIntEMod = 6000 - BigIntAbs = 2000 - BigIntNeg = 2000 - BigIntSign = 2000 - BigIntCmp = 2000 - BigIntNot = 2000 - BigIntAnd = 2000 - BigIntOr = 2000 - BigIntXor = 2000 - BigIntShr = 2000 - BigIntShl = 2000 - BigIntFinishUnsigned = 1000 - BigIntFinishSigned = 1000 - BigIntStorageLoadUnsigned = 50000 - BigIntStorageStoreUnsigned = 75000 - BigIntGetArgument = 1000 - BigIntGetUnsignedArgument = 1000 - BigIntGetSignedArgument = 1000 - BigIntGetCallValue = 1000 - BigIntGetExternalBalance = 10000 - CopyPerByteForTooBig = 1000 - -[CryptoAPICost] - SHA256 = 1000000 - Keccak256 = 1000000 - Ripemd160 = 1000000 - VerifyBLS = 5000000 - VerifyEd25519 = 2000000 - VerifySecp256k1 = 2000000 - EllipticCurveNew = 10000 - AddECC = 75000 - DoubleECC = 65000 - IsOnCurveECC = 10000 - ScalarMultECC = 400000 - MarshalECC = 13000 - MarshalCompressedECC = 15000 - UnmarshalECC = 20000 - UnmarshalCompressedECC = 270000 - GenerateKeyECC = 7000000 - EncodeDERSig = 10000000 - -[ManagedBufferAPICost] - MBufferNew = 2000 - MBufferNewFromBytes = 2000 - MBufferGetLength = 2000 - MBufferGetBytes = 2000 - MBufferGetByteSlice = 2000 - MBufferCopyByteSlice = 2000 - MBufferSetBytes = 2000 - MBufferAppend = 2000 - MBufferAppendBytes = 2000 - MBufferToBigIntUnsigned = 2000 - MBufferToBigIntSigned = 5000 - MBufferFromBigIntUnsigned = 2000 - MBufferFromBigIntSigned = 5000 - MBufferStorageStore = 75000 - MBufferStorageLoad = 50000 - MBufferGetArgument = 1000 - MBufferFinish = 1000 - MBufferSetRandom = 6000 - MBufferToBigFloat = 2000 - MBufferFromBigFloat = 2000 - -[BigFloatAPICost] - BigFloatNewFromParts = 3000 - BigFloatAdd = 7000 - BigFloatSub = 7000 - BigFloatMul = 7000 - BigFloatDiv = 7000 - BigFloatTruncate = 5000 - BigFloatNeg = 5000 - BigFloatClone = 5000 - BigFloatCmp = 4000 - BigFloatAbs = 5000 - BigFloatSqrt = 7000 - BigFloatPow = 10000 - BigFloatFloor = 5000 - BigFloatCeil = 5000 - BigFloatIsInt = 3000 - BigFloatSetBigInt = 3000 - BigFloatSetInt64 = 1000 - BigFloatGetConst = 1000 - -[WASMOpcodeCost] - Unreachable = 5 - Nop = 5 - Block = 5 - Loop = 5 - If = 5 - Else = 5 - End = 5 - Br = 5 - BrIf = 5 - BrTable = 5 - Return = 5 - Call = 5 - CallIndirect = 5 - Drop = 5 - Select = 5 - TypedSelect = 5 - LocalGet = 5 - LocalSet = 5 - LocalTee = 5 - GlobalGet = 5 - GlobalSet = 5 - I32Load = 5 - I64Load = 5 - F32Load = 6 - F64Load = 6 - I32Load8S = 5 - I32Load8U = 5 - I32Load16S = 5 - I32Load16U = 5 - I64Load8S = 5 - I64Load8U = 5 - I64Load16S = 5 - I64Load16U = 5 - I64Load32S = 5 - I64Load32U = 5 - I32Store = 5 - I64Store = 5 - F32Store = 12 - F64Store = 12 - I32Store8 = 5 - I32Store16 = 5 - I64Store8 = 5 - I64Store16 = 5 - I64Store32 = 5 - MemorySize = 5 - MemoryGrow = 1000000 - I32Const = 5 - I64Const = 5 - F32Const = 5 - F64Const = 5 - RefNull = 5 - RefIsNull = 5 - RefFunc = 5 - I32Eqz = 5 - I32Eq = 5 - I32Ne = 5 - I32LtS = 5 - I32LtU = 5 - I32GtS = 5 - I32GtU = 5 - I32LeS = 5 - I32LeU = 5 - I32GeS = 5 - I32GeU = 5 - I64Eqz = 5 - I64Eq = 5 - I64Ne = 5 - I64LtS = 5 - I64LtU = 5 - I64GtS = 5 - I64GtU = 5 - I64LeS = 5 - I64LeU = 5 - I64GeS = 5 - I64GeU = 5 - F32Eq = 6 - F32Ne = 6 - F32Lt = 6 - F32Gt = 6 - F32Le = 6 - F32Ge = 6 - F64Eq = 6 - F64Ne = 6 - F64Lt = 6 - F64Gt = 6 - F64Le = 6 - F64Ge = 6 - I32Clz = 100 - I32Ctz = 100 - I32Popcnt = 100 - I32Add = 5 - I32Sub = 5 - I32Mul = 5 - I32DivS = 18 - I32DivU = 18 - I32RemS = 18 - I32RemU = 18 - I32And = 5 - I32Or = 5 - I32Xor = 5 - I32Shl = 5 - I32ShrS = 5 - I32ShrU = 5 - I32Rotl = 5 - I32Rotr = 5 - I64Clz = 100 - I64Ctz = 100 - I64Popcnt = 100 - I64Add = 5 - I64Sub = 5 - I64Mul = 5 - I64DivS = 18 - I64DivU = 18 - I64RemS = 18 - I64RemU = 18 - I64And = 5 - I64Or = 5 - I64Xor = 5 - I64Shl = 5 - I64ShrS = 5 - I64ShrU = 5 - I64Rotl = 5 - I64Rotr = 5 - F32Abs = 5 - F32Neg = 5 - F32Ceil = 100 - F32Floor = 100 - F32Trunc = 100 - F32Nearest = 100 - F32Sqrt = 100 - F32Add = 5 - F32Sub = 5 - F32Mul = 15 - F32Div = 100 - F32Min = 15 - F32Max = 15 - F32Copysign = 5 - F64Abs = 5 - F64Neg = 5 - F64Ceil = 100 - F64Floor = 100 - F64Trunc = 100 - F64Nearest = 100 - F64Sqrt = 100 - F64Add = 5 - F64Sub = 5 - F64Mul = 15 - F64Div = 100 - F64Min = 15 - F64Max = 15 - F64Copysign = 5 - I32WrapI64 = 9 - I32TruncF32S = 100 - I32TruncF32U = 100 - I32TruncF64S = 100 - I32TruncF64U = 100 - I64ExtendI32S = 9 - I64ExtendI32U = 9 - I64TruncF32S = 100 - I64TruncF32U = 100 - I64TruncF64S = 100 - I64TruncF64U = 100 - F32ConvertI32S = 100 - F32ConvertI32U = 100 - F32ConvertI64S = 100 - F32ConvertI64U = 100 - F32DemoteF64 = 100 - F64ConvertI32S = 100 - F64ConvertI32U = 100 - F64ConvertI64S = 100 - F64ConvertI64U = 100 - F64PromoteF32 = 100 - I32ReinterpretF32 = 100 - I64ReinterpretF64 = 100 - F32ReinterpretI32 = 100 - F64ReinterpretI64 = 100 - I32Extend8S = 9 - I32Extend16S = 9 - I64Extend8S = 9 - I64Extend16S = 9 - I64Extend32S = 9 - I32TruncSatF32S = 100 - I32TruncSatF32U = 100 - I32TruncSatF64S = 100 - I32TruncSatF64U = 100 - I64TruncSatF32S = 100 - I64TruncSatF32U = 100 - I64TruncSatF64S = 100 - I64TruncSatF64U = 100 - MemoryInit = 5 - DataDrop = 5 - MemoryCopy = 5 - MemoryFill = 5 - TableInit = 10 - ElemDrop = 10 - TableCopy = 10 - TableFill = 10 - TableGet = 10 - TableSet = 10 - TableGrow = 10 - TableSize = 10 - AtomicNotify = 1000000 - I32AtomicWait = 1000000 - I64AtomicWait = 1000000 - AtomicFence = 1000000 - I32AtomicLoad = 1000000 - I64AtomicLoad = 1000000 - I32AtomicLoad8U = 1000000 - I32AtomicLoad16U = 1000000 - I64AtomicLoad8U = 1000000 - I64AtomicLoad16U = 1000000 - I64AtomicLoad32U = 1000000 - I32AtomicStore = 1000000 - I64AtomicStore = 1000000 - I32AtomicStore8 = 1000000 - I32AtomicStore16 = 1000000 - I64AtomicStore8 = 1000000 - I64AtomicStore16 = 1000000 - I64AtomicStore32 = 1000000 - I32AtomicRmwAdd = 1000000 - I64AtomicRmwAdd = 1000000 - I32AtomicRmw8AddU = 1000000 - I32AtomicRmw16AddU = 1000000 - I64AtomicRmw8AddU = 1000000 - I64AtomicRmw16AddU = 1000000 - I64AtomicRmw32AddU = 1000000 - I32AtomicRmwSub = 1000000 - I64AtomicRmwSub = 1000000 - I32AtomicRmw8SubU = 1000000 - I32AtomicRmw16SubU = 1000000 - I64AtomicRmw8SubU = 1000000 - I64AtomicRmw16SubU = 1000000 - I64AtomicRmw32SubU = 1000000 - I32AtomicRmwAnd = 1000000 - I64AtomicRmwAnd = 1000000 - I32AtomicRmw8AndU = 1000000 - I32AtomicRmw16AndU = 1000000 - I64AtomicRmw8AndU = 1000000 - I64AtomicRmw16AndU = 1000000 - I64AtomicRmw32AndU = 1000000 - I32AtomicRmwOr = 1000000 - I64AtomicRmwOr = 1000000 - I32AtomicRmw8OrU = 1000000 - I32AtomicRmw16OrU = 1000000 - I64AtomicRmw8OrU = 1000000 - I64AtomicRmw16OrU = 1000000 - I64AtomicRmw32OrU = 1000000 - I32AtomicRmwXor = 1000000 - I64AtomicRmwXor = 1000000 - I32AtomicRmw8XorU = 1000000 - I32AtomicRmw16XorU = 1000000 - I64AtomicRmw8XorU = 1000000 - I64AtomicRmw16XorU = 1000000 - I64AtomicRmw32XorU = 1000000 - I32AtomicRmwXchg = 1000000 - I64AtomicRmwXchg = 1000000 - I32AtomicRmw8XchgU = 1000000 - I32AtomicRmw16XchgU = 1000000 - I64AtomicRmw8XchgU = 1000000 - I64AtomicRmw16XchgU = 1000000 - I64AtomicRmw32XchgU = 1000000 - I32AtomicRmwCmpxchg = 1000000 - I64AtomicRmwCmpxchg = 1000000 - I32AtomicRmw8CmpxchgU = 1000000 - I32AtomicRmw16CmpxchgU = 1000000 - I64AtomicRmw8CmpxchgU = 1000000 - I64AtomicRmw16CmpxchgU = 1000000 - I64AtomicRmw32CmpxchgU = 1000000 - V128Load = 1000000 - V128Store = 1000000 - V128Const = 1000000 - I8x16Splat = 1000000 - I8x16ExtractLaneS = 1000000 - I8x16ExtractLaneU = 1000000 - I8x16ReplaceLane = 1000000 - I16x8Splat = 1000000 - I16x8ExtractLaneS = 1000000 - I16x8ExtractLaneU = 1000000 - I16x8ReplaceLane = 1000000 - I32x4Splat = 1000000 - I32x4ExtractLane = 1000000 - I32x4ReplaceLane = 1000000 - I64x2Splat = 1000000 - I64x2ExtractLane = 1000000 - I64x2ReplaceLane = 1000000 - F32x4Splat = 1000000 - F32x4ExtractLane = 1000000 - F32x4ReplaceLane = 1000000 - F64x2Splat = 1000000 - F64x2ExtractLane = 1000000 - F64x2ReplaceLane = 1000000 - I8x16Eq = 1000000 - I8x16Ne = 1000000 - I8x16LtS = 1000000 - I8x16LtU = 1000000 - I8x16GtS = 1000000 - I8x16GtU = 1000000 - I8x16LeS = 1000000 - I8x16LeU = 1000000 - I8x16GeS = 1000000 - I8x16GeU = 1000000 - I16x8Eq = 1000000 - I16x8Ne = 1000000 - I16x8LtS = 1000000 - I16x8LtU = 1000000 - I16x8GtS = 1000000 - I16x8GtU = 1000000 - I16x8LeS = 1000000 - I16x8LeU = 1000000 - I16x8GeS = 1000000 - I16x8GeU = 1000000 - I32x4Eq = 1000000 - I32x4Ne = 1000000 - I32x4LtS = 1000000 - I32x4LtU = 1000000 - I32x4GtS = 1000000 - I32x4GtU = 1000000 - I32x4LeS = 1000000 - I32x4LeU = 1000000 - I32x4GeS = 1000000 - I32x4GeU = 1000000 - F32x4Eq = 1000000 - F32x4Ne = 1000000 - F32x4Lt = 1000000 - F32x4Gt = 1000000 - F32x4Le = 1000000 - F32x4Ge = 1000000 - F64x2Eq = 1000000 - F64x2Ne = 1000000 - F64x2Lt = 1000000 - F64x2Gt = 1000000 - F64x2Le = 1000000 - F64x2Ge = 1000000 - V128Not = 1000000 - V128And = 1000000 - V128AndNot = 1000000 - V128Or = 1000000 - V128Xor = 1000000 - V128Bitselect = 1000000 - I8x16Neg = 1000000 - I8x16AnyTrue = 1000000 - I8x16AllTrue = 1000000 - I8x16Shl = 1000000 - I8x16ShrS = 1000000 - I8x16ShrU = 1000000 - I8x16Add = 1000000 - I8x16AddSaturateS = 1000000 - I8x16AddSaturateU = 1000000 - I8x16Sub = 1000000 - I8x16SubSaturateS = 1000000 - I8x16SubSaturateU = 1000000 - I8x16MinS = 1000000 - I8x16MinU = 1000000 - I8x16MaxS = 1000000 - I8x16MaxU = 1000000 - I8x16Mul = 1000000 - I16x8Neg = 1000000 - I16x8AnyTrue = 1000000 - I16x8AllTrue = 1000000 - I16x8Shl = 1000000 - I16x8ShrS = 1000000 - I16x8ShrU = 1000000 - I16x8Add = 1000000 - I16x8AddSaturateS = 1000000 - I16x8AddSaturateU = 1000000 - I16x8Sub = 1000000 - I16x8SubSaturateS = 1000000 - I16x8SubSaturateU = 1000000 - I16x8Mul = 1000000 - I16x8MinS = 1000000 - I16x8MinU = 1000000 - I16x8MaxS = 1000000 - I16x8MaxU = 1000000 - I32x4Neg = 1000000 - I32x4AnyTrue = 1000000 - I32x4AllTrue = 1000000 - I32x4Shl = 1000000 - I32x4ShrS = 1000000 - I32x4ShrU = 1000000 - I32x4Add = 1000000 - I32x4Sub = 1000000 - I32x4Mul = 1000000 - I32x4MinS = 1000000 - I32x4MinU = 1000000 - I32x4MaxS = 1000000 - I32x4MaxU = 1000000 - I64x2Neg = 1000000 - I64x2AnyTrue = 1000000 - I64x2AllTrue = 1000000 - I64x2Shl = 1000000 - I64x2ShrS = 1000000 - I64x2ShrU = 1000000 - I64x2Add = 1000000 - I64x2Sub = 1000000 - I64x2Mul = 1000000 - F32x4Abs = 1000000 - F32x4Neg = 1000000 - F32x4Sqrt = 1000000 - F32x4Add = 1000000 - F32x4Sub = 1000000 - F32x4Mul = 1000000 - F32x4Div = 1000000 - F32x4Min = 1000000 - F32x4Max = 1000000 - F64x2Abs = 1000000 - F64x2Neg = 1000000 - F64x2Sqrt = 1000000 - F64x2Add = 1000000 - F64x2Sub = 1000000 - F64x2Mul = 1000000 - F64x2Div = 1000000 - F64x2Min = 1000000 - F64x2Max = 1000000 - I32x4TruncSatF32x4S = 1000000 - I32x4TruncSatF32x4U = 1000000 - I64x2TruncSatF64x2S = 1000000 - I64x2TruncSatF64x2U = 1000000 - F32x4ConvertI32x4S = 1000000 - F32x4ConvertI32x4U = 1000000 - F64x2ConvertI64x2S = 1000000 - F64x2ConvertI64x2U = 1000000 - V8x16Swizzle = 1000000 - V8x16Shuffle = 1000000 - V8x16LoadSplat = 1000000 - V16x8LoadSplat = 1000000 - V32x4LoadSplat = 1000000 - V64x2LoadSplat = 1000000 - I8x16NarrowI16x8S = 1000000 - I8x16NarrowI16x8U = 1000000 - I16x8NarrowI32x4S = 1000000 - I16x8NarrowI32x4U = 1000000 - I16x8WidenLowI8x16S = 1000000 - I16x8WidenHighI8x16S = 1000000 - I16x8WidenLowI8x16U = 1000000 - I16x8WidenHighI8x16U = 1000000 - I32x4WidenLowI16x8S = 1000000 - I32x4WidenHighI16x8S = 1000000 - I32x4WidenLowI16x8U = 1000000 - I32x4WidenHighI16x8U = 1000000 - I16x8Load8x8S = 1000000 - I16x8Load8x8U = 1000000 - I32x4Load16x4S = 1000000 - I32x4Load16x4U = 1000000 - I64x2Load32x2S = 1000000 - I64x2Load32x2U = 1000000 - I8x16RoundingAverageU = 1000000 - I16x8RoundingAverageU = 1000000 - LocalAllocate = 5 - LocalsUnmetered = 100 - MaxMemoryGrowDelta = 1 - MaxMemoryGrow = 10 - Catch = 1 - CatchAll = 1 - Delegate = 1 - F32x4Ceil = 1 - F32x4DemoteF64x2Zero = 1 - F32x4Floor = 1 - F32x4Nearest = 1 - F32x4PMax = 1 - F32x4PMin = 1 - F32x4Trunc = 1 - F64x2Ceil = 1 - F64x2ConvertLowI32x4S = 1 - F64x2ConvertLowI32x4U = 1 - F64x2Floor = 1 - F64x2Nearest = 1 - F64x2PMax = 1 - F64x2PMin = 1 - F64x2PromoteLowF32x4 = 1 - F64x2Trunc = 1 - I16x8Abs = 1 - I16x8AddSatS = 1 - I16x8AddSatU = 1 - I16x8Bitmask = 1 - I16x8ExtAddPairwiseI8x16S = 1 - I16x8ExtAddPairwiseI8x16U = 1 - I16x8ExtMulHighI8x16S = 1 - I16x8ExtMulHighI8x16U = 1 - I16x8ExtMulLowI8x16S = 1 - I16x8ExtMulLowI8x16U = 1 - I16x8ExtendHighI8x16S = 1 - I16x8ExtendHighI8x16U = 1 - I16x8ExtendLowI8x16S = 1 - I16x8ExtendLowI8x16U = 1 - I16x8Q15MulrSatS = 1 - I16x8SubSatS = 1 - I16x8SubSatU = 1 - I32x4Abs = 1 - I32x4Bitmask = 1 - I32x4DotI16x8S = 1 - I32x4ExtAddPairwiseI16x8S = 1 - I32x4ExtAddPairwiseI16x8U = 1 - I32x4ExtMulHighI16x8S = 1 - I32x4ExtMulHighI16x8U = 1 - I32x4ExtMulLowI16x8S = 1 - I32x4ExtMulLowI16x8U = 1 - I32x4ExtendHighI16x8S = 1 - I32x4ExtendHighI16x8U = 1 - I32x4ExtendLowI16x8S = 1 - I32x4ExtendLowI16x8U = 1 - I32x4TruncSatF64x2SZero = 1 - I32x4TruncSatF64x2UZero = 1 - I64x2Abs = 1 - I64x2Bitmask = 1 - I64x2Eq = 1 - I64x2ExtMulHighI32x4S = 1 - I64x2ExtMulHighI32x4U = 1 - I64x2ExtMulLowI32x4S = 1 - I64x2ExtMulLowI32x4U = 1 - I64x2ExtendHighI32x4S = 1 - I64x2ExtendHighI32x4U = 1 - I64x2ExtendLowI32x4S = 1 - I64x2ExtendLowI32x4U = 1 - I64x2GeS = 1 - I64x2GtS = 1 - I64x2LeS = 1 - I64x2LtS = 1 - I64x2Ne = 1 - I8x16Abs = 1 - I8x16AddSatS = 1 - I8x16AddSatU = 1 - I8x16Bitmask = 1 - I8x16Popcnt = 1 - I8x16Shuffle = 1 - I8x16SubSatS = 1 - I8x16SubSatU = 1 - I8x16Swizzle = 1 - MemoryAtomicNotify = 1 - MemoryAtomicWait32 = 1 - MemoryAtomicWait64 = 1 - Rethrow = 1 - ReturnCall = 1 - ReturnCallIndirect = 1 - Throw = 1 - Try = 1 - Unwind = 1 - V128AnyTrue = 1 - V128Load16Lane = 1 - V128Load16Splat = 1 - V128Load16x4S = 1 - V128Load16x4U = 1 - V128Load32Lane = 1 - V128Load32Splat = 1 - V128Load32Zero = 1 - V128Load32x2S = 1 - V128Load32x2U = 1 - V128Load64Lane = 1 - V128Load64Splat = 1 - V128Load64Zero = 1 - V128Load8Lane = 1 - V128Load8Splat = 1 - V128Load8x8S = 1 - V128Load8x8U = 1 - V128Store16Lane = 1 - V128Store32Lane = 1 - V128Store64Lane = 1 - V128Store8Lane = 1 - -[MaxPerTransaction] - MaxBuiltInCallsPerTx = 100 - MaxNumberOfTransfersPerTx = 250 - MaxNumberOfTrieReadsPerTx = 1500 - -# Quadratic, Linear and Constant are the coefficients for a quadratic func. Separate variables are used for the -# sign of each coefficient, 0 meaning positive and 1 meaning negative -# The current values for the coefficients were computed based on benchmarking. -# For the given coefficients, the minimum of the function must not be lower than MinimumGasCost -[DynamicStorageLoad] - QuadraticCoefficient = 688 - SignOfQuadratic = 0 - LinearCoefficient = 31858 - SignOfLinear = 0 - ConstantCoefficient = 15287 - SignOfConstant = 0 - MinimumGasCost = 10000 diff --git a/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV7.toml b/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV7.toml deleted file mode 100644 index f3930be8..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/gasSchedules/gasScheduleV7.toml +++ /dev/null @@ -1,828 +0,0 @@ -[BuiltInCost] - ChangeOwnerAddress = 5000000 - ClaimDeveloperRewards = 5000000 - SaveUserName = 1000000 - SaveKeyValue = 100000 - ESDTTransfer = 200000 - ESDTBurn = 100000 - ESDTLocalMint = 50000 - ESDTLocalBurn = 50000 - ESDTNFTCreate = 150000 - ESDTNFTAddQuantity = 50000 - ESDTNFTBurn = 50000 - ESDTNFTTransfer = 200000 - ESDTNFTChangeCreateOwner = 1000000 - ESDTNFTAddUri = 50000 - ESDTNFTUpdateAttributes = 50000 - ESDTNFTMultiTransfer = 200000 - MultiESDTNFTTransfer = 200000 # should be the same value with the ESDTNFTMultiTransfer - SetGuardian = 250000 - GuardAccount = 250000 - UnGuardAccount = 250000 - TrieLoadPerNode = 100000 - TrieStorePerNode = 50000 - -[MetaChainSystemSCsCost] - Stake = 5000000 - UnStake = 5000000 - UnBond = 5000000 - Claim = 5000000 - Get = 5000000 - ChangeRewardAddress = 5000000 - ChangeValidatorKeys = 5000000 - UnJail = 5000000 - DelegationOps = 1000000 - DelegationMgrOps = 50000000 - ValidatorToDelegation = 500000000 - ESDTIssue = 50000000 - ESDTOperations = 50000000 - Proposal = 50000000 - Vote = 5000000 - DelegateVote = 50000000 - RevokeVote = 50000000 - CloseProposal = 50000000 - GetAllNodeStates = 20000000 - UnstakeTokens = 5000000 - UnbondTokens = 5000000 - GetActiveFund = 50000 - FixWaitingListSize = 500000000 - -[BaseOperationCost] - StorePerByte = 10000 - ReleasePerByte = 1000 - DataCopyPerByte = 50 - PersistPerByte = 1000 - CompilePerByte = 300 - AoTPreparePerByte = 100 - GetCode = 1000000 - -[BaseOpsAPICost] - GetSCAddress = 100 - GetOwnerAddress = 5000 - IsSmartContract = 5000 - GetShardOfAddress = 5000 - GetExternalBalance = 7000 - GetBlockHash = 10000 - TransferValue = 100000 - GetArgument = 100 - GetFunction = 100 - GetNumArguments = 100 - StorageStore = 75000 - StorageLoad = 50000 - CachedStorageLoad = 1000 - GetCaller = 100 - GetCallValue = 100 - Log = 3750 - Finish = 1 - SignalError = 1 - GetBlockTimeStamp = 10000 - GetGasLeft = 100 - Int64GetArgument = 100 - Int64StorageStore = 75000 - Int64StorageLoad = 50000 - Int64Finish = 1000 - GetStateRootHash = 10000 - GetBlockNonce = 10000 - GetBlockEpoch = 10000 - GetBlockRound = 10000 - GetBlockRandomSeed = 10000 - ExecuteOnSameContext = 100000 - ExecuteOnDestContext = 100000 - DelegateExecution = 100000 - AsyncCallStep = 100000 - AsyncCallbackGasLock = 4000000 - ExecuteReadOnly = 160000 - CreateContract = 300000 - GetReturnData = 100 - GetNumReturnData = 100 - GetReturnDataSize = 100 - GetOriginalTxHash = 10000 - CleanReturnData = 100 - DeleteFromReturnData = 100 - GetPrevTxHash = 10000 - GetCurrentTxHash = 10000 - CreateAsyncCall = 200000 - SetAsyncCallback = 100000 - SetAsyncGroupCallback = 100000 - SetAsyncContextCallback = 100000 - GetCallbackClosure = 10000 - GetCodeMetadata = 10000 - IsBuiltinFunction = 10000 - -[EthAPICost] - UseGas = 100 - GetAddress = 100000 - GetExternalBalance = 70000 - GetBlockHash = 100000 - Call = 160000 - CallDataCopy = 200 - GetCallDataSize = 100 - CallCode = 160000 - CallDelegate = 160000 - CallStatic = 160000 - StorageStore = 250000 - StorageLoad = 100000 - GetCaller = 100 - GetCallValue = 100 - CodeCopy = 1000 - GetCodeSize = 100 - GetBlockCoinbase = 100 - Create = 320000 - GetBlockDifficulty = 100 - ExternalCodeCopy = 3000 - GetExternalCodeSize = 2500 - GetGasLeft = 100 - GetBlockGasLimit = 100000 - GetTxGasPrice = 1000 - Log = 3750 - GetBlockNumber = 100000 - GetTxOrigin = 100000 - Finish = 1 - Revert = 1 - GetReturnDataSize = 200 - ReturnDataCopy = 500 - SelfDestruct = 5000000 - GetBlockTimeStamp = 100000 - -[BigIntAPICost] - BigIntNew = 2000 - BigIntByteLength = 2000 - BigIntUnsignedByteLength = 2000 - BigIntSignedByteLength = 2000 - BigIntGetBytes = 2000 - BigIntGetUnsignedBytes = 2000 - BigIntGetSignedBytes = 2000 - BigIntSetBytes = 2000 - BigIntSetUnsignedBytes = 2000 - BigIntSetSignedBytes = 2000 - BigIntIsInt64 = 2000 - BigIntGetInt64 = 2000 - BigIntSetInt64 = 2000 - BigIntAdd = 2000 - BigIntSub = 2000 - BigIntMul = 6000 - BigIntSqrt = 6000 - BigIntPow = 6000 - BigIntLog = 6000 - BigIntTDiv = 6000 - BigIntTMod = 6000 - BigIntEDiv = 6000 - BigIntEMod = 6000 - BigIntAbs = 2000 - BigIntNeg = 2000 - BigIntSign = 2000 - BigIntCmp = 2000 - BigIntNot = 2000 - BigIntAnd = 2000 - BigIntOr = 2000 - BigIntXor = 2000 - BigIntShr = 2000 - BigIntShl = 2000 - BigIntFinishUnsigned = 1000 - BigIntFinishSigned = 1000 - BigIntStorageLoadUnsigned = 50000 - BigIntStorageStoreUnsigned = 75000 - BigIntGetArgument = 1000 - BigIntGetUnsignedArgument = 1000 - BigIntGetSignedArgument = 1000 - BigIntGetCallValue = 1000 - BigIntGetExternalBalance = 10000 - CopyPerByteForTooBig = 1000 - -[CryptoAPICost] - SHA256 = 1000000 - Keccak256 = 1000000 - Ripemd160 = 1000000 - VerifyBLS = 5000000 - VerifyEd25519 = 2000000 - VerifySecp256k1 = 2000000 - EllipticCurveNew = 10000 - AddECC = 75000 - DoubleECC = 65000 - IsOnCurveECC = 10000 - ScalarMultECC = 400000 - MarshalECC = 13000 - MarshalCompressedECC = 15000 - UnmarshalECC = 20000 - UnmarshalCompressedECC = 270000 - GenerateKeyECC = 7000000 - EncodeDERSig = 10000000 - -[ManagedBufferAPICost] - MBufferNew = 2000 - MBufferNewFromBytes = 2000 - MBufferGetLength = 2000 - MBufferGetBytes = 2000 - MBufferGetByteSlice = 2000 - MBufferCopyByteSlice = 2000 - MBufferSetBytes = 2000 - MBufferAppend = 2000 - MBufferAppendBytes = 2000 - MBufferToBigIntUnsigned = 2000 - MBufferToBigIntSigned = 5000 - MBufferFromBigIntUnsigned = 2000 - MBufferFromBigIntSigned = 5000 - MBufferStorageStore = 75000 - MBufferStorageLoad = 50000 - MBufferGetArgument = 1000 - MBufferFinish = 1000 - MBufferSetRandom = 6000 - MBufferToBigFloat = 2000 - MBufferFromBigFloat = 2000 - -[BigFloatAPICost] - BigFloatNewFromParts = 3000 - BigFloatAdd = 7000 - BigFloatSub = 7000 - BigFloatMul = 7000 - BigFloatDiv = 7000 - BigFloatTruncate = 5000 - BigFloatNeg = 5000 - BigFloatClone = 5000 - BigFloatCmp = 4000 - BigFloatAbs = 5000 - BigFloatSqrt = 7000 - BigFloatPow = 10000 - BigFloatFloor = 5000 - BigFloatCeil = 5000 - BigFloatIsInt = 3000 - BigFloatSetBigInt = 3000 - BigFloatSetInt64 = 1000 - BigFloatGetConst = 1000 - -[WASMOpcodeCost] - Unreachable = 5 - Nop = 5 - Block = 5 - Loop = 5 - If = 5 - Else = 5 - End = 5 - Br = 5 - BrIf = 5 - BrTable = 5 - Return = 5 - Call = 5 - CallIndirect = 5 - Drop = 5 - Select = 5 - TypedSelect = 5 - LocalGet = 5 - LocalSet = 5 - LocalTee = 5 - GlobalGet = 5 - GlobalSet = 5 - I32Load = 5 - I64Load = 5 - F32Load = 6 - F64Load = 6 - I32Load8S = 5 - I32Load8U = 5 - I32Load16S = 5 - I32Load16U = 5 - I64Load8S = 5 - I64Load8U = 5 - I64Load16S = 5 - I64Load16U = 5 - I64Load32S = 5 - I64Load32U = 5 - I32Store = 5 - I64Store = 5 - F32Store = 12 - F64Store = 12 - I32Store8 = 5 - I32Store16 = 5 - I64Store8 = 5 - I64Store16 = 5 - I64Store32 = 5 - MemorySize = 5 - MemoryGrow = 1000000 - I32Const = 5 - I64Const = 5 - F32Const = 5 - F64Const = 5 - RefNull = 5 - RefIsNull = 5 - RefFunc = 5 - I32Eqz = 5 - I32Eq = 5 - I32Ne = 5 - I32LtS = 5 - I32LtU = 5 - I32GtS = 5 - I32GtU = 5 - I32LeS = 5 - I32LeU = 5 - I32GeS = 5 - I32GeU = 5 - I64Eqz = 5 - I64Eq = 5 - I64Ne = 5 - I64LtS = 5 - I64LtU = 5 - I64GtS = 5 - I64GtU = 5 - I64LeS = 5 - I64LeU = 5 - I64GeS = 5 - I64GeU = 5 - F32Eq = 6 - F32Ne = 6 - F32Lt = 6 - F32Gt = 6 - F32Le = 6 - F32Ge = 6 - F64Eq = 6 - F64Ne = 6 - F64Lt = 6 - F64Gt = 6 - F64Le = 6 - F64Ge = 6 - I32Clz = 100 - I32Ctz = 100 - I32Popcnt = 100 - I32Add = 5 - I32Sub = 5 - I32Mul = 5 - I32DivS = 18 - I32DivU = 18 - I32RemS = 18 - I32RemU = 18 - I32And = 5 - I32Or = 5 - I32Xor = 5 - I32Shl = 5 - I32ShrS = 5 - I32ShrU = 5 - I32Rotl = 5 - I32Rotr = 5 - I64Clz = 100 - I64Ctz = 100 - I64Popcnt = 100 - I64Add = 5 - I64Sub = 5 - I64Mul = 5 - I64DivS = 18 - I64DivU = 18 - I64RemS = 18 - I64RemU = 18 - I64And = 5 - I64Or = 5 - I64Xor = 5 - I64Shl = 5 - I64ShrS = 5 - I64ShrU = 5 - I64Rotl = 5 - I64Rotr = 5 - F32Abs = 5 - F32Neg = 5 - F32Ceil = 100 - F32Floor = 100 - F32Trunc = 100 - F32Nearest = 100 - F32Sqrt = 100 - F32Add = 5 - F32Sub = 5 - F32Mul = 15 - F32Div = 100 - F32Min = 15 - F32Max = 15 - F32Copysign = 5 - F64Abs = 5 - F64Neg = 5 - F64Ceil = 100 - F64Floor = 100 - F64Trunc = 100 - F64Nearest = 100 - F64Sqrt = 100 - F64Add = 5 - F64Sub = 5 - F64Mul = 15 - F64Div = 100 - F64Min = 15 - F64Max = 15 - F64Copysign = 5 - I32WrapI64 = 9 - I32TruncF32S = 100 - I32TruncF32U = 100 - I32TruncF64S = 100 - I32TruncF64U = 100 - I64ExtendI32S = 9 - I64ExtendI32U = 9 - I64TruncF32S = 100 - I64TruncF32U = 100 - I64TruncF64S = 100 - I64TruncF64U = 100 - F32ConvertI32S = 100 - F32ConvertI32U = 100 - F32ConvertI64S = 100 - F32ConvertI64U = 100 - F32DemoteF64 = 100 - F64ConvertI32S = 100 - F64ConvertI32U = 100 - F64ConvertI64S = 100 - F64ConvertI64U = 100 - F64PromoteF32 = 100 - I32ReinterpretF32 = 100 - I64ReinterpretF64 = 100 - F32ReinterpretI32 = 100 - F64ReinterpretI64 = 100 - I32Extend8S = 9 - I32Extend16S = 9 - I64Extend8S = 9 - I64Extend16S = 9 - I64Extend32S = 9 - I32TruncSatF32S = 100 - I32TruncSatF32U = 100 - I32TruncSatF64S = 100 - I32TruncSatF64U = 100 - I64TruncSatF32S = 100 - I64TruncSatF32U = 100 - I64TruncSatF64S = 100 - I64TruncSatF64U = 100 - MemoryInit = 5 - DataDrop = 5 - MemoryCopy = 5 - MemoryFill = 5 - TableInit = 10 - ElemDrop = 10 - TableCopy = 10 - TableFill = 10 - TableGet = 10 - TableSet = 10 - TableGrow = 10 - TableSize = 10 - AtomicNotify = 1000000 - I32AtomicWait = 1000000 - I64AtomicWait = 1000000 - AtomicFence = 1000000 - I32AtomicLoad = 1000000 - I64AtomicLoad = 1000000 - I32AtomicLoad8U = 1000000 - I32AtomicLoad16U = 1000000 - I64AtomicLoad8U = 1000000 - I64AtomicLoad16U = 1000000 - I64AtomicLoad32U = 1000000 - I32AtomicStore = 1000000 - I64AtomicStore = 1000000 - I32AtomicStore8 = 1000000 - I32AtomicStore16 = 1000000 - I64AtomicStore8 = 1000000 - I64AtomicStore16 = 1000000 - I64AtomicStore32 = 1000000 - I32AtomicRmwAdd = 1000000 - I64AtomicRmwAdd = 1000000 - I32AtomicRmw8AddU = 1000000 - I32AtomicRmw16AddU = 1000000 - I64AtomicRmw8AddU = 1000000 - I64AtomicRmw16AddU = 1000000 - I64AtomicRmw32AddU = 1000000 - I32AtomicRmwSub = 1000000 - I64AtomicRmwSub = 1000000 - I32AtomicRmw8SubU = 1000000 - I32AtomicRmw16SubU = 1000000 - I64AtomicRmw8SubU = 1000000 - I64AtomicRmw16SubU = 1000000 - I64AtomicRmw32SubU = 1000000 - I32AtomicRmwAnd = 1000000 - I64AtomicRmwAnd = 1000000 - I32AtomicRmw8AndU = 1000000 - I32AtomicRmw16AndU = 1000000 - I64AtomicRmw8AndU = 1000000 - I64AtomicRmw16AndU = 1000000 - I64AtomicRmw32AndU = 1000000 - I32AtomicRmwOr = 1000000 - I64AtomicRmwOr = 1000000 - I32AtomicRmw8OrU = 1000000 - I32AtomicRmw16OrU = 1000000 - I64AtomicRmw8OrU = 1000000 - I64AtomicRmw16OrU = 1000000 - I64AtomicRmw32OrU = 1000000 - I32AtomicRmwXor = 1000000 - I64AtomicRmwXor = 1000000 - I32AtomicRmw8XorU = 1000000 - I32AtomicRmw16XorU = 1000000 - I64AtomicRmw8XorU = 1000000 - I64AtomicRmw16XorU = 1000000 - I64AtomicRmw32XorU = 1000000 - I32AtomicRmwXchg = 1000000 - I64AtomicRmwXchg = 1000000 - I32AtomicRmw8XchgU = 1000000 - I32AtomicRmw16XchgU = 1000000 - I64AtomicRmw8XchgU = 1000000 - I64AtomicRmw16XchgU = 1000000 - I64AtomicRmw32XchgU = 1000000 - I32AtomicRmwCmpxchg = 1000000 - I64AtomicRmwCmpxchg = 1000000 - I32AtomicRmw8CmpxchgU = 1000000 - I32AtomicRmw16CmpxchgU = 1000000 - I64AtomicRmw8CmpxchgU = 1000000 - I64AtomicRmw16CmpxchgU = 1000000 - I64AtomicRmw32CmpxchgU = 1000000 - V128Load = 1000000 - V128Store = 1000000 - V128Const = 1000000 - I8x16Splat = 1000000 - I8x16ExtractLaneS = 1000000 - I8x16ExtractLaneU = 1000000 - I8x16ReplaceLane = 1000000 - I16x8Splat = 1000000 - I16x8ExtractLaneS = 1000000 - I16x8ExtractLaneU = 1000000 - I16x8ReplaceLane = 1000000 - I32x4Splat = 1000000 - I32x4ExtractLane = 1000000 - I32x4ReplaceLane = 1000000 - I64x2Splat = 1000000 - I64x2ExtractLane = 1000000 - I64x2ReplaceLane = 1000000 - F32x4Splat = 1000000 - F32x4ExtractLane = 1000000 - F32x4ReplaceLane = 1000000 - F64x2Splat = 1000000 - F64x2ExtractLane = 1000000 - F64x2ReplaceLane = 1000000 - I8x16Eq = 1000000 - I8x16Ne = 1000000 - I8x16LtS = 1000000 - I8x16LtU = 1000000 - I8x16GtS = 1000000 - I8x16GtU = 1000000 - I8x16LeS = 1000000 - I8x16LeU = 1000000 - I8x16GeS = 1000000 - I8x16GeU = 1000000 - I16x8Eq = 1000000 - I16x8Ne = 1000000 - I16x8LtS = 1000000 - I16x8LtU = 1000000 - I16x8GtS = 1000000 - I16x8GtU = 1000000 - I16x8LeS = 1000000 - I16x8LeU = 1000000 - I16x8GeS = 1000000 - I16x8GeU = 1000000 - I32x4Eq = 1000000 - I32x4Ne = 1000000 - I32x4LtS = 1000000 - I32x4LtU = 1000000 - I32x4GtS = 1000000 - I32x4GtU = 1000000 - I32x4LeS = 1000000 - I32x4LeU = 1000000 - I32x4GeS = 1000000 - I32x4GeU = 1000000 - F32x4Eq = 1000000 - F32x4Ne = 1000000 - F32x4Lt = 1000000 - F32x4Gt = 1000000 - F32x4Le = 1000000 - F32x4Ge = 1000000 - F64x2Eq = 1000000 - F64x2Ne = 1000000 - F64x2Lt = 1000000 - F64x2Gt = 1000000 - F64x2Le = 1000000 - F64x2Ge = 1000000 - V128Not = 1000000 - V128And = 1000000 - V128AndNot = 1000000 - V128Or = 1000000 - V128Xor = 1000000 - V128Bitselect = 1000000 - I8x16Neg = 1000000 - I8x16AnyTrue = 1000000 - I8x16AllTrue = 1000000 - I8x16Shl = 1000000 - I8x16ShrS = 1000000 - I8x16ShrU = 1000000 - I8x16Add = 1000000 - I8x16AddSaturateS = 1000000 - I8x16AddSaturateU = 1000000 - I8x16Sub = 1000000 - I8x16SubSaturateS = 1000000 - I8x16SubSaturateU = 1000000 - I8x16MinS = 1000000 - I8x16MinU = 1000000 - I8x16MaxS = 1000000 - I8x16MaxU = 1000000 - I8x16Mul = 1000000 - I16x8Neg = 1000000 - I16x8AnyTrue = 1000000 - I16x8AllTrue = 1000000 - I16x8Shl = 1000000 - I16x8ShrS = 1000000 - I16x8ShrU = 1000000 - I16x8Add = 1000000 - I16x8AddSaturateS = 1000000 - I16x8AddSaturateU = 1000000 - I16x8Sub = 1000000 - I16x8SubSaturateS = 1000000 - I16x8SubSaturateU = 1000000 - I16x8Mul = 1000000 - I16x8MinS = 1000000 - I16x8MinU = 1000000 - I16x8MaxS = 1000000 - I16x8MaxU = 1000000 - I32x4Neg = 1000000 - I32x4AnyTrue = 1000000 - I32x4AllTrue = 1000000 - I32x4Shl = 1000000 - I32x4ShrS = 1000000 - I32x4ShrU = 1000000 - I32x4Add = 1000000 - I32x4Sub = 1000000 - I32x4Mul = 1000000 - I32x4MinS = 1000000 - I32x4MinU = 1000000 - I32x4MaxS = 1000000 - I32x4MaxU = 1000000 - I64x2Neg = 1000000 - I64x2AnyTrue = 1000000 - I64x2AllTrue = 1000000 - I64x2Shl = 1000000 - I64x2ShrS = 1000000 - I64x2ShrU = 1000000 - I64x2Add = 1000000 - I64x2Sub = 1000000 - I64x2Mul = 1000000 - F32x4Abs = 1000000 - F32x4Neg = 1000000 - F32x4Sqrt = 1000000 - F32x4Add = 1000000 - F32x4Sub = 1000000 - F32x4Mul = 1000000 - F32x4Div = 1000000 - F32x4Min = 1000000 - F32x4Max = 1000000 - F64x2Abs = 1000000 - F64x2Neg = 1000000 - F64x2Sqrt = 1000000 - F64x2Add = 1000000 - F64x2Sub = 1000000 - F64x2Mul = 1000000 - F64x2Div = 1000000 - F64x2Min = 1000000 - F64x2Max = 1000000 - I32x4TruncSatF32x4S = 1000000 - I32x4TruncSatF32x4U = 1000000 - I64x2TruncSatF64x2S = 1000000 - I64x2TruncSatF64x2U = 1000000 - F32x4ConvertI32x4S = 1000000 - F32x4ConvertI32x4U = 1000000 - F64x2ConvertI64x2S = 1000000 - F64x2ConvertI64x2U = 1000000 - V8x16Swizzle = 1000000 - V8x16Shuffle = 1000000 - V8x16LoadSplat = 1000000 - V16x8LoadSplat = 1000000 - V32x4LoadSplat = 1000000 - V64x2LoadSplat = 1000000 - I8x16NarrowI16x8S = 1000000 - I8x16NarrowI16x8U = 1000000 - I16x8NarrowI32x4S = 1000000 - I16x8NarrowI32x4U = 1000000 - I16x8WidenLowI8x16S = 1000000 - I16x8WidenHighI8x16S = 1000000 - I16x8WidenLowI8x16U = 1000000 - I16x8WidenHighI8x16U = 1000000 - I32x4WidenLowI16x8S = 1000000 - I32x4WidenHighI16x8S = 1000000 - I32x4WidenLowI16x8U = 1000000 - I32x4WidenHighI16x8U = 1000000 - I16x8Load8x8S = 1000000 - I16x8Load8x8U = 1000000 - I32x4Load16x4S = 1000000 - I32x4Load16x4U = 1000000 - I64x2Load32x2S = 1000000 - I64x2Load32x2U = 1000000 - I8x16RoundingAverageU = 1000000 - I16x8RoundingAverageU = 1000000 - LocalAllocate = 5 - LocalsUnmetered = 100 - MaxMemoryGrowDelta = 1 - MaxMemoryGrow = 10 - Catch = 10 - CatchAll = 10 - Delegate = 10 - Rethrow = 10 - ReturnCall = 10 - ReturnCallIndirect = 10 - Throw = 10 - Try = 10 - Unwind = 10 - F32x4Ceil = 1000000 - F32x4DemoteF64x2Zero = 1000000 - F32x4Floor = 1000000 - F32x4Nearest = 1000000 - F32x4PMax = 1000000 - F32x4PMin = 1000000 - F32x4Trunc = 1000000 - F64x2Ceil = 1000000 - F64x2ConvertLowI32x4S = 1000000 - F64x2ConvertLowI32x4U = 1000000 - F64x2Floor = 1000000 - F64x2Nearest = 1000000 - F64x2PMax = 1000000 - F64x2PMin = 1000000 - F64x2PromoteLowF32x4 = 1000000 - F64x2Trunc = 1000000 - I16x8Abs = 1000000 - I16x8AddSatS = 1000000 - I16x8AddSatU = 1000000 - I16x8Bitmask = 1000000 - I16x8ExtAddPairwiseI8x16S = 1000000 - I16x8ExtAddPairwiseI8x16U = 1000000 - I16x8ExtMulHighI8x16S = 1000000 - I16x8ExtMulHighI8x16U = 1000000 - I16x8ExtMulLowI8x16S = 1000000 - I16x8ExtMulLowI8x16U = 1000000 - I16x8ExtendHighI8x16S = 1000000 - I16x8ExtendHighI8x16U = 1000000 - I16x8ExtendLowI8x16S = 1000000 - I16x8ExtendLowI8x16U = 1000000 - I16x8Q15MulrSatS = 1000000 - I16x8SubSatS = 1000000 - I16x8SubSatU = 1000000 - I32x4Abs = 1000000 - I32x4Bitmask = 1000000 - I32x4DotI16x8S = 1000000 - I32x4ExtAddPairwiseI16x8S = 1000000 - I32x4ExtAddPairwiseI16x8U = 1000000 - I32x4ExtMulHighI16x8S = 1000000 - I32x4ExtMulHighI16x8U = 1000000 - I32x4ExtMulLowI16x8S = 1000000 - I32x4ExtMulLowI16x8U = 1000000 - I32x4ExtendHighI16x8S = 1000000 - I32x4ExtendHighI16x8U = 1000000 - I32x4ExtendLowI16x8S = 1000000 - I32x4ExtendLowI16x8U = 1000000 - I32x4TruncSatF64x2SZero = 1000000 - I32x4TruncSatF64x2UZero = 1000000 - I64x2Abs = 1000000 - I64x2Bitmask = 1000000 - I64x2Eq = 1000000 - I64x2ExtMulHighI32x4S = 1000000 - I64x2ExtMulHighI32x4U = 1000000 - I64x2ExtMulLowI32x4S = 1000000 - I64x2ExtMulLowI32x4U = 1000000 - I64x2ExtendHighI32x4S = 1000000 - I64x2ExtendHighI32x4U = 1000000 - I64x2ExtendLowI32x4S = 1000000 - I64x2ExtendLowI32x4U = 1000000 - I64x2GeS = 1000000 - I64x2GtS = 1000000 - I64x2LeS = 1000000 - I64x2LtS = 1000000 - I64x2Ne = 1000000 - I8x16Abs = 1000000 - I8x16AddSatS = 1000000 - I8x16AddSatU = 1000000 - I8x16Bitmask = 1000000 - I8x16Popcnt = 1000000 - I8x16Shuffle = 1000000 - I8x16SubSatS = 1000000 - I8x16SubSatU = 1000000 - I8x16Swizzle = 1000000 - MemoryAtomicNotify = 1000000 - MemoryAtomicWait32 = 1000000 - MemoryAtomicWait64 = 1000000 - V128AnyTrue = 1000000 - V128Load16Lane = 1000000 - V128Load16Splat = 1000000 - V128Load16x4S = 1000000 - V128Load16x4U = 1000000 - V128Load32Lane = 1000000 - V128Load32Splat = 1000000 - V128Load32Zero = 1000000 - V128Load32x2S = 1000000 - V128Load32x2U = 1000000 - V128Load64Lane = 1000000 - V128Load64Splat = 1000000 - V128Load64Zero = 1000000 - V128Load8Lane = 1000000 - V128Load8Splat = 1000000 - V128Load8x8S = 1000000 - V128Load8x8U = 1000000 - V128Store16Lane = 1000000 - V128Store32Lane = 1000000 - V128Store64Lane = 1000000 - V128Store8Lane = 1000000 - -[MaxPerTransaction] - MaxBuiltInCallsPerTx = 100 - MaxNumberOfTransfersPerTx = 250 - MaxNumberOfTrieReadsPerTx = 1500 - -# Quadratic, Linear and Constant are the coefficients for a quadratic func. Separate variables are used for the -# sign of each coefficient, 0 meaning positive and 1 meaning negative -# The current values for the coefficients were computed based on benchmarking. -# For the given coefficients, the minimum of the function must not be lower than MinimumGasCost -[DynamicStorageLoad] - QuadraticCoefficient = 688 - SignOfQuadratic = 0 - LinearCoefficient = 31858 - SignOfLinear = 0 - ConstantCoefficient = 15287 - SignOfConstant = 0 - MinimumGasCost = 10000 diff --git a/integrationTests/relayers/testdata/config/nodeConfig/genesis.json b/integrationTests/relayers/testdata/config/nodeConfig/genesis.json deleted file mode 100644 index 27f74229..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/genesis.json +++ /dev/null @@ -1,497 +0,0 @@ -[ - { - "info": "delegator1 for legacy delegation", - "address": "erd1z48u9l275l2uy4augfytpp2355wvdnc4gwc9ms9gdhdqru3fz9eq5wqe3e", - "supply": "1001000000000000000000", - "balance": "1000000000000000000", - "stakingvalue": "0", - "delegation": { - "address": "erd1qqqqqqqqqqqqqpgqrchxzx5uu8sv3ceg8nx8cxc0gesezure5awqn46gtd", - "value": "1000000000000000000000" - } - }, - { - "info": "delegator2 for legacy delegation", - "address": "erd1qm5erxm0va3hcw9jfxtp2gl3u9q9p4k242pk9xx3vezefkgj2vhs0wk8cx", - "supply": "1001000000000000000000", - "balance": "1000000000000000000", - "stakingvalue": "0", - "delegation": { - "address": "erd1qqqqqqqqqqqqqpgqrchxzx5uu8sv3ceg8nx8cxc0gesezure5awqn46gtd", - "value": "1000000000000000000000" - } - }, - { - "info": "delegator3 for legacy delegation", - "address": "erd1rqwt9vpfn072tahtcvup2dxz4nvqfs3n5p9eh0jnypkppxmdheaqpcqfzz", - "supply": "1001000000000000000000", - "balance": "1000000000000000000", - "stakingvalue": "0", - "delegation": { - "address": "erd1qqqqqqqqqqqqqpgqrchxzx5uu8sv3ceg8nx8cxc0gesezure5awqn46gtd", - "value": "1000000000000000000000" - } - }, - { - "info": "delegator4 for legacy delegation", - "address": "erd17uygg7qq05mjhectgymj6fwq59ysr4p92cy0yz3jrxxj6253p40sj77wr6", - "supply": "1001000000000000000000", - "balance": "1000000000000000000", - "stakingvalue": "0", - "delegation": { - "address": "erd1qqqqqqqqqqqqqpgqrchxzx5uu8sv3ceg8nx8cxc0gesezure5awqn46gtd", - "value": "1000000000000000000000" - } - }, - { - "info": "delegator5 for legacy delegation", - "address": "erd1qslr87nj5gkv2396js3fa2za5kqgwugqnz4j4qqh22mxpnse2lws8srsq6", - "supply": "1001000000000000000000", - "balance": "1000000000000000000", - "stakingvalue": "0", - "delegation": { - "address": "erd1qqqqqqqqqqqqqpgqrchxzx5uu8sv3ceg8nx8cxc0gesezure5awqn46gtd", - "value": "1000000000000000000000" - } - }, - { - "info": "delegator6 for legacy delegation", - "address": "erd17pjlqg55c6v3fjvpqec8peefk74g8neygr84ymw7cqzudmzaw7lqnln7sz", - "supply": "1001000000000000000000", - "balance": "1000000000000000000", - "stakingvalue": "0", - "delegation": { - "address": "erd1qqqqqqqqqqqqqpgqrchxzx5uu8sv3ceg8nx8cxc0gesezure5awqn46gtd", - "value": "1000000000000000000000" - } - }, - { - "info": "delegator7 for legacy delegation", - "address": "erd19ztfuew6ejrwq5mpax4xztjwh5j63u9vge4dum9vlyy7hg3pc86qgmt6nm", - "supply": "1001000000000000000000", - "balance": "1000000000000000000", - "stakingvalue": "0", - "delegation": { - "address": "erd1qqqqqqqqqqqqqpgqrchxzx5uu8sv3ceg8nx8cxc0gesezure5awqn46gtd", - "value": "1000000000000000000000" - } - }, - { - "info": "delegator8 for legacy delegation", - "address": "erd1age5t5qfrke4vm47vaq9a4yewllh6227qm4fcy3rc7g5ktmzyatsgf4wcw", - "supply": "1001000000000000000000", - "balance": "1000000000000000000", - "stakingvalue": "0", - "delegation": { - "address": "erd1qqqqqqqqqqqqqpgqrchxzx5uu8sv3ceg8nx8cxc0gesezure5awqn46gtd", - "value": "1000000000000000000000" - } - }, - { - "info": "delegator9 for legacy delegation", - "address": "erd1jt0vv29trqs3nddzkxsf950xx0t5uvyncmuamwryneh9wsee5wpsgue96d", - "supply": "1001000000000000000000", - "balance": "1000000000000000000", - "stakingvalue": "0", - "delegation": { - "address": "erd1qqqqqqqqqqqqqpgqrchxzx5uu8sv3ceg8nx8cxc0gesezure5awqn46gtd", - "value": "1000000000000000000000" - } - }, - { - "info": "delegator10 for legacy delegation", - "address": "erd1c83rmk3n8ys4g9dkg3q70thx3v787qtpfmk23epu4xsadpyd3dnsejf2r7", - "supply": "1001000000000000000000", - "balance": "1000000000000000000", - "stakingvalue": "0", - "delegation": { - "address": "erd1qqqqqqqqqqqqqpgqrchxzx5uu8sv3ceg8nx8cxc0gesezure5awqn46gtd", - "value": "1000000000000000000000" - } - }, - { - "info": "wallet1 2500*8 staked + 10000 initial balance", - "address": "erd19ptzdk7zvs3csjjf8u04j5kxzn5jck409sefdyx6x9afkjg4wunsfw7rj7", - "supply": "30000000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "20000000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet2 2500*6 staked + 10000 initial balance", - "address": "erd1qz9gp38g4238r3077wq4tpc0jxaq0f87c0t2n2hr3x6fef85t3lshq2ejk", - "supply": "25000000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "15000000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet3 2500*4 staked + 10000 initial balance", - "address": "erd1tp2af4jvdh7p79myu5h6srtchh42p5e3pchqre3ejyyn9mqhwa3shpgj35", - "supply": "20000000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "10000000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet4 2500*4 staked + 10000 initial balance", - "address": "erd1e2ftj4hj43lkduwps9xdmtgjnmugkh9mndph4n2cxfmf6ufvn4ks0zut84", - "supply": "20000000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "10000000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet5 2500*3 staked + 10000 initial balance", - "address": "erd1dzjes5c6a8ru45clgla3q0k3ezm06svefjz7vzs8pjfnrqa8tcasl4j8hs", - "supply": "17500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "7500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet6 2500*3 staked + 10000 initial balance", - "address": "erd14gg3v6j4505ucx7t2wtl98tgupmyp748aq92jefmp5ha6e3pccgq9clwe9", - "supply": "17500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "7500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet7 2500*2 staked + 10000 initial balance", - "address": "erd1xdfc44mk4ut5cv6l3mq0py6h88cty9ykacskm8xv3tvrp893kmxqppcefg", - "supply": "15000000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "5000000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet8 2500*2 staked + 10000 initial balance", - "address": "erd1997jfwzrum4rrk59ar5supcyge9rpa73xgv2p45h3unt880v399svt8c9g", - "supply": "15000000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "5000000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet9 2500 staked + 10000 initial balance", - "address": "erd1e9cg9ys8fh77n9eaxpg47sxaes4fe9g2nvy6a65qpxykcx8grg9sv45lss", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet10 2500 staked + 10000 initial balance", - "address": "erd1xdrltsygywhmtxzsmrgjlsxsxrf4y2ayv0z50y666dgsp66trxwqzajk96", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet11 2500 staked + 10000 initial balance", - "address": "erd1lytewufjflpwl6gtf0faazjr59nd2fhfwlk7ew72hkpgdkmunl8qfrpywg", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet12 2500 staked + 10000 initial balance", - "address": "erd1s8tqztm4u4gw23489lps97qxe8vck8eln3a424y9c6yujsc96nas0l968d", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet13 2500 staked + 10000 initial balance", - "address": "erd1p7p0f3n8dxtj08hsp9hccqg932pd4f94rq3adg6g55etx8g4z8tsmg5e0g", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet14 2500 staked + 10000 initial balance", - "address": "erd1uyeel03ea837dphrx2ak77hdvlhjdcqdwgyg6k99gqn602ymsn7qptmedj", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet15 2500 staked + 10000 initial balance", - "address": "erd1ftyzkdhl7rl782mrzrdc2jck3egydp0ydzhcjm9gc8s2jym5egrqadl4h6", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet16 2500*3 staked + 10000 initial balance", - "address": "erd1rsl2sj5g87ltfq0hvrmgm35mlg4lzfs29p4gzxh0lh4vj2e8ykuqh69lha", - "supply": "17500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "7500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet17 2500*2 staked + 10000 initial balance", - "address": "erd19yrjty2l4ytl6d3jynp5mqfekq4uf2x93akz60w7l3cp6qzny3psnfyerw", - "supply": "15000000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "5000000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet18 2500 staked + 10000 initial balance", - "address": "erd148lq42zdzz34y0yr8avldsy7gw0rmuvj4lmstzug77v08z3q0ncszfk8w9", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet19 2500 staked + 10000 initial balance", - "address": "erd1k2v4h3805gnxf78c22g7lfe4pgq2lmr4ezmkk2rqkej6yjd7g5ssu88fme", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet20 2500 staked + 10000 initial balance", - "address": "erd1nzjyj2ykpway04pczl42fgrlza2f0eaf97fxgnuuw39vyee36xlqccc3qz", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet21 2500 staked + 10000 initial balance", - "address": "erd1yp0nvml5c45us3qzreqxkjxaakxn744t3gdva9s8xndcakzawutstepmm5", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet22 2500 staked + 10000 initial balance", - "address": "erd1qyg80tr4rd65ur3hedm9h4yv3fcwmm6vnyrypnm972nd80889hxqdfgwrc", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet23 2500 staked + 10000 initial balance", - "address": "erd14x6d48q59zjh5p909fyw7e46czftgdawyf734cnmgk5e63ghrvvsqp254t", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet24 2500 staked + 10000 initial balance", - "address": "erd1wyxylus33e476h5kta7e0caeqvgvcgrxh0az33e7szya6g7mh2ws0n27sa", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet25 2500 staked + 10000 initial balance", - "address": "erd1v3ylw7t6vzjzs06xjf6ccmf576ud38g2ws45tjkjg48s38jefpzqlwms9w", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet26 2500 staked + 10000 initial balance", - "address": "erd1twel4azu6uptw878y063p93mjr84y5m4kpsww2aeqj4pg5jeplgst04rhg", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet27 2500 staked + 10000 initial balance", - "address": "erd1q2se75ucl9as9j7e48v00jrnj6hvtk5vqxa4a3ag5729vctsdkasm20cyc", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet28 2500 staked + 10000 initial balance", - "address": "erd18cc6cm35xhv7kzwsm79l4ma6jpz3ee5l0yjxuc66kh6rcgtawtuq6lzp9f", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet29 2500 staked + 10000 initial balance", - "address": "erd1psux99h4jljyt3nkw8pruv3spw5r0unqe4wk8837mm9my88gl28qj6mml5", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet30 2500 staked + 10000 initial balance", - "address": "erd1vgm89ngmv2ghzsyq8xjtt45crekkxnhsq30yxzlq86uc3ra3r57qa3mw2p", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet31 2500 staked + 10000 initial balance", - "address": "erd1k767vmmn8vg8xvuny32ppwr4dxrlgmpykn0u7nm92evlag3wkukqdgsf5u", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet32 2500 staked + 10000 initial balance", - "address": "erd1hwe8lskmzsdpuy3f6hldamvn0zrhzldec8m4tt8hupq58d7gyrequy8wsp", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet33 2500 staked + 10000 initial balance", - "address": "erd125eyrjk99zadr04gm9z2p4nckmnegexs5nyk7ek85rut2665t75sql3w88", - "supply": "12500000000000000000000", - "balance": "10000000000000000000000", - "stakingvalue": "2500000000000000000000", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet34 no staking, initial funds - 10 million EGLD", - "address": "erd17ndrqg38lqf2zjgeqvle90rsn9ejrd9upx8evkyvh8e0m5xlph5scv9l6n", - "supply": "10000000000000000000000000", - "balance": "10000000000000000000000000", - "stakingvalue": "0", - "delegation": { - "address": "", - "value": "0" - } - }, - { - "info": "wallet35 no staking, initial funds - 9509990 EGLD", - "address": "erd1zed89c8226rs7f59zh2xea39qk9ym9tsmt4s0sg2uw7u9nvtzt3q8fdj2e", - "supply": "9509990000000000000000000", - "balance": "9509990000000000000000000", - "stakingvalue": "0", - "delegation": { - "address": "", - "value": "0" - } - } -] diff --git a/integrationTests/relayers/testdata/config/nodeConfig/genesisContracts/delegation.wasm b/integrationTests/relayers/testdata/config/nodeConfig/genesisContracts/delegation.wasm deleted file mode 100644 index d00f3f7d..00000000 Binary files a/integrationTests/relayers/testdata/config/nodeConfig/genesisContracts/delegation.wasm and /dev/null differ diff --git a/integrationTests/relayers/testdata/config/nodeConfig/genesisContracts/dns.wasm b/integrationTests/relayers/testdata/config/nodeConfig/genesisContracts/dns.wasm deleted file mode 100644 index ce692a12..00000000 Binary files a/integrationTests/relayers/testdata/config/nodeConfig/genesisContracts/dns.wasm and /dev/null differ diff --git a/integrationTests/relayers/testdata/config/nodeConfig/genesisSmartContracts.json b/integrationTests/relayers/testdata/config/nodeConfig/genesisSmartContracts.json deleted file mode 100644 index 198798c3..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/genesisSmartContracts.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "owner": "erd1vxy22x0fj4zv6hktmydg8vpfh6euv02cz4yg0aaws6rrad5a5awqgqky80", - "filename": "./config/genesisContracts/delegation.wasm", - "vm-type": "0500", - "init-parameters": "%validator_sc_address%@03E8@00@030D40@030D40", - "type": "delegation", - "version": "0.4.*" - }, - { - "owner": "erd188anxz35atlef7cucszypmvx88lhz4m7a7t7lhcwt6sfphpsqlkswfhcx2", - "filename": "./config/genesisContracts/dns.wasm", - "vm-type": "0500", - "init-parameters": "00", - "type": "dns", - "version": "0.2.*" - } -] diff --git a/integrationTests/relayers/testdata/config/nodeConfig/nodesSetup.json b/integrationTests/relayers/testdata/config/nodeConfig/nodesSetup.json deleted file mode 100644 index 741d9009..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/nodesSetup.json +++ /dev/null @@ -1,395 +0,0 @@ -{ - "startTime": 0, - "roundDuration": 6000, - "consensusGroupSize": 7, - "minNodesPerShard": 10, - "metaChainConsensusGroupSize": 10, - "metaChainMinNodes": 10, - "hysteresis": 0.2, - "adaptivity": false, - "initialNodes": [ - { - "info": "multikey - group1 - legacy delegation", - "pubkey": "309198fd7b6bccb1b6279ea2e5c5f2a33b9f6fe5f23180778d8721710344989b07d10dd1bd19307b3cd06eab9d1358062511610ccdad681ae1165016256cc1fdc0fed5041a5c29d7773b2994022bf2dc9efb937b3bb7cc9d72670448fad7d091", - "address": "erd1qqqqqqqqqqqqqpgqrchxzx5uu8sv3ceg8nx8cxc0gesezure5awqn46gtd", - "initialRating": 5000001 - }, - { - "info": "multikey - group1 - legacy delegation", - "pubkey": "cd8cc9d70a8f78df0922470f1ebee727f57a70fb0571c0b512475c8c7d3ce1d9b70dd28e6582c038b18d05f8fbd6ac0a167a38614c40353b32ef47896d13c45bde57e86d87dd6e6f73420db93aeb79a1fd8f4e297f70478685a38ed73e49598f", - "address": "erd1qqqqqqqqqqqqqpgqrchxzx5uu8sv3ceg8nx8cxc0gesezure5awqn46gtd", - "initialRating": 5000001 - }, - { - "info": "multikey - group1 - legacy delegation", - "pubkey": "e441b8a7d35545f7a02f0d57d144c89810d67ecb9abb5804d1bcfd8b270dc30978c56fbf9618e9a6621ca4e6c545c90807f7fe5edfd34ccab83db7bc0bd68536bb65403503d213c9763ec2137d80081579bb1b327f22c677bdb19891f4aae980", - "address": "erd1qqqqqqqqqqqqqpgqrchxzx5uu8sv3ceg8nx8cxc0gesezure5awqn46gtd", - "initialRating": 5000001 - }, - { - "info": "multikey - group1 - legacy delegation", - "pubkey": "72d8341713a271d510c7dfd02455ef86e9af4c66e06ac28fbb4c4e8df1e944e685bae2bee2af4101c19922b64e44e40b5d4905755594a719c1d50dc210515495d0de9b3a1d4ed42fd45a973353fe2c2548c45bb2157d8bf68e0937cc20fe1011", - "address": "erd1qqqqqqqqqqqqqpgqrchxzx5uu8sv3ceg8nx8cxc0gesezure5awqn46gtd", - "initialRating": 5000001 - }, - { - "info": "multikey - group1 - wallet1 with 8 BLS keys", - "pubkey": "796d2f56ee9fa8f4ff9fc7735bbb4d644be8dd044f7f965362aed3d562e00b11f730b2fe21eb9c9fd100b68a5d3dbf07bae63d25739f1304ab638330f0e8c207a76de648e2523ad1693f4ffe9def8a1d5aca2c6c1c14e1fcc20089db069d1a0e", - "address": "erd19ptzdk7zvs3csjjf8u04j5kxzn5jck409sefdyx6x9afkjg4wunsfw7rj7", - "initialRating": 5000001 - }, - { - "info": "multikey - group1 - wallet1 with 8 BLS keys", - "pubkey": "4cc0bfcdf4515927e3ae7890197bfd7c2e3c6f80ff7570fc6313d095e0d4e518ecc81db7087fefb8af166723a32ded1324f4ee00a6a97d206a024fd95ab60f7fe18c896c829ac43782c56d922415fb4ddbc0384936e3f860feb0666da43bcd19", - "address": "erd19ptzdk7zvs3csjjf8u04j5kxzn5jck409sefdyx6x9afkjg4wunsfw7rj7", - "initialRating": 5000001 - }, - { - "info": "multikey - group1 - wallet1 with 8 BLS keys", - "pubkey": "3449c9d672472ea52e83be4a8d6ce55785044233d848ac0a9a4b7fc22bf5b1bf5776f95f4b459f4e4cd3ba1d20b46a197c5a55ec00fa8d795d35f2232a6fae360129d186e3a0c219d42d8357de2823c8566da7841c2739b30d1581c4a38ec80e", - "address": "erd19ptzdk7zvs3csjjf8u04j5kxzn5jck409sefdyx6x9afkjg4wunsfw7rj7", - "initialRating": 5000001 - }, - { - "info": "multikey - group1 - wallet1 with 8 BLS keys", - "pubkey": "1bdef34453a83d19748b02d964c43409a66535678b6234c42d289ed2b7571bf60d35ba7a43cd951d4fc9fc2e8ff618038a2edc9cb0181dcac0b62a0859aafd8d9993aa3069c14fec11cb66a653311a37861d225847bf535bcb920b4f0ea98b8b", - "address": "erd19ptzdk7zvs3csjjf8u04j5kxzn5jck409sefdyx6x9afkjg4wunsfw7rj7", - "initialRating": 5000001 - }, - { - "info": "multikey - group1 - wallet1 with 8 BLS keys", - "pubkey": "3bd60bd8c5ace7d1999cd4bfd93dcb7bdc397d8d84efa5fd89439b7b727b0331bd00e3feae85df79e7d2b5eba1ea07003972fde3a7eb8d4ba25583a848be812e89b75fe8f3531d810ba2aaef629748ace6ac5ae73d8a2e6a65bb379f5be3b906", - "address": "erd19ptzdk7zvs3csjjf8u04j5kxzn5jck409sefdyx6x9afkjg4wunsfw7rj7", - "initialRating": 5000001 - }, - { - "info": "multikey - group1 - wallet1 with 8 BLS keys", - "pubkey": "2b9a1e5e291471f9eb0cf1a52db991f2dbb85446d132f47381b7912b041be00cccab748c25bdd6165cd6a517b6e99b0133bda4dc091dcdf6d17bc460ac0e8c6fe4b2460a980dd8dea8c857647bc5826a2b77fc8ba92c02deb2ba3daafb4d5407", - "address": "erd19ptzdk7zvs3csjjf8u04j5kxzn5jck409sefdyx6x9afkjg4wunsfw7rj7", - "initialRating": 5000001 - }, - { - "info": "multikey - group1 - wallet1 with 8 BLS keys", - "pubkey": "e464c43c4f3442ec520d4a6464d7fa96397ab711adf38b5a96f208303337f6a97ffdbd22e34a10deef6aa21ff078360d2bf7fae627a1ec55a9f120b35224b8e461b0f4de7d3ce800e6b910f37c4d03cce7039ce3a4a3a79ac0511c36435ccf85", - "address": "erd19ptzdk7zvs3csjjf8u04j5kxzn5jck409sefdyx6x9afkjg4wunsfw7rj7", - "initialRating": 5000001 - }, - { - "info": "multikey - group1 - wallet1 with 8 BLS keys", - "pubkey": "dab5c34e66e096d1f328fd9b045136724c8ccbf7b5a4bcf1e8c9edc9510712c0a7feff7818563aa799b37f1cdcfb330cc49d8482c7154988d33f63fe2526b27945326112c832fdf72a1b35f10da34c6e08b4079d9c56195c1ab64c84eab93b95", - "address": "erd19ptzdk7zvs3csjjf8u04j5kxzn5jck409sefdyx6x9afkjg4wunsfw7rj7", - "initialRating": 5000001 - }, - { - "info": "multikey - group1 - wallet2 with 6 BLS keys", - "pubkey": "a5624bec34e06d5026a334654be9e0118c8a02720a6bd868a51d5eb687819442cded09d1fef2e9d9db8bb2d5be01f1148b4819aee9e6a48b9c530285dbc4d800f4dd10d7f9a75d4b36de8fb52aec672cec91e0256f7e9848b10219748d9e708b", - "address": "erd1qz9gp38g4238r3077wq4tpc0jxaq0f87c0t2n2hr3x6fef85t3lshq2ejk", - "initialRating": 5000001 - }, - { - "info": "multikey - group2 - wallet2 with 6 BLS keys", - "pubkey": "eedbc5a3141b92148205d178d150905e68ca745ba54617025f84b33c91233afda2c2109084821e14f9a50d3f220fbc000ce6ad432f2a1865da9c6547016ecc7e07242ef490c0bdda29ec677f3e833f54eb2cf27e95b10b8edbdfa7de4e1bc000", - "address": "erd1qz9gp38g4238r3077wq4tpc0jxaq0f87c0t2n2hr3x6fef85t3lshq2ejk", - "initialRating": 5000001 - }, - { - "info": "multikey - group2 - wallet2 with 6 BLS keys", - "pubkey": "48c77bbf5d619fb13d76883736c664493b323c00f89131c9d70b3e4ac875103bd8248e790e47a82c9fdcd46fe33b52093a4b3b248ce20e6f958acd22dfb17335fcaf752bab5e29934f0a7e0af54fb2f51a9e6b1be30abdd701f7c9fbd0ad5d8e", - "address": "erd1qz9gp38g4238r3077wq4tpc0jxaq0f87c0t2n2hr3x6fef85t3lshq2ejk", - "initialRating": 5000001 - }, - { - "info": "multikey - group2 - wallet2 with 6 BLS keys", - "pubkey": "dd59e326a160d3b49ca25f2ab93b4f7ba766b124de66b68507b9e7a9cf69df7c4fca695592eb31e7e63061daef52d30cc1d362fc612d22631398cad4af46969e35407b293808133fc130b8f930ba41c6b88bc9ed9b884892113593d3ffc55297", - "address": "erd1qz9gp38g4238r3077wq4tpc0jxaq0f87c0t2n2hr3x6fef85t3lshq2ejk", - "initialRating": 5000001 - }, - { - "info": "multikey - group2 - wallet2 with 6 BLS keys", - "pubkey": "6b1a8bf3e5e7bacaaf99e3c89891a8a4ec7e9022986043f8206db9171ede3bd8cdcbbd7e8e1234180de5d651110ef706a8d964cb35048bc961611b55c8d9bd1b942b93c7e1b88157e7f79f2c08dbabe1af4612afe6044ab1be316976111b7019", - "address": "erd1qz9gp38g4238r3077wq4tpc0jxaq0f87c0t2n2hr3x6fef85t3lshq2ejk", - "initialRating": 5000001 - }, - { - "info": "multikey - group2 - wallet2 with 6 BLS keys", - "pubkey": "d8f8ef204ac892dd1a04648fc449ffdd11418dbd5c8fe623e5efda0bcae47cb41eb99c981585d80be1d668d8b7466619b6ead4d83976cc4f6879627a455603a74ab2adbfb5fed0f1a2b954363d97cbd3ac7feb284c83ac64422fad518e589c8e", - "address": "erd1qz9gp38g4238r3077wq4tpc0jxaq0f87c0t2n2hr3x6fef85t3lshq2ejk", - "initialRating": 5000001 - }, - { - "info": "multikey - group2 - wallet3 with 4 BLS keys", - "pubkey": "f547e115b1ada7cf9b8aeef45ee0d9ec4b206315ef44be706d994a0571688cd96291d1ab6c3761df29d00a2ba290a3185e4796bc49891906f86e16da01af3fd52320944b96b60e679ac8e686d4819e97e15e5fe46503c556b4acdd8079624005", - "address": "erd1tp2af4jvdh7p79myu5h6srtchh42p5e3pchqre3ejyyn9mqhwa3shpgj35", - "initialRating": 5000001 - }, - { - "info": "multikey - group2 - wallet3 with 4 BLS keys", - "pubkey": "0e5cc5f218a8fa9bae1f6b452430c0de205e6b251d0f1d606d1ce28203fb556768e6c4545ce8e90d640ef2cc1062f40ccf2ede124b926cbf3b2b0050b0e19f67e7e36ac1a7049178a77cbd65ee30cd0a40d9f98846ce439cc120717501f03180", - "address": "erd1tp2af4jvdh7p79myu5h6srtchh42p5e3pchqre3ejyyn9mqhwa3shpgj35", - "initialRating": 5000001 - }, - { - "info": "multikey - group2 - wallet3 with 4 BLS keys", - "pubkey": "760dc22525dce5be65a3a55ee07f7f012e0a89f435daec56eb475b0b5ca2d84b157894b8df64dfb570ecc633d5e1611639d43976e29f11c232236a9548b0145ee4e43fe495252c8c1f006b8df51d3835dee64a826f43167096b347b6919aa292", - "address": "erd1tp2af4jvdh7p79myu5h6srtchh42p5e3pchqre3ejyyn9mqhwa3shpgj35", - "initialRating": 5000001 - }, - { - "info": "multikey - group2 - wallet3 with 4 BLS keys", - "pubkey": "39316473217f7c435a543efa078254198dd079e3c6505e7cc1564b033de8a161dc2e9c392b1e584440510113b5942816102d7be5f4af9461af21a454fc1938a962b256c1c1d1f939198029ed0bf22c62893038d5687787cb46436c0ef4f12417", - "address": "erd1tp2af4jvdh7p79myu5h6srtchh42p5e3pchqre3ejyyn9mqhwa3shpgj35", - "initialRating": 5000001 - }, - { - "info": "multikey - group2 - wallet4 with 4 BLS keys", - "pubkey": "6a3b9f6b5fd38e79433daa9bf03543314f8a2a3d9f1fec8ebe2bc1ee97f135d83845dcecd201207c1b31d7624ddb330ae67fbfab4137cd734d96bc0975ae8bcfeecc4441b384d39d6900cdb7436450c23b4cc7674ec50055ea4a90861c503a91", - "address": "erd1e2ftj4hj43lkduwps9xdmtgjnmugkh9mndph4n2cxfmf6ufvn4ks0zut84", - "initialRating": 5000001 - }, - { - "info": "multikey - group2 - wallet4 with 4 BLS keys", - "pubkey": "ee8c987b9af9bba2912763fb7fcd6d6575db60806c5041fa91816ecc339ccfd60bf3cf49fb7017158f0b8e6050276907620bc040816207f14a952bb86752816231ae7f31ff701862cfe0abca367fc4cd63bafd4ad6e4df67612e4ec71462650c", - "address": "erd1e2ftj4hj43lkduwps9xdmtgjnmugkh9mndph4n2cxfmf6ufvn4ks0zut84", - "initialRating": 5000001 - }, - { - "info": "multikey - group2 - wallet4 with 4 BLS keys", - "pubkey": "cfe96f6b010d08f211c83f4ae3eb451d1d5205a50bdcd451706044dc21f523d25f214ab89dd5aab7ae03111197d6e6156e70ab348c9b0fab0a7839ea57fef6cd2324882b4387014dba201e6f87d5ca395e14d900e4563494f4f11a69ef6cdf14", - "address": "erd1e2ftj4hj43lkduwps9xdmtgjnmugkh9mndph4n2cxfmf6ufvn4ks0zut84", - "initialRating": 5000001 - }, - { - "info": "multikey - group2 - wallet4 with 4 BLS keys", - "pubkey": "05e9e43732ecff55e553b35b5ee1416065818db162a6fbf096186a1230d88bd057cebb72c5afaec16a803c4c4f69770752fe29be73a4069d0d01666ede963271192d4f324f2b3dcaec8b2c871c23cf185579a039dd5ab093c7cd9bca53e09c85", - "address": "erd1e2ftj4hj43lkduwps9xdmtgjnmugkh9mndph4n2cxfmf6ufvn4ks0zut84", - "initialRating": 5000001 - }, - { - "info": "multikey - group3 - wallet5 with 3 BLS keys", - "pubkey": "82cfc47999d1499cb880d46e8280b8c4fe576dff20a8ca6f6ac551887c637f935153f9ce2f21921a532477535d42ac05f730760c78415756add2eab6d57d94916f3ad51590b23404739d152f89b6d052df48cace1793897cd4eba722247a6195", - "address": "erd1dzjes5c6a8ru45clgla3q0k3ezm06svefjz7vzs8pjfnrqa8tcasl4j8hs", - "initialRating": 5000001 - }, - { - "info": "multikey - group3 - wallet5 with 3 BLS keys", - "pubkey": "7675098e73574db9c59bdce61e4b80251c6536201715dca40b2b69c09ce097690f3a9095d22b006531e3b13b30894803bd7ede3e6d80c9064c431f8671db085ab1052354cb26a7a2436340b273b6c95c84ab94bb9531b99c5f883602b5284017", - "address": "erd1dzjes5c6a8ru45clgla3q0k3ezm06svefjz7vzs8pjfnrqa8tcasl4j8hs", - "initialRating": 5000001 - }, - { - "info": "multikey - group3 - wallet5 with 3 BLS keys", - "pubkey": "c50f398a853c670ed625a12eddae175df5a90e034a54484a832566fc91f9b83d5daf1bc821cc347ba7e45f3acd4e1d00d0d7f52235824fd1326a7f370b58fc7dd98edfff4a41739a2015c6ed3a3c0bf3c986efeee187be70f1133fc4379dad95", - "address": "erd1dzjes5c6a8ru45clgla3q0k3ezm06svefjz7vzs8pjfnrqa8tcasl4j8hs", - "initialRating": 5000001 - }, - { - "info": "multikey - group3 - wallet6 with 3 BLS keys", - "pubkey": "4bd3f30f608b22b32100c6360def228ec95aa24e3048010bb64606392f602e180a0b2a12f7f92ef1d7f73ce1271ae30693bec692b15802c7ba079939640570fdc7f4d411c084ed0fe612ee223227ca3d02dc9732cf686ba8885007de53f8ec89", - "address": "erd14gg3v6j4505ucx7t2wtl98tgupmyp748aq92jefmp5ha6e3pccgq9clwe9", - "initialRating": 5000001 - }, - { - "info": "multikey - group3 - wallet6 with 3 BLS keys", - "pubkey": "71e8458f92997a00c1cd0e638b9ec42ab136828fc13f0ec643b60af451270cc81d50f4c4578a7c93a700ee21e065281593e7995d2454356cbfdeadb9ffe7bf33ba8f7a31a1d2e76bba5a5f88a613ef37e35595838d0b7f4bd12da7d6fe743499", - "address": "erd14gg3v6j4505ucx7t2wtl98tgupmyp748aq92jefmp5ha6e3pccgq9clwe9", - "initialRating": 5000001 - }, - { - "info": "multikey - group3 - wallet6 with 3 BLS keys", - "pubkey": "d9c30948bffad18776b786f6367142b76605ac6e33a8d38c68c31c7afb099f1a83efb752a87afaf9d04a4a8fb656e40bfe2a4aa6e0c16b82d22bd6c232c2ce5e6672ac6232d2da6945bc033b04cbaaeb4b9af4b29585094e034ab8dcfb8b9c19", - "address": "erd14gg3v6j4505ucx7t2wtl98tgupmyp748aq92jefmp5ha6e3pccgq9clwe9", - "initialRating": 5000001 - }, - { - "info": "multikey - group3 - wallet7 with 2 BLS keys", - "pubkey": "55fc7ab2e8c0a07bef2e1a9b35764cee1d604cb5634b7226a7310ce56a1f02e99d248fc5b416c4253ac7b88353b1a60f31e1104534e36cb00f46bdcb20a0d24f453e2c8d3cc48dc3c6086edbe16149aae14eb3a4d24ee2b217a4759bc0c0ea88", - "address": "erd1xdfc44mk4ut5cv6l3mq0py6h88cty9ykacskm8xv3tvrp893kmxqppcefg", - "initialRating": 5000001 - }, - { - "info": "multikey - group3 - wallet7 with 2 BLS keys", - "pubkey": "a8e662e63ad0e87f2dc66cbed41d398b73a2da2aaced6cc466ed378b62daee28b3db8e8327a06278a094b05840965c17448ffc8a1c96e532a7960d1a15d2cabd16edadc476bfb4af3a825aff801f615d127b70b4745b88e01627a99ba52d5317", - "address": "erd1xdfc44mk4ut5cv6l3mq0py6h88cty9ykacskm8xv3tvrp893kmxqppcefg", - "initialRating": 5000001 - }, - { - "info": "multikey - group3 - wallet8 with 2 BLS keys", - "pubkey": "f5e5eb9dd18aeb5d4829ab08795a9e4c8632a4fd248feed68382add1f2474d3cec042d51b897871bfee1f1c1fbeabf13d1c39d4f9b412948d27737f2b82e85474b7049a700ee8735373564791f0d20692dd1f8b494de7bab0a8415f01532ed90", - "address": "erd1997jfwzrum4rrk59ar5supcyge9rpa73xgv2p45h3unt880v399svt8c9g", - "initialRating": 5000001 - }, - { - "info": "multikey - group3 - wallet8 with 2 BLS keys", - "pubkey": "e66d7ac5e51a382164aeaae9924dda3272296a145d3c6178b962e3b7eb83e75515e665c327e86f3ef597ca840f8c5c0ace19ac9a8fbcdc573f9237d112fb1c467d646737863ccd1fe61f4c4341f9805f8e1fe98348b50c3c3f93f62de3975980", - "address": "erd1997jfwzrum4rrk59ar5supcyge9rpa73xgv2p45h3unt880v399svt8c9g", - "initialRating": 5000001 - }, - { - "info": "multikey - group3 - wallet9", - "pubkey": "2a1c49643e564cdf28bba96dfd6cd8ad38a5958b2b3c9a8293ffb54e9df0a0188a67de2fb947b8ae3dd06b7411aaae0e8bedef795ad3b35ac9f1402dcd0631d9d530b01b3880362fbd3ed9a8488ecabfb1b46cac225c5d48c39be3e28503f90f", - "address": "erd1e9cg9ys8fh77n9eaxpg47sxaes4fe9g2nvy6a65qpxykcx8grg9sv45lss", - "initialRating": 5000001 - }, - { - "info": "multikey - group3 - wallet10", - "pubkey": "5c9784523f360a802d4687c9c76bcef41a738d034aa8503a055c33898504b09670c1f637ca632e5290b3acf79a2191072f68c4192a9cbeb34f50c4a941e34247a64f642a6a074bec683bdfb83587cfdc0390ebd74505cb836cf04f3268e32f99", - "address": "erd1xdrltsygywhmtxzsmrgjlsxsxrf4y2ayv0z50y666dgsp66trxwqzajk96", - "initialRating": 5000001 - }, - { - "info": "multikey - group3 - wallet11", - "pubkey": "db7f7726c3e68abb28d070f529f2c222755d863aa9d7c0200fde10c93ccb8edcee8d45c9eb925bd5a0fa33c54d19270b7058f6e72256dad84214375f189310a73153cd84feef4b493ab61437b0cbcc2c592e6c093653a533631c8e0ab036c207", - "address": "erd1lytewufjflpwl6gtf0faazjr59nd2fhfwlk7ew72hkpgdkmunl8qfrpywg", - "initialRating": 5000001 - }, - { - "info": "multikey - group3 - wallet12", - "pubkey": "a27b6f47c53263e5c8d69779a169d50605cdd7ddb4b5384f2d46e08ace6f787a60f6cf26256b62fafba9c91a87ff070bc99254fcb5a73239fc14f2108de62189005b51b21e2922b37c6cc657017832e3a59dfcc7a54ac5dcb997136da4e2748b", - "address": "erd1s8tqztm4u4gw23489lps97qxe8vck8eln3a424y9c6yujsc96nas0l968d", - "initialRating": 5000001 - }, - { - "info": "single key 1 - wallet13", - "pubkey": "d3e0427c22ff9cc80ef4156f976644cfa25c54e5a69ed199132053f8cbbfddd4eb15a2f732a3c9b392169c8b1d060e0b5ab0d88b4dd7b4010fa051a17ef81bdbace5e68025965b00bf48e14a9ec8d8e2a8bcc9e62f97ddac3268f6b805f7b80e", - "address": "erd1p7p0f3n8dxtj08hsp9hccqg932pd4f94rq3adg6g55etx8g4z8tsmg5e0g", - "initialRating": 5000001 - }, - { - "info": "single key 2 - wallet14", - "pubkey": "b0b6349b3f693e08c433970d10efb2fe943eac4057a945146bee5fd163687f4e1800d541aa0f11bf9e4cb6552f512e126068e68eb471d18fcc477ddfe0b9b3334f34e30d8b7b2c08f914f4ae54454f75fb28922ba9fd28785bcadc627031fa8a", - "address": "erd1uyeel03ea837dphrx2ak77hdvlhjdcqdwgyg6k99gqn602ymsn7qptmedj", - "initialRating": 5000001 - }, - { - "info": "single key 3 - wallet15", - "pubkey": "67c301358a41bef74df2ae6aa9914e3a5e7a4b528bbd19596cca4b2fd97a62ab2c0a88b02adf1c5973a82c7544cdc40539ae62a9ac05351cfc59c300bbf4492f4266c550987355c39cff8e84ff74e012c7fd372c240eeb916ef87eead82ffd98", - "address": "erd1ftyzkdhl7rl782mrzrdc2jck3egydp0ydzhcjm9gc8s2jym5egrqadl4h6", - "initialRating": 5000001 - }, - { - "info": "single key 4 - wallet16 with 3 BLS keys", - "pubkey": "ab0a22ba2be6560af8520208393381760f9d4f69fca4f152b0a3fe7b124dd7f932fd8c1fbb372792c235baafac36030ceaf6ebf215de4e8d8d239f347f2fed10a75a07cbf9dc56efbbfca2e319152a363df122c300cdeb2faa02a61ebefd8a0e", - "address": "erd1rsl2sj5g87ltfq0hvrmgm35mlg4lzfs29p4gzxh0lh4vj2e8ykuqh69lha", - "initialRating": 5000001 - }, - { - "info": "single key 5 - wallet16 with 3 BLS keys", - "pubkey": "caa87d67e195b52355d2c8f7f74c829395b134bd4a911f158e04b2d7e66a5ba195265743f10cf190105512fb3df9d708a8056c07a6165874d8749742502c0eada7d15b6c55f22c2cce2cf5001288f6b2d89319e6ff888344c01adcd362be8998", - "address": "erd1rsl2sj5g87ltfq0hvrmgm35mlg4lzfs29p4gzxh0lh4vj2e8ykuqh69lha", - "initialRating": 5000001 - }, - { - "info": "single key 6 - wallet16 with 3 BLS keys", - "pubkey": "598be7548d6bb605bd19d83037bf58a7797a4e48b33011a60a5633cf6fe8d59906130777c46f50a50d3d0f958effb5147befd5d67cbec7c5daddeaade4dca5d8a54fe0394fde7b6455e4fc4db91f33f907d450b45fc2d4a9990f96d893093d91", - "address": "erd1rsl2sj5g87ltfq0hvrmgm35mlg4lzfs29p4gzxh0lh4vj2e8ykuqh69lha", - "initialRating": 5000001 - }, - { - "info": "single key 7 - wallet17 with 2 BLS keys", - "pubkey": "69b277b127d025638dbb54d36baa8321540f6210fc5edaac77f94798c039a383aead3ae7c93cdfb8b4caab93a952d101ee2322c129b6ce2726359a65aa326bd35e54c974118503944fcaf80be80b5c3fc9cf86d574d0096140f16fbc55fc4984", - "address": "erd19yrjty2l4ytl6d3jynp5mqfekq4uf2x93akz60w7l3cp6qzny3psnfyerw", - "initialRating": 5000001 - }, - { - "info": "single key 8 - wallet17 with 2 BLS keys", - "pubkey": "a006ad94b28c414c6ec0a5effb84594f39ede4f82b60aa077e2065b89407c78dd6479ebceed7bd42ed2779c34b718f11651427e550948cb8be2e6cea03a128ac3c52e599ada6f34912b119f94de472af0397a68769f1b3f647e87090918e030b", - "address": "erd19yrjty2l4ytl6d3jynp5mqfekq4uf2x93akz60w7l3cp6qzny3psnfyerw", - "initialRating": 5000001 - }, - { - "info": "single key 9 - wallet18", - "pubkey": "91874fdfa8dfb85faf4f404b21c95fbb5d154db5a6abe46bd7860de9e5ddb78b61b5c6ddcf86e5ec8a237e130ed0fc0e418fb97d6fce5f6642ba33f99eff694ec7fb2921b423899a9a5888914bd625636a9b1ea186566561cd35b79aaca20e88", - "address": "erd148lq42zdzz34y0yr8avldsy7gw0rmuvj4lmstzug77v08z3q0ncszfk8w9", - "initialRating": 5000001 - }, - { - "info": "single key 10 - wallet19", - "pubkey": "cc3e0c1021f8c4c092499547b064cffef19d07f0bf250e5265cea1e49b282a7f6efb4b415ad37db2ef6efa253475f511e74efc2f76c087c9798f72187986bb752f61d0ac220045f8e2d945343f3bbb8ef34a6025fb855dd7d953a81477ad2309", - "address": "erd1k2v4h3805gnxf78c22g7lfe4pgq2lmr4ezmkk2rqkej6yjd7g5ssu88fme", - "initialRating": 5000001 - }, - { - "info": "single key 11 - wallet20", - "pubkey": "c2885340a6ba4341d68f80ce419deadf374bc52e2749c278b5bce5f795e9a90a04ef4f07a0b47777feb1982749b57a174b4927338df9da99a417a2df3152a9ebaf3465bfc092058324edf6892313f24be4612eb5663bb59d67a831dda135aa8b", - "address": "erd1nzjyj2ykpway04pczl42fgrlza2f0eaf97fxgnuuw39vyee36xlqccc3qz", - "initialRating": 5000001 - }, - { - "info": "single key 12 - wallet21", - "pubkey": "cf8a2f97b7822acb16016a6debaaedea39959c9ac60b80e50f24734a0e0f6128ed1d216f5aed71866ca34bb30b6e8300e7995237744e766f6016ca28d4ebb2274326cb7af1a3c12d795cc127a4bf9aa9497d89ef0450c40f675afd1afa761012", - "address": "erd1yp0nvml5c45us3qzreqxkjxaakxn744t3gdva9s8xndcakzawutstepmm5", - "initialRating": 5000001 - }, - { - "info": "single key 13 - wallet22", - "pubkey": "95a81b70474d59c1292bc5742db1a7b9bf03cb516ede6fb5cb3489ee812de8cccfc648f3ff3cda26106396a38c1c1f183b722392397a752d949c5123888b7a8ec012fe518f6efc25015a620b1559e4609286b52921e06b79fd563a9b3b4c4e16", - "address": "erd1qyg80tr4rd65ur3hedm9h4yv3fcwmm6vnyrypnm972nd80889hxqdfgwrc", - "initialRating": 5000001 - }, - { - "info": "single key 14 - wallet23", - "pubkey": "5909def579148f456e8490659b859f80f8ccd62b5adda411e1acdc615c2ec795a88632cf2ec210a56ba91973fd3f07160f559f82f7afaafee008679fefb1b0cd2f26f4324197e6239c000accd1c427138568a8a9e276690c154d3df71a1f970c", - "address": "erd14x6d48q59zjh5p909fyw7e46czftgdawyf734cnmgk5e63ghrvvsqp254t", - "initialRating": 5000001 - }, - { - "info": "single key 15 - wallet24", - "pubkey": "58d6cfe7e8c3ec675da17e492c4ba97759fa15fc0f41bbe29d1d49d5f5ca7db142450ada15e1e4bf4657614e26cceb04ed5c0ca17207b0e24c4baf5f91afc092d43a02aaeae76218420817c85292f8de7d3a2b4f3c8615c2bb6a6d1c74267788", - "address": "erd1wyxylus33e476h5kta7e0caeqvgvcgrxh0az33e7szya6g7mh2ws0n27sa", - "initialRating": 5000001 - }, - { - "info": "single key 16 - wallet25", - "pubkey": "eb79770be0ae70e1d6932832eab94117b0c1a2442b3fdb380b1ad5a809b6221a4905e02a628886c925d152c4e5006413fe69d1f11cf543f4802d4ce4e5eac2b18b78a79215c737e2e098b40802044bc6e946b712299286c34f6d33d8b681790d", - "address": "erd1v3ylw7t6vzjzs06xjf6ccmf576ud38g2ws45tjkjg48s38jefpzqlwms9w", - "initialRating": 5000001 - }, - { - "info": "single key 17 - wallet26", - "pubkey": "bc03265a52610464f2f0431a69647be3106924f5bf67cf87cd889bf86d81739b3f0f37bad11ab93c5209dc4496f4130d69a9649596b97884b7e91e0b4d7c59169dd0729ac3e3bcd308efac56bc29d3cc249d8759580ab117943aa40df3baac05", - "address": "erd1twel4azu6uptw878y063p93mjr84y5m4kpsww2aeqj4pg5jeplgst04rhg", - "initialRating": 5000001 - }, - { - "info": "single key 18 - wallet27", - "pubkey": "aa4be8f36c2880ee4d2ca79dbd7a53537e3965f255dfb5c75324fe29fcb6ce56148fbaea334268e413f0df95f580c40fb3484165b2852236e3a1aa68151ac3327d981cfae52d99f9a564bd3139cdd768661854dae78880d9320191cdb2989815", - "address": "erd1q2se75ucl9as9j7e48v00jrnj6hvtk5vqxa4a3ag5729vctsdkasm20cyc", - "initialRating": 5000001 - }, - { - "info": "single key 19 - wallet28", - "pubkey": "3e86fea8365791b3becfc9aa2bc239f6be58725e61e46e7935c56479ad285e0781da1f277980d2e1d0ecff3982f2d90f321aa03f3d934adf260628d0ed0dc81a98dfaf1e6278e042d6c78dc65f2fa79d3b457754a321b8a0d7bf9998feeea817", - "address": "erd18cc6cm35xhv7kzwsm79l4ma6jpz3ee5l0yjxuc66kh6rcgtawtuq6lzp9f", - "initialRating": 5000001 - }, - { - "info": "single key 20 - wallet29", - "pubkey": "aa92cf6e0ac62df09e7adca139c41a162ad668e7a797770b6d195cd9b175d0fca9eac3f4bf859967139f2ba109741a144e3dc5e6ccaeb6cd21f1d202b10f08832274cd9cdf6b10dbc2c60acdd1c70ae9beae2139e2b69eccbcde32a7f3991393", - "address": "erd1psux99h4jljyt3nkw8pruv3spw5r0unqe4wk8837mm9my88gl28qj6mml5", - "initialRating": 5000001 - }, - { - "info": "single key 21 - wallet30", - "pubkey": "f2b7819d1c2e2e1d007edcf896034085645f3c81e7c7fe21aa7ad4f35f8b863ee1db13448d15a3d0d15018f741a991010a9374710b628e41ef078be8a10249f2a3000598432c28186af1c04a219ac914434dca9c27e61485d701505112093f8a", - "address": "erd1vgm89ngmv2ghzsyq8xjtt45crekkxnhsq30yxzlq86uc3ra3r57qa3mw2p", - "initialRating": 5000001 - }, - { - "info": "single key 22 - wallet31", - "pubkey": "292742eee9d12dade21b4cd8bcd44c210c26d927ef6dbd9cad59008643a971a86ea6dfce247515d4266789b3fe8e35167278e781e52b4cd7b9781554ba67ecc08680eb19628e7741c94d8456090a08aceab1c8d2ed39bf59e8e282381aa32a0a", - "address": "erd1k767vmmn8vg8xvuny32ppwr4dxrlgmpykn0u7nm92evlag3wkukqdgsf5u", - "initialRating": 5000001 - }, - { "info": "single key 23 - wallet32", - "pubkey": "11f784d2970d65769ce267710b3d08b28b78c3f79283758918c8ef15717ccbe90c23348cafe0e98a5d101b8dafbe7d081c6821dee8bf40ba150664ccc2dbbdd6358c92404e677d82910ce61f1d7584fbbbc9ebf71b7f35a118556e2a5c220501", - "address": "erd1hwe8lskmzsdpuy3f6hldamvn0zrhzldec8m4tt8hupq58d7gyrequy8wsp", - "initialRating": 5000001 - }, - { - "info": "single key 24", - "pubkey": "0382c11222db8a15e42e3ff64893df46c7720b439fb2a546462815ac0a8fa3bed99fceae5da9b68524e36f61cc074d09ceafec274c54f182c56a77583f9421f19c777265c43da1d5747304b36f0367cf3e8e5f63f41dad1a4362d9e1997a9e16", - "address": "erd125eyrjk99zadr04gm9z2p4nckmnegexs5nyk7ek85rut2665t75sql3w88", - "initialRating": 5000001 - } - ] -} diff --git a/integrationTests/relayers/testdata/config/nodeConfig/p2p.toml b/integrationTests/relayers/testdata/config/nodeConfig/p2p.toml deleted file mode 100644 index 519b7684..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/p2p.toml +++ /dev/null @@ -1,87 +0,0 @@ -# P2P config file - -# NodeConfig holds the P2P settings -[Node] - # Port is the port that will be opened by the node on all interfaces so other peers can connect to it - # If the port = 0, the node will search for a free port on the machine and use it - Port = "37373-38383" - - # ThresholdMinConnectedPeers represents the minimum number of connections a node should have before it can start - # the sync and consensus mechanisms - ThresholdMinConnectedPeers = 3 - - # MinNumPeersToWaitForOnBootstrap is the minimum number of peers to wait on bootstrap or the node will wait the default - # time which is now set to ~20 seconds (the const defined in the common package named TimeToWaitForP2PBootstrap) - MinNumPeersToWaitForOnBootstrap = 10 - - # available transports. All defined addresses contains a single '%d' markup that is mandatory and will - # be replaced at runtime with the actual port value - [Node.Transports] - QUICAddress = "" # optional QUIC address. If this transport should be activated, should be in this format: /ip4/0.0.0.0/udp/%d/quic-v1 - WebSocketAddress = "" # optional WebSocket address. If this transport should be activated, should be in this format: /ip4/0.0.0.0/tcp/%d/ws - WebTransportAddress = "" # optional WebTransport address. If this transport should be activated, should be in this format: /ip4/0.0.0.0/udp/%d/quic-v1/webtransport - [Node.Transports.TCP] - ListenAddress = "/ip4/0.0.0.0/tcp/%d" # TCP listen address - PreventPortReuse = false - - [Node.ResourceLimiter] - Type = "default autoscale" #available options "default autoscale", "infinite", "default with manual scale". - ManualSystemMemoryInMB = 0 # not taken into account if the type is not "default with manual scale" - ManualMaximumFD = 0 # not taken into account if the type is not "default with manual scale" - -# P2P peer discovery section - -# The following sections correspond to the way new peers will be discovered -# If all config types are disabled then the peer will run in single mode (will not try to find other peers) -# If more than one peer discovery mechanism is enabled, the application will output an error and will not start - -[KadDhtPeerDiscovery] - # Enabled: true/false to enable/disable this discovery mechanism - Enabled = true - - # Type represents the kad-dht glue code implementation. - # "legacy" will define the first implementation. - # "optimized" represents the new variant able to connect to multiple seeders at once. This implementation also has - # a built-in timer that will try to automatically reconnect to the seeders (in case the seeders recover after a - # premature shutdown) - Type = "optimized" - - # RefreshIntervalInSec represents the time in seconds between querying for new peers - RefreshIntervalInSec = 10 - - # ProtocolID represents the protocol that this node will advertize to other peers - # To connect to other nodes, those nodes should have the same ProtocolID string - ProtocolID = "/erd/kad/1.0.0" - - # InitialPeerList represents the list of strings of some known nodes that will bootstrap this node - # The address will be in a self-describing addressing format. - # More can be found here: https://github.com/libp2p/specs/blob/master/3-requirements.md#34-transport-agnostic - # Example: - # /ip6/fe80::8823:6dff:fee7:f172/tcp/4001/p2p/QmYJyUMAcXEw1b5bFfbBbzYu5wyyjLMRHXGUkCXpag74Fu - # /ip4/162.246.145.218/udp/4001/utp/ipfs/QmYJyUMAcXEw1b5bFfbBbzYu5wyyjLMRHXGUkCXpag74Fu - # - # If the initial peers list is left empty, the node will not try to connect to other peers during initial bootstrap - # phase but will accept connections and will do the network discovery if another peer connects to it - InitialPeerList = ["/ip4/127.0.0.1/tcp/9999/p2p/16Uiu2HAkw5SNNtSvH1zJiQ6Gc3WoGNSxiyNueRKe6fuAuh57G3Bk"] - - # kademlia's routing table bucket size - BucketSize = 100 - - # RoutingTableRefreshIntervalInSec defines how many seconds should pass between 2 kad routing table auto refresh calls - RoutingTableRefreshIntervalInSec = 300 - -[Sharding] - # The targeted number of peer connections - TargetPeerCount = 41 - MaxIntraShardValidators = 7 - MaxCrossShardValidators = 15 - MaxIntraShardObservers = 7 - MaxCrossShardObservers = 3 - MaxSeeders = 2 - - # available options: - # `ListsSharder` will split the peers based on the shard membership (intra, cross or unknown) - # `OneListSharder` will do just the connection triming (upto TargetPeerCount value) not taking into account - # the shard membership of the connected peers - # `NilListSharder` will disable conection trimming (sharder is off) - Type = "ListsSharder" diff --git a/integrationTests/relayers/testdata/config/nodeConfig/prefs.toml b/integrationTests/relayers/testdata/config/nodeConfig/prefs.toml deleted file mode 100644 index 42e16624..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/prefs.toml +++ /dev/null @@ -1,82 +0,0 @@ -[Preferences] - # DestinationShardAsObserver represents the desired shard when running as observer - # value will be given as string. For example: "0", "1", "15", "metachain" - # if "disabled" is provided then the node will start in the corresponding shard for its public key or 0 otherwise - DestinationShardAsObserver = "disabled" - - # NodeDisplayName represents the friendly name a user can pick for his node in the status monitor when the node does not run in multikey mode - # In multikey mode, all bls keys not mentioned in NamedIdentity section will use this one as default - NodeDisplayName = "" - - # Identity represents the GitHub identity when the node does not run in multikey mode - # In multikey mode, all bls keys not mentioned in NamedIdentity section will use this one as default - Identity = "" - - # RedundancyLevel represents the level of redundancy used by the node (-1 = disabled, 0 = main instance (default), - # 1 = first backup, 2 = second backup, etc.) - RedundancyLevel = 0 - - # FullArchive, if enabled, will make the node able to respond to requests from past, old epochs. - # It is highly recommended to enable this flag on an observer (not on a validator node) - FullArchive = false - - # PreferredConnections holds an array containing valid ips or peer ids from nodes to connect with (in top of other connections) - # Example: - # PreferredConnections = [ - # "127.0.0.10", - # "16Uiu2HAm6yvbp1oZ6zjnWsn9FdRqBSaQkbhELyaThuq48ybdorrr" - # ] - PreferredConnections = [] - - # ConnectionWatcherType represents the type of the connection watcher needed. - # possible options: - # - "disabled" - no connection watching should be made - # - "print" - new connection found will be printed in the log file - ConnectionWatcherType = "disabled" - - # OverridableConfigTomlValues represents an array of items to be overloaded inside other configuration files, which can be helpful - # so that certain config values need to remain the same during upgrades. - # (for example, an Elasticsearch user wants external.toml->ElasticSearchConnector.Enabled to remain true all the time during upgrades, while the default - # configuration of the node has the false value) - # The Path indicates what value to change, while Value represents the new value in string format. The node operator must make sure - # to follow the same type of the original value (ex: uint32: "37", float32: "37.0", bool: "true") - # File represents the file name that holds the configuration. Currently, the supported files are: config.toml, external.toml, p2p.toml and enableEpochs.toml - # ------------------------------- - # Un-comment and update the following section in order to enable config values overloading - # ------------------------------- - # OverridableConfigTomlValues = [ - # { File = "config.toml", Path = "StoragePruning.NumEpochsToKeep", Value = "4" }, - # { File = "config.toml", Path = "MiniBlocksStorage.Cache.Name", Value = "MiniBlocksStorage" }, - # { File = "external.toml", Path = "ElasticSearchConnector.Enabled", Value = "true" } - #] - -# BlockProcessingCutoff can be used to stop processing blocks at a certain round, nonce or epoch. -# This can be useful for snapshotting different stuff and also for debugging purposes. -[BlockProcessingCutoff] - # If set to true, the node will stop at the given coordinate - Enabled = false - - # Mode represents the cutoff mode. possible values: "pause" or "process-error". - # "pause" mode will halt the processing at the block with the given coordinates. Useful for snapshots/analytics - # "process-error" will return an error when processing the block with the given coordinates. Useful for debugging - Mode = "pause" - - # CutoffTrigger represents the kind of coordinate to look after when cutting off the processing. - # Possible values: "round", "nonce", or "epoch" - CutoffTrigger = "round" - - # The minimum value of the cutoff. For example, if CutoffType is set to "round", and Value to 20, then the node will stop processing at round 20+ - Value = 0 - -# NamedIdentity represents an identity that runs nodes on the multikey -# There can be multiple identities set on the same node, each one of them having different bls keys, just by duplicating the NamedIdentity -[[NamedIdentity]] - # Identity represents the GitHub identity for the current NamedIdentity - Identity = "" - # NodeName represents the name that will be given to the names of the current identity - NodeName = "" - # BLSKeys represents the BLS keys assigned to the current NamedIdentity - BLSKeys = [ - "", - "" - ] diff --git a/integrationTests/relayers/testdata/config/nodeConfig/ratings.toml b/integrationTests/relayers/testdata/config/nodeConfig/ratings.toml deleted file mode 100644 index 13edfff9..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/ratings.toml +++ /dev/null @@ -1,53 +0,0 @@ -#Ratings configuration - -# proposer-validator importanceRatio = 1 => -# 50% rating increase from proposer and 50% rating increase from validator - -# ProposerIncreaseRatingStep = 1/2 * (maxRating - startRating)/(nrTimesProposerPerHour * hoursToGetToMaxRating) -# ValidatorIncreaseRatingStep = 1/2 * (maxRating - startRating)/(nrTimeValidatorPerHour * hoursToGetToMaxRating) -# ProposerDecreaseRatingStep = -4 * ProposerIncreaseRatingStep -# ValidatorDecreaseRatingStep = -4 * ValidatorIncreaseRatingStep - - -[General] - StartRating = 5000001 - MaxRating = 10000000 - MinRating = 1 - SignedBlocksThreshold = 0.01 - SelectionChances = [ - { MaxThreshold = 0, ChancePercent = 5}, - { MaxThreshold = 1000000,ChancePercent = 0}, - { MaxThreshold = 2000000,ChancePercent = 16}, - { MaxThreshold = 3000000,ChancePercent = 17}, - { MaxThreshold = 4000000,ChancePercent = 18}, - { MaxThreshold = 5000000,ChancePercent = 19}, - { MaxThreshold = 6000000,ChancePercent = 20}, - { MaxThreshold = 7000000,ChancePercent = 21}, - { MaxThreshold = 8000000,ChancePercent = 22}, - { MaxThreshold = 9000000,ChancePercent = 23}, - { MaxThreshold = 10000000,ChancePercent = 24}, - ] - -[ShardChain.RatingSteps] - HoursToMaxRatingFromStartRating = 72 - ProposerValidatorImportance = 1.0 - ProposerDecreaseFactor = -4.0 - ValidatorDecreaseFactor = -4.0 - ConsecutiveMissedBlocksPenalty = 1.50 - -[MetaChain.RatingSteps] - HoursToMaxRatingFromStartRating = 55 - ProposerValidatorImportance = 1.0 - ProposerDecreaseFactor = -4.0 - ValidatorDecreaseFactor = -4.0 - ConsecutiveMissedBlocksPenalty = 1.50 - -[PeerHonesty] - #this value will be multiplied with the current value for a public key each DecayUpdateIntervalInSeconds seconds - #for the current settings, a pk will reach to value 0 after maximum 2h (if it stopped misbehaving or stopped sending good messages) - DecayCoefficient = 0.9779 - DecayUpdateIntervalInSeconds = 10 - MaxScore = 100.0 - MinScore = -100.0 - BadPeerThreshold = -80.0 - UnitValue = 1.0 diff --git a/integrationTests/relayers/testdata/config/nodeConfig/systemSmartContractsConfig.toml b/integrationTests/relayers/testdata/config/nodeConfig/systemSmartContractsConfig.toml deleted file mode 100644 index fc898335..00000000 --- a/integrationTests/relayers/testdata/config/nodeConfig/systemSmartContractsConfig.toml +++ /dev/null @@ -1,41 +0,0 @@ -[StakingSystemSCConfig] - GenesisNodePrice = "2500000000000000000000" #2.5K eGLD - MinStakeValue = "100000000000000000000" #100 eGLD - MinUnstakeTokensValue = "10000000000000000000" #10eGLD - UnBondPeriod = 250 - UnBondPeriodInEpochs = 1 - MinStepValue = "100000000000000000000" - NumRoundsWithoutBleed = 100 - MaximumPercentageToBleed = 0.5 - BleedPercentagePerRound = 0.00001 - MaxNumberOfNodesForStake = 64 - UnJailValue = "2500000000000000000" #0.1% of genesis node price - ActivateBLSPubKeyMessageVerification = false - -[ESDTSystemSCConfig] - BaseIssuingCost = "5000000000000000000" #5 eGLD - OwnerAddress = "erd1fpkcgel4gcmh8zqqdt043yfcn5tyx8373kg6q2qmkxzu4dqamc0swts65c" - -[GovernanceSystemSCConfig] - OwnerAddress = "erd1vxy22x0fj4zv6hktmydg8vpfh6euv02cz4yg0aaws6rrad5a5awqgqky80" #should use a multisign contract instead of a wallet address - [GovernanceSystemSCConfig.V1] - NumNodes = 500 - ProposalCost = "5000000000000000000" #5 eGLD - MinQuorum = 400 - MinPassThreshold = 300 - MinVetoThreshold = 50 - [GovernanceSystemSCConfig.Active] - ProposalCost = "1000000000000000000000" #1000 eGLD - LostProposalFee = "10000000000000000000" #10 eGLD - MinQuorum = 0.2 #fraction of value 0.2 - 20% - MinPassThreshold = 0.5 #fraction of value 0.5 - 50% - MinVetoThreshold = 0.33 #fraction of value 0.33 - 33% - -[DelegationManagerSystemSCConfig] - MinCreationDeposit = "1250000000000000000000" #1.25K eGLD - MinStakeAmount = "10000000000000000000" #10 eGLD - ConfigChangeAddress = "erd1vxy22x0fj4zv6hktmydg8vpfh6euv02cz4yg0aaws6rrad5a5awqgqky80" #should use a multisign contract instead of a wallet address - -[DelegationSystemSCConfig] - MinServiceFee = 0 - MaxServiceFee = 10000 diff --git a/integrationTests/relayers/testdata/config/proxyConfig/apiConfig/credentials.toml b/integrationTests/relayers/testdata/config/proxyConfig/apiConfig/credentials.toml deleted file mode 100644 index 72ea04bf..00000000 --- a/integrationTests/relayers/testdata/config/proxyConfig/apiConfig/credentials.toml +++ /dev/null @@ -1,11 +0,0 @@ -# Credentials holds the list of username-pair pairs that allow access to certain endpoints. -# The password represents the hashed value. In this examples, the password are the hashed usernames. -# Please change these example values as they are just placeholders. -# Example credentials: -# Credentials = [ -# { Username = "example", Password = "hashed password" }, -# { Username = "example2", Password = "hashed password" } -# ] - -[Hasher] -Type = "sha256" diff --git a/integrationTests/relayers/testdata/config/proxyConfig/apiConfig/v1_0.toml b/integrationTests/relayers/testdata/config/proxyConfig/apiConfig/v1_0.toml deleted file mode 100644 index b8cea0ed..00000000 --- a/integrationTests/relayers/testdata/config/proxyConfig/apiConfig/v1_0.toml +++ /dev/null @@ -1,146 +0,0 @@ -# API routes configuration for version v1.0 -[APIPackages] - -# Each endpoint has configurable fields. These are: -# Name: the full path of the endpoint in a gin server based format -# Open: if set to false, the endpoint will not be enabled -# Secured: if set to true, then requests to this route have to be made using Basic Authentication using credentials -# from credentials.toml file -# RateLimit: if set to 0, then the endpoint won't be limited. Otherwise, a given IP address can only make a number of -# requests in a given time stamp, configurable in config.toml - -[APIPackages.about] -Routes = [ - { Name = "", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/nodes-versions", Open = true, Secured = false, RateLimit = 0 } -] - -[APIPackages.actions] -Routes = [ - { Name = "/reload-observers", Open = true, Secured = true, RateLimit = 0 }, - { Name = "/reload-full-history-observers", Open = true, Secured = true, RateLimit = 0 } -] - -[APIPackages.node] -Routes = [ - { Name = "/heartbeatstatus", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/old-storage-token/:token/nonce/:nonce", Open = true, Secured = false, RateLimit = 0} -] - -[APIPackages.address] -Routes = [ - { Name = "/:address", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/balance", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/nonce", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/username", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/code-hash", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/keys", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/key/:key", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/esdt", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/esdts/roles", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/esdt/:tokenIdentifier", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/esdts-with-role/:role", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/registered-nfts", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/nft/:tokenIdentifier/nonce/:nonce", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/shard", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/transactions", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/guardian-data", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/is-data-trie-migrated", Open = true, Secured = false, RateLimit = 0 } -] - -[APIPackages.hyperblock] -Routes = [ - { Name = "/by-hash/:hash", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/by-nonce/:nonce", Open = true, Secured = false, RateLimit = 0 } -] - -[APIPackages.network] -Routes = [ - { Name = "/status/:shard", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/economics", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/config", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/esdts", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/esdt/fungible-tokens", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/esdt/semi-fungible-tokens", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/esdt/non-fungible-tokens", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/esdt/supply/:token", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/direct-staked-info", Open = true, Secured = true, RateLimit = 0 }, - { Name = "/delegated-info", Open = true, Secured = true, RateLimit = 0 }, - { Name = "/enable-epochs", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/ratings", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/genesis-nodes", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/gas-configs", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/trie-statistics/:shard", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/epoch-start/:shard/by-epoch/:epoch", Open = true, Secured = false, RateLimit = 0 } -] - -[APIPackages.validator] -Routes = [ - { Name = "/statistics", Open = true, Secured = false, RateLimit = 0 } -] - -[APIPackages.vm-values] -Routes = [ - { Name = "/hex", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/string", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/int", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/query", Open = true, Secured = false, RateLimit = 0 } -] - -[APIPackages.transaction] -Routes = [ - { Name = "/send", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/simulate", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/send-multiple", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/send-user-funds", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/cost", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:txhash", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:txhash/status", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:txhash/process-status", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/pool", Open = true, Secured = false, RateLimit = 0 } -] - -[APIPackages.block] -Routes = [ - { Name = "/:shard/by-nonce/:nonce", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/:shard/by-hash/:hash", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/:shard/altered-accounts/by-nonce/:nonce", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/:shard/altered-accounts/by-hash/:hash", Secured = false, Open = true, RateLimit = 0 } -] - -[APIPackages.blocks] -Routes = [ - { Name = "/by-round/:round", Secured = false, Open = true, RateLimit = 0 }, -] - -[APIPackages.block-atlas] -Routes = [ - { Name = "/:shard/:nonce", Secured = false, Open = true, RateLimit = 0 } -] - -[APIPackages.proof] -Routes = [ - { Name = "/root-hash/:roothash/address/:address", Secured = false, Open = false, RateLimit = 0 }, - { Name = "/root-hash/:roothash/address/:address/key/:key", Secured = false, Open = false, RateLimit = 0 }, - { Name = "/address/:address", Secured = false, Open = false, RateLimit = 0 }, - { Name = "/verify", Secured = false, Open = false, RateLimit = 0 } -] - -[APIPackages.internal] -Routes = [ - { Name = "/:shard/raw/block/by-nonce/:nonce", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/:shard/raw/block/by-hash/:hash", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/:shard/json/block/by-nonce/:nonce", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/:shard/json/block/by-hash/:hash", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/:shard/raw/miniblock/by-hash/:hash/epoch/:epoch", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/:shard/json/miniblock/by-hash/:hash/epoch/:epoch", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/raw/startofepoch/metablock/by-epoch/:epoch", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/json/startofepoch/metablock/by-epoch/:epoch", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/json/startofepoch/validators/by-epoch/:epoch", Secured = false, Open = true, RateLimit = 0 } -] - -[APIPackages.status] -Routes = [ - { Name = "/metrics", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/prometheus-metrics", Secured = false, Open = true, RateLimit = 0 } -] diff --git a/integrationTests/relayers/testdata/config/proxyConfig/apiConfig/v_next.toml b/integrationTests/relayers/testdata/config/proxyConfig/apiConfig/v_next.toml deleted file mode 100644 index c1e6a0e6..00000000 --- a/integrationTests/relayers/testdata/config/proxyConfig/apiConfig/v_next.toml +++ /dev/null @@ -1,146 +0,0 @@ -# API routes configuration for version v.next -[APIPackages] - -# Each endpoint has configurable fields. These are: -# Name: the full path of the endpoint in a gin server based format -# Open: if set to false, the endpoint will not be enabled -# Secured: if set to true, then requests to this route have to be made using Basic Authentication using credentials -# from credentials.toml file -# RateLimit: if set to 0, then the endpoint won't be limited. Otherwise, a given IP address can only make a number of -# requests in a given time stamp, configurable in config.toml - -[APIPackages.about] -Routes = [ - { Name = "", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/nodes-versions", Open = true, Secured = false, RateLimit = 0 } -] - -[APIPackages.actions] -Routes = [ - { Name = "/reload-observers", Open = true, Secured = true, RateLimit = 0 }, - { Name = "/reload-full-history-observers", Open = true, Secured = true, RateLimit = 0 } -] - -[APIPackages.node] -Routes = [ - { Name = "/heartbeatstatus", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/old-storage-token/:token/nonce/:nonce", Open = true, Secured = false, RateLimit = 0} -] - -[APIPackages.address] -Routes = [ - { Name = "/:address", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/balance", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/nonce", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/username", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/code-hash", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/keys", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/key/:key", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/esdt", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/esdts/roles", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/esdt/:tokenIdentifier", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/esdts-with-role/:role", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/registered-nfts", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/nft/:tokenIdentifier/nonce/:nonce", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/shard", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/transactions", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/guardian-data", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/is-data-trie-migrated", Open = true, Secured = false, RateLimit = 0 } -] - -[APIPackages.hyperblock] -Routes = [ - { Name = "/by-hash/:hash", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/by-nonce/:nonce", Open = true, Secured = false, RateLimit = 0 } -] - -[APIPackages.network] -Routes = [ - { Name = "/status/:shard", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/economics", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/config", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/esdts", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/esdt/fungible-tokens", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/esdt/semi-fungible-tokens", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/esdt/non-fungible-tokens", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/esdt/supply/:token", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/direct-staked-info", Open = true, Secured = true, RateLimit = 0 }, - { Name = "/delegated-info", Open = true, Secured = true, RateLimit = 0 }, - { Name = "/enable-epochs", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/ratings", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/genesis-nodes", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/gas-configs", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/trie-statistics/:shard", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/epoch-start/:shard/by-epoch/:epoch", Open = true, Secured = false, RateLimit = 0 } -] - -[APIPackages.validator] -Routes = [ - { Name = "/statistics", Open = true, Secured = false, RateLimit = 0 } -] - -[APIPackages.vm-values] -Routes = [ - { Name = "/hex", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/string", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/int", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/query", Open = true, Secured = false, RateLimit = 0 } -] - -[APIPackages.transaction] -Routes = [ - { Name = "/send", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/simulate", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/send-multiple", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/send-user-funds", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/cost", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:txhash", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:txhash/status", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:txhash/process-status", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/pool", Open = true, Secured = false, RateLimit = 0 } -] - -[APIPackages.block] -Routes = [ - { Name = "/:shard/by-nonce/:nonce", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/:shard/by-hash/:hash", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/:shard/altered-accounts/by-nonce/:nonce", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/:shard/altered-accounts/by-hash/:hash", Secured = false, Open = true, RateLimit = 0 } -] - -[APIPackages.blocks] -Routes = [ - { Name = "/by-round/:round", Secured = false, Open = true, RateLimit = 0 }, -] - -[APIPackages.block-atlas] -Routes = [ - { Name = "/:shard/:nonce", Secured = false, Open = true, RateLimit = 0 } -] - -[APIPackages.proof] -Routes = [ - { Name = "/root-hash/:roothash/address/:address", Secured = false, Open = false, RateLimit = 0 }, - { Name = "/root-hash/:roothash/address/:address/key/:key", Secured = false, Open = false, RateLimit = 0 }, - { Name = "/address/:address", Secured = false, Open = false, RateLimit = 0 }, - { Name = "/verify", Secured = false, Open = false, RateLimit = 0 } -] - -[APIPackages.internal] -Routes = [ - { Name = "/:shard/raw/block/by-nonce/:nonce", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/:shard/raw/block/by-hash/:hash", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/:shard/json/block/by-nonce/:nonce", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/:shard/json/block/by-hash/:hash", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/:shard/raw/miniblock/by-hash/:hash/epoch/:epoch", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/:shard/json/miniblock/by-hash/:hash/epoch/:epoch", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/raw/startofepoch/metablock/by-epoch/:epoch", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/json/startofepoch/metablock/by-epoch/:epoch", Secured = false, Open = true, RateLimit = 0 }, - { Name = "/json/startofepoch/validators/by-epoch/:epoch", Secured = false, Open = true, RateLimit = 0 } -] - -[APIPackages.status] -Routes = [ - { Name = "/metrics", Secured = false, Open = false, RateLimit = 0 }, - { Name = "/prometheus-metrics", Secured = false, Open = false, RateLimit = 0 } -] diff --git a/integrationTests/relayers/testdata/config/proxyConfig/config.toml b/integrationTests/relayers/testdata/config/proxyConfig/config.toml deleted file mode 100644 index da7b6c19..00000000 --- a/integrationTests/relayers/testdata/config/proxyConfig/config.toml +++ /dev/null @@ -1,79 +0,0 @@ -# GeneralSettings section of the proxy server -[GeneralSettings] - # ServerPort is the port used for the web server. The frontend will connect to this port - ServerPort = 8080 - - # RequestTimeoutSec represents the maximum number of seconds a request can last until throwing an error - RequestTimeoutSec = 80 - - # HeartbeatCacheValidityDurationSec represents the maximum number of seconds the heartbeat cache data is valid before it - # should be updated - HeartbeatCacheValidityDurationSec = 25 - - # ValStatsCacheValidityDurationSec represents the maximum number of seconds the validator statistics cache data is valid - # before it should be updated - ValStatsCacheValidityDurationSec = 60 - - # EconomicsMetricsCacheValidityDurationSec represents the maximum number of seconds the economics metrics cache data is valid - # before it should be updated - EconomicsMetricsCacheValidityDurationSec = 600 # 10 minutes - - # BalancedObservers - if this flag is set to true, then the requests will be distributed equally between observers. - # Otherwise, there are chances that only one observer from a shard will process the requests - BalancedObservers = true - - # BalancedFullHistoryNodes - if this flag is set to true, then the requests will be distributed equally between full history nodes. - # Otherwise, there are chances that only one full history node from a shard will process the requests - BalancedFullHistoryNodes = true - - # FaucetValue represents the default value for a faucet transaction. If set to "0", the faucet feature will be disabled - FaucetValue = "0" - - # RateLimitWindowsDurationSeconds represents the time window for limiting the number of requests to a given API endpoint - # For example, if RateLimitDurationSeconds = 60 and the endpoint /address/:address/nonce is rate-limited to 5, - # then after 5 requests in a 60 seconds window, a 'Too many requests' response will be returned. There is a clean-up - # mechanism so after RateLimitDurationSeconds seconds, the restrictions will be reset. - RateLimitWindowDurationSeconds = 60 - - # AllowEntireTxPoolFetch represents the flag that enables the transactions pool API - # With this flag disabled, /transaction/pool route will return an error - AllowEntireTxPoolFetch = false - -[AddressPubkeyConverter] - #Length specifies the length in bytes of an address - Length = 32 - - # Type specifies the type of public keys: hex or bech32 - Type = "bech32" - -[Marshalizer] - Type = "gogo protobuf" - -[Hasher] - Type = "blake2b" - -# ApiLogging holds settings related to api requests logging -[ApiLogging] - # LoggingEnabled - if this flag is set to true, then if a requests exceeds a threshold or it is unsuccessful, then - # a log will be printed - LoggingEnabled = true - - # ThresholdInMicroSeconds represents the maximum duration to consider a request as normal. Above this, if the LoggingEnabled - # flag is set to true, then a log will be printed - ThresholdInMicroSeconds = 50000 # 50ms - -# List of Observers. If you want to define a metachain observer (needed for validator statistics route) use -# shard id 4294967295 -# Fallback observers which are only used when regular ones are offline should have IsFallback = true -[[Observers]] - ShardId = 0 - Address = "http://127.0.0.1:8081" - -[[Observers]] - ShardId = 1 - Address = "http://127.0.0.1:8082" - -[[Observers]] - ShardId = 4294967295 - Address = "http://127.0.0.1:8083" - IsFallback = false diff --git a/integrationTests/relayers/testdata/config/proxyConfig/external.toml b/integrationTests/relayers/testdata/config/proxyConfig/external.toml deleted file mode 100644 index 9bc54b1a..00000000 --- a/integrationTests/relayers/testdata/config/proxyConfig/external.toml +++ /dev/null @@ -1,4 +0,0 @@ -# ElasticSearchConnector defines settings related to ElasticSearch such as login information or URL -[ElasticSearchConnector] - Enabled = false - URL = "" diff --git a/integrationTests/relayers/testdata/wallets/mvxReceiver.pem b/integrationTests/relayers/testdata/wallets/mvxReceiver.pem deleted file mode 100644 index db1233b0..00000000 --- a/integrationTests/relayers/testdata/wallets/mvxReceiver.pem +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PRIVATE KEY for erd1mzuyleayzt9shdfurlrcsypv7hctc6n66cjq0vx088a2mv3pj8sqdt0sdz----- -NjE5MTk1ZWRiNDU0YWE5ZDhhNzcxNTBiZWExM2NlY2UxNWJiZjNmMWI2OTAwOGM2 -NWI5ZmU1YTBiYWI1YjJiNGQ4Yjg0ZmU3YTQxMmNiMGJiNTNjMWZjNzg4MTAyY2Y1 -ZjBiYzZhN2FkNjI0MDdiMGNmMzlmYWFkYjIyMTkxZTA= ------END PRIVATE KEY for erd1mzuyleayzt9shdfurlrcsypv7hctc6n66cjq0vx088a2mv3pj8sqdt0sdz----- -; \ No newline at end of file diff --git a/integrationTests/relayers/testdata/wallets/owner.pem b/integrationTests/relayers/testdata/wallets/owner.pem deleted file mode 100644 index 17dc27e3..00000000 --- a/integrationTests/relayers/testdata/wallets/owner.pem +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN PRIVATE KEY for erd17g9splt634xppt782cktfyyfmhdqlya9vqlqjeclpk65ckuxkcwqxu78wy----- -NzhkOGI1ZDYxOWVkNzkyY2U5ZWE1YTk5YjZkYjA4NzgwMDA1MzE3OTRlYmVhNzFk -NWRhYWUwODdlNDE4MGZmZGYyMGIwMGZkN2E4ZDRjMTBhZmM3NTYyY2I0OTA4OWRk -ZGEwZjkzYTU2MDNlMDk2NzFmMGRiNTRjNWI4NmI2MWM= ------END PRIVATE KEY for erd17g9splt634xppt782cktfyyfmhdqlya9vqlqjeclpk65ckuxkcwqxu78wy-----