I have an ink! contract project and I'm doing stress test to benchmark the performance of this ink! contract project in a production chain.
My stress test includes these steps:
- Deploy ink! projects
- Execute the contract from multiple accounts and manually tracking the account nonce to obtain parallel execution for each account.
- Observe result
I ran stress test on 2 chains: Substrate node (2s block weight, 3s slot duration) and My standalone node (1s block weight, 3s slot duration). Both chains use maximum block length of 5 Mib.
Observation:
- For each block, extrinsics only takes 10-11% block weight.
- There are still many pending extrinsics in the transaction pool and are gradually included in later blocks.
- Block length reaches only 2.5 KiB for these cases, implying the cause is not from the block length.
I don't know if in general, this is also the problem for other pallets or is it just because of pallet-contracts
or something related to pallet-contracts
.