diff --git a/docker-compose.yml b/docker-compose.yml index 2c1a050da..e6552111b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -117,7 +117,7 @@ services: # ---------- No Subql Realm ---------- # # ------------------------------------ # mandala-node: - image: ghcr.io/acalanetwork/mandala-node:sha-37d9e36 + image: ghcr.io/acalanetwork/mandala-node:sha-7ae4bf4 ports: - 9944:9944 healthcheck: diff --git a/examples/docker-compose-bodhi-stack.yml b/examples/docker-compose-bodhi-stack.yml index cf8906a4e..40121b80a 100644 --- a/examples/docker-compose-bodhi-stack.yml +++ b/examples/docker-compose-bodhi-stack.yml @@ -1,6 +1,6 @@ services: mandala-node: - image: ghcr.io/acalanetwork/mandala-node:sha-37d9e36 + image: ghcr.io/acalanetwork/mandala-node:sha-7ae4bf4 container_name: mandala-node ports: - 9944:9944 diff --git a/packages/eth-providers/src/__tests__/e2e/getTransactionReceipt.test.ts b/packages/eth-providers/src/__tests__/e2e/getTransactionReceipt.test.ts index 4418eb8c7..cc1b06fad 100644 --- a/packages/eth-providers/src/__tests__/e2e/getTransactionReceipt.test.ts +++ b/packages/eth-providers/src/__tests__/e2e/getTransactionReceipt.test.ts @@ -32,7 +32,7 @@ describe('TransactionReceipt', async () => { /** transfer aca */ console.log('transfer aca'); - const extrinsic = provider.api.tx.balances.transfer(account1.defaultSubstrateAddress, 100n * oneAca); + const extrinsic = provider.api.tx.balances.transferAllowDeath(account1.defaultSubstrateAddress, 100n * oneAca); await extrinsic.signAsync(Alice); await sendTx(provider.api, extrinsic); diff --git a/packages/eth-providers/src/__tests__/e2e/tx.test.ts b/packages/eth-providers/src/__tests__/e2e/tx.test.ts index f9c118efb..f45b7ad94 100644 --- a/packages/eth-providers/src/__tests__/e2e/tx.test.ts +++ b/packages/eth-providers/src/__tests__/e2e/tx.test.ts @@ -1,18 +1,17 @@ import { AcalaEvmTX, parseTransaction, serializeTransaction, signTransaction } from '@acala-network/eth-transactions'; import { BigNumber } from '@ethersproject/bignumber'; import { Contract } from '@ethersproject/contracts'; -import { EvmRpcProvider } from '../../rpc-provider'; import { Interface, parseUnits } from 'ethers/lib/utils'; import { Wallet } from '@ethersproject/wallet'; import { afterAll, beforeAll, describe, expect, it } from 'vitest'; -import { calcEthereumTransactionParams, sendTx, sleep } from '../../utils'; -import { computeDefaultSubstrateAddress } from '../../utils/address'; -import { createTestPairs } from '@polkadot/keyring/testingPairs'; import ACAABI from '@acala-network/contracts/build/contracts/Token.json'; import ADDRESS from '@acala-network/contracts/utils/MandalaAddress'; import dotenv from 'dotenv'; + +import { EvmRpcProvider } from '../../rpc-provider'; +import { calcEthereumTransactionParams, sleep } from '../../utils'; +import { computeDefaultSubstrateAddress } from '../../utils/address'; import evmAccounts from '../evmAccounts'; -import type { UInt } from '@polkadot/types'; dotenv.config(); @@ -38,8 +37,8 @@ describe('transaction tests', () => { await provider.isReady(); chainId = await provider.chainId(); - storageByteDeposit = (provider.api.consts.evm.storageDepositPerByte as UInt).toBigInt(); - txFeePerGas = (provider.api.consts.evm.txFeePerGas as UInt).toBigInt(); + storageByteDeposit = provider.api.consts.evm.storageDepositPerByte.toBigInt(); + txFeePerGas = provider.api.consts.evm.txFeePerGas.toBigInt(); ({ txGasLimit, txGasPrice } = calcEthereumTransactionParams({ gasLimit: 2100001n, @@ -167,7 +166,7 @@ describe('transaction tests', () => { ...partialDeployTx, type: 0, }); - const receipt = await response.wait(0); + const receipt = await response.wait(); expect(receipt.type).equal(0); expect(receipt.status).equal(1); @@ -195,7 +194,7 @@ describe('transaction tests', () => { expect(parsedTx.maxFeePerGas).equal(undefined); const response = await provider.sendTransaction(rawTx); - const receipt = await response.wait(0); + const receipt = await response.wait(); expect(receipt.type).equal(0); // TODO: should be null, need to fix getPartialTransactionReceipt expect(receipt.status).equal(1); @@ -283,7 +282,7 @@ describe('transaction tests', () => { const acaContract = new Contract(ADDRESS.ACA, ACAABI.abi, wallet1); const iface = new Interface(ACAABI.abi); const queryBalance = async (addr: string): Promise => acaContract.balanceOf(addr); - const transferAmount = parseUnits('100', ACADigits); + const transferAmount = parseUnits('1.243', ACADigits); let partialTransferTX: any; beforeAll(() => { @@ -302,24 +301,6 @@ describe('transaction tests', () => { expect(computeDefaultSubstrateAddress(account2.evmAddress)).to.equal(account2.defaultSubstrateAddress); }); - describe('with provider', () => { - it('has correct balance after transfer', async () => { - const pairs = createTestPairs(); - const alice = pairs.alice; - - const oneAca = 10n ** BigInt(ACADigits); - const amount = 1000n * oneAca; - const balance = await queryBalance(account1.evmAddress); - - const extrinsic = provider.api.tx.balances.transfer(account1.defaultSubstrateAddress, amount); - await extrinsic.signAsync(alice); - await sendTx(provider.api, extrinsic); - - const _balance = await queryBalance(account1.evmAddress); - expect(_balance.sub(balance).toBigInt()).equal(amount); - }); - }); - describe('with legacy EIP-155 signature', () => { it('has correct balance after transfer', async () => { const _balance1 = await queryBalance(account1.evmAddress); @@ -334,7 +315,7 @@ describe('transaction tests', () => { const _parsedTx = parseTransaction(rawTx); const response = await provider.sendTransaction(rawTx); - const _receipt = await response.wait(0); + const _receipt = await response.wait(); const __balance1 = await queryBalance(account1.evmAddress); const _balance2 = await queryBalance(account2.evmAddress); diff --git a/packages/eth-rpc-adapter/README.md b/packages/eth-rpc-adapter/README.md index 32660e16a..5222558fb 100644 --- a/packages/eth-rpc-adapter/README.md +++ b/packages/eth-rpc-adapter/README.md @@ -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-37d9e36 --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-7ae4bf4 --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: diff --git a/packages/eth-rpc-adapter/docker-compose.yml b/packages/eth-rpc-adapter/docker-compose.yml index b28be2808..60a1590f4 100644 --- a/packages/eth-rpc-adapter/docker-compose.yml +++ b/packages/eth-rpc-adapter/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: mandala-node: - image: ghcr.io/acalanetwork/mandala-node:sha-37d9e36 + image: ghcr.io/acalanetwork/mandala-node:sha-7ae4bf4 ports: - 9944:9944 command: diff --git a/packages/evm-subql/README.md b/packages/evm-subql/README.md index 15744d1c7..e164e59e6 100644 --- a/packages/evm-subql/README.md +++ b/packages/evm-subql/README.md @@ -51,7 +51,7 @@ npm i -g @subql/node@1.21.2 @subql/query@1.4.0 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-37d9e36 --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-7ae4bf4 --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) diff --git a/packages/evm-subql/docker-compose.yml b/packages/evm-subql/docker-compose.yml index 1853f7212..387f34556 100644 --- a/packages/evm-subql/docker-compose.yml +++ b/packages/evm-subql/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.9' services: mandala-node: - image: ghcr.io/acalanetwork/mandala-node:sha-37d9e36 + image: ghcr.io/acalanetwork/mandala-node:sha-7ae4bf4 ports: - 9944:9944 healthcheck: diff --git a/packages/evm-subql/project.yaml b/packages/evm-subql/project.yaml index 7f67e5af5..03e00cf48 100644 --- a/packages/evm-subql/project.yaml +++ b/packages/evm-subql/project.yaml @@ -14,7 +14,7 @@ schema: file: ./schema.graphql network: # local mandala - chainId: '0x2196d1ccb20962188d3dfcb3ccec4bab6647c6d3d8f6ff1c329efdaf3b213e5d' + chainId: '0x6808cd9b5035f8983328e7ddb7efa0da77ecc2e180de504d13d0e5789724e8b7' endpoint: ws://localhost:9944 chaintypes: # TODO: can generate this dynamically with `yarn build` using `@acala-network/types` diff --git a/scripts/e2e-tests/configs/acala.yml b/scripts/e2e-tests/configs/acala.yml index b82091000..bf2ef5981 100644 --- a/scripts/e2e-tests/configs/acala.yml +++ b/scripts/e2e-tests/configs/acala.yml @@ -2,7 +2,7 @@ endpoint: wss://acala-rpc.aca-api.network mock-signature-host: true # block: 2694000 db: ./db.sqlite -wasm-override: ./wasm/acala-2220.wasm +wasm-override: ./wasm/acala-2230.wasm import-storage: Sudo: diff --git a/scripts/e2e-tests/configs/karura.yml b/scripts/e2e-tests/configs/karura.yml index 9ac1dce07..81f05128e 100644 --- a/scripts/e2e-tests/configs/karura.yml +++ b/scripts/e2e-tests/configs/karura.yml @@ -2,7 +2,7 @@ endpoint: wss://karura-rpc.aca-api.network mock-signature-host: true # block: 3000000 db: ./db.sqlite -wasm-override: ./wasm/karura-2220.wasm +wasm-override: ./wasm/karura-2230.wasm import-storage: Sudo: diff --git a/scripts/e2e-tests/docker-compose.yml b/scripts/e2e-tests/docker-compose.yml index a8fc1819b..37e235741 100644 --- a/scripts/e2e-tests/docker-compose.yml +++ b/scripts/e2e-tests/docker-compose.yml @@ -1,6 +1,6 @@ services: mandala-node: - image: ghcr.io/acalanetwork/mandala-node:sha-37d9e36 + image: ghcr.io/acalanetwork/mandala-node:sha-7ae4bf4 container_name: mandala-node ports: - 9944:9944 diff --git a/scripts/e2e-tests/wasm/acala-2230.wasm b/scripts/e2e-tests/wasm/acala-2230.wasm new file mode 100644 index 000000000..85743c8f7 Binary files /dev/null and b/scripts/e2e-tests/wasm/acala-2230.wasm differ diff --git a/scripts/e2e-tests/wasm/karura-2230.wasm b/scripts/e2e-tests/wasm/karura-2230.wasm new file mode 100644 index 000000000..cb4a87f22 Binary files /dev/null and b/scripts/e2e-tests/wasm/karura-2230.wasm differ diff --git a/scripts/new-rpc-benchmark/README.md b/scripts/new-rpc-benchmark/README.md index 3d3478212..7d6701aa4 100644 --- a/scripts/new-rpc-benchmark/README.md +++ b/scripts/new-rpc-benchmark/README.md @@ -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-37d9e36 --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-7ae4bf4 --dev --rpc-external --rpc-cors=all --rpc-methods=unsafe -levm=debug --pruning=archive ``` then start an old rpc adapter