-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
Description
After partially fixing #266, both hardhat-polkadot 0.1.5 and 0.1.8 now produce consistent but non-deterministic Invalid Transaction
errors. The error occurs randomly in different test cases across multiple test runs.
Environment
- polkadot-sdk version:
c40b36c3a7c208f9a6837b80812473af3d9ba7f7
- Test repository: https://github.com/papermoonio/v2-periphery-polkadot/tree/bugfix/flaky
- hardhat-polkadot:
0.1.5
and0.1.8
(both show same behavior) - resolc: 0.3.0
Steps to Reproduce
1. Build nodes
git clone https://github.com/paritytech/polkadot-sdk
cd polkadot-sdk
git checkout c40b36c3a7c208f9a6837b80812473af3d9ba7f7
# Build eth-rpc
cargo build -p pallet-revive-eth-rpc --release
# Build revive-dev-node
cd substrate/frame/revive/dev-node/node
cargo build --release
2. Prepare test repository
git clone https://github.com/papermoonio/v2-periphery-polkadot
cd v2-periphery-polkadot
git checkout bugfix/flaky
3. Create .env
file
Create .env
file in the project root:
LOCAL_PRIV_KEY=0x5fb92d6e98884f76de468fa3f6278f8807c48bebc13595d45af5bdc4da702133
AH_PRIV_KEY=xxx
4. Test with hardhat-polkadot 0.1.5
Note:
pnpm-lock.yaml
contains hardhat-polkadot 0.1.5
pnpm install
USE_POLKAVM=true npx hardhat test ./test/ExampleComputeLiquidityValue.spec.ts
Results vary between runs:
- Run 1: https://github.com/papermoonio/v2-periphery-polkadot/blob/bugfix/flaky/0.1.5_1.txt
- Run 2: https://github.com/papermoonio/v2-periphery-polkadot/blob/bugfix/flaky/0.1.5_2.txt
5. Test with hardhat-polkadot 0.1.8
Note:
package-lock.json
contains hardhat-polkadot 0.1.8
rm -rf node_modules
npm install
USE_POLKAVM=true npx hardhat test ./test/ExampleComputeLiquidityValue.spec.ts
Results vary between runs:
- Run 1: https://github.com/papermoonio/v2-periphery-polkadot/blob/bugfix/flaky/0.1.8_1.txt
- Run 2: https://github.com/papermoonio/v2-periphery-polkadot/blob/bugfix/flaky/0.1.8_2.txt
Important Note
When running the same revive-dev-node
and eth-rpc
binaries manually (not through hardhat), these errors do NOT occur, suggesting the issue may be related to:
- State management between tests
- Block production timing