Skip to content

Commit

Permalink
upgrade mandala node to support eip 2930 (#937)
Browse files Browse the repository at this point in the history
* upgrade mandala node to support eip 2930

* update snapshot
  • Loading branch information
shunjizhan authored Feb 7, 2024
1 parent faa333a commit 45cdecb
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ services:
# ---------- No Subql Realm ---------- #
# ------------------------------------ #
mandala-node:
image: ghcr.io/acalanetwork/mandala-node:sha-7ae4bf4
image: ghcr.io/acalanetwork/mandala-node:sha-06e988b
ports:
- 9944:9944
healthcheck:
Expand Down
2 changes: 1 addition & 1 deletion examples/docker-compose-bodhi-stack.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
mandala-node:
image: ghcr.io/acalanetwork/mandala-node:sha-7ae4bf4
image: ghcr.io/acalanetwork/mandala-node:sha-06e988b
container_name: mandala-node
ports:
- 9944:9944
Expand Down
2 changes: 1 addition & 1 deletion examples/viem/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
mandala-node:
image: ghcr.io/acalanetwork/mandala-node:sha-7ae4bf4
image: ghcr.io/acalanetwork/mandala-node:sha-06e988b
container_name: mandala-node
ports:
- 9944:9944
Expand Down
4 changes: 2 additions & 2 deletions examples/waffle/scheduler/test/Scheduler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ describe('Schedule', () => {
expect((await erc20.balanceOf(recurringPayment.address)).toNumber()).to.equal(0);
if (!process.argv.includes('--with-ethereum-compatibility')) {
expect((await provider.getBalance(transferTo)).toString()).to.equal(
formatAmount('4_999_969_004_075_107_000_000')
formatAmount('4999968960671632000000')
);

expect((await erc20.balanceOf(transferTo)).toString()).to.equal(formatAmount('4_999_969_004_075_107'));
expect((await erc20.balanceOf(transferTo)).toString()).to.equal(formatAmount('4999968960671632'));
} else {
expect((await provider.getBalance(transferTo)).toString()).to.equal(dollar.mul(5000000000).toString());
expect((await erc20.balanceOf(transferTo)).toString()).to.equal(dollar.mul(5000).toString());
Expand Down
2 changes: 1 addition & 1 deletion packages/eth-rpc-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A node service that provides [JSON-RPC](https://eth.wiki/json-rpc/API) for [Acal
## Run
First run a Mandala node locally
```
docker run -it --rm -p 9944:9944 ghcr.io/acalanetwork/mandala-node:sha-7ae4bf4 --dev --rpc-external --rpc-cors=all --rpc-methods=unsafe -levm=debug --pruning=archive --instant-sealing
docker run -it --rm -p 9944:9944 ghcr.io/acalanetwork/mandala-node:sha-06e988b --dev --rpc-external --rpc-cors=all --rpc-methods=unsafe -levm=debug --pruning=archive --instant-sealing
```

Then there are 3 ways to run an RPC adapter:
Expand Down
2 changes: 1 addition & 1 deletion packages/eth-rpc-adapter/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3'

services:
mandala-node:
image: ghcr.io/acalanetwork/mandala-node:sha-7ae4bf4
image: ghcr.io/acalanetwork/mandala-node:sha-06e988b
ports:
- 9944:9944
command:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ exports[`endpoint > eth_getTransactionByHash > finds correct tx when hash exist
"blockNumber": "0xa",
"from": "0x82a258cb20e2adb4788153cd5eb5839615ece9a0",
"gas": "0x1fd91",
"gasPrice": "0x25315050a8",
"gasPrice": "0x25315050b1",
"input": "0x3d8d96200000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000e8d4a51000000000000000000000000000000000000000000000000000000000e8d4a51000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000001",
"nonce": "0x6",
"r": "0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea",
Expand All @@ -277,7 +277,7 @@ exports[`endpoint > eth_getTransactionByHash > finds correct tx when hash exist
"blockNumber": "0x9",
"from": "0x82a258cb20e2adb4788153cd5eb5839615ece9a0",
"gas": "0x25a7f",
"gasPrice": "0x22a22ed349",
"gasPrice": "0x22a22ed358",
"input": "0x3d8d962000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000e8d4a510000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000010000000000000000000000000000000000000000000100000000000000000002",
"nonce": "0x5",
"r": "0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea",
Expand All @@ -294,7 +294,7 @@ exports[`endpoint > eth_getTransactionByHash > finds correct tx when hash exist
"blockNumber": "0x6",
"from": "0x82a258cb20e2adb4788153cd5eb5839615ece9a0",
"gas": "0x1fdca",
"gasPrice": "0x252f21c070",
"gasPrice": "0x252f21c079",
"input": "0x6fc4b4e50000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000e8d4a510000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000001",
"nonce": "0x2",
"r": "0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea",
Expand All @@ -311,7 +311,7 @@ exports[`endpoint > eth_getTransactionByHash > finds correct tx when hash exist
"blockNumber": "0x14",
"from": "0x82a258cb20e2adb4788153cd5eb5839615ece9a0",
"gas": "0x200b20",
"gasPrice": "0x41d4ad9224",
"gasPrice": "0x41d4ad924b",
"input": "0x",
"nonce": "0x10",
"r": "0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea",
Expand Down Expand Up @@ -467,7 +467,7 @@ exports[`endpoint > eth_getTransactionReceipt > returns correct result when hash
"blockNumber": "0xa",
"contractAddress": null,
"cumulativeGasUsed": "0x0",
"effectiveGasPrice": "0x25315050a8",
"effectiveGasPrice": "0x25315050b1",
"from": "0x82a258cb20e2adb4788153cd5eb5839615ece9a0",
"gasUsed": "0x1a8a4",
"logs": [
Expand Down Expand Up @@ -496,7 +496,7 @@ exports[`endpoint > eth_getTransactionReceipt > returns correct result when hash
"blockNumber": "0x9",
"contractAddress": null,
"cumulativeGasUsed": "0x0",
"effectiveGasPrice": "0x22a22ed349",
"effectiveGasPrice": "0x22a22ed358",
"from": "0x82a258cb20e2adb4788153cd5eb5839615ece9a0",
"gasUsed": "0x1f615",
"logs": [
Expand Down Expand Up @@ -525,7 +525,7 @@ exports[`endpoint > eth_getTransactionReceipt > returns correct result when hash
"blockNumber": "0x6",
"contractAddress": null,
"cumulativeGasUsed": "0x0",
"effectiveGasPrice": "0x252f21c070",
"effectiveGasPrice": "0x252f21c079",
"from": "0x82a258cb20e2adb4788153cd5eb5839615ece9a0",
"gasUsed": "0x1a8d3",
"logs": [
Expand Down Expand Up @@ -554,7 +554,7 @@ exports[`endpoint > eth_getTransactionReceipt > returns correct result when hash
"blockNumber": "0x14",
"contractAddress": null,
"cumulativeGasUsed": "0x0",
"effectiveGasPrice": "0x41d4ad9224",
"effectiveGasPrice": "0x41d4ad924b",
"from": "0x82a258cb20e2adb4788153cd5eb5839615ece9a0",
"gasUsed": "0xcbbd",
"logs": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ describe('endpoint', () => {

describe('eth_getBalance', () => {
it('get correct balance', async () => {
const block8Balance = 8999995192339995117000000n; // edit me for different mandala version
const block8Balance = 8999995192313663934000000n; // edit me for different mandala version
expect(BigInt((await eth_getBalance([ADDRESS_ALICE, 8])).data.result)).to.equal(block8Balance);
expect(BigInt((await eth_getBalance([ADDRESS_ALICE, '0x8'])).data.result)).to.equal(block8Balance);
expect(BigInt((await eth_getBalance([ADDRESS_ALICE, { blockNumber: 8 }])).data.result)).to.equal(block8Balance);
Expand Down
2 changes: 1 addition & 1 deletion packages/evm-subql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ npm i -g @subql/[email protected] @subql/[email protected]
If you already have a node running elsewhere, you can skip this step.

```shell
docker run -it --rm -p 9944:9944 ghcr.io/acalanetwork/mandala-node:sha-7ae4bf4 --dev --rpc-external --rpc-cors=all --rpc-methods=unsafe -levm=debug --pruning=archive --instant-sealing
docker run -it --rm -p 9944:9944 ghcr.io/acalanetwork/mandala-node:sha-06e988b --dev --rpc-external --rpc-cors=all --rpc-methods=unsafe -levm=debug --pruning=archive --instant-sealing
```

3. Run a Postgres service and listen to port number 5432 (in the second terminal)
Expand Down
2 changes: 1 addition & 1 deletion packages/evm-subql/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.9'

services:
mandala-node:
image: ghcr.io/acalanetwork/mandala-node:sha-7ae4bf4
image: ghcr.io/acalanetwork/mandala-node:sha-06e988b
ports:
- 9944:9944
healthcheck:
Expand Down
2 changes: 1 addition & 1 deletion packages/evm-subql/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ schema:
file: ./schema.graphql
network:
# local mandala
chainId: '0x6808cd9b5035f8983328e7ddb7efa0da77ecc2e180de504d13d0e5789724e8b7'
chainId: '0x6b4acf5a0264399326a45d79037b1fcd4c4f3259589bd7642f1272b6adf0e00d'
endpoint: ws://localhost:9944
chaintypes:
# TODO: can generate this dynamically with `yarn build` using `@acala-network/types`
Expand Down
2 changes: 1 addition & 1 deletion scripts/e2e-tests/docker-compose-subway.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
mandala-node:
image: ghcr.io/acalanetwork/mandala-node:sha-7ae4bf4
image: ghcr.io/acalanetwork/mandala-node:sha-06e988b
container_name: mandala-node
ports:
- 9944:9944
Expand Down
2 changes: 1 addition & 1 deletion scripts/new-rpc-benchmark/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# New Eth RPC Benchmark
first start a local mandala with normal sealing
```
docker run -it --rm -p 9944:9944 ghcr.io/acalanetwork/mandala-node:sha-7ae4bf4 --dev --rpc-external --rpc-cors=all --rpc-methods=unsafe -levm=debug --pruning=archive
docker run -it --rm -p 9944:9944 ghcr.io/acalanetwork/mandala-node:sha-06e988b --dev --rpc-external --rpc-cors=all --rpc-methods=unsafe -levm=debug --pruning=archive
```

then start an old rpc adapter
Expand Down

0 comments on commit 45cdecb

Please sign in to comment.