AcalaNetwork / chopsticks

Create parallel reality of your Substrate network.
Apache License 2.0
138 stars 84 forks source link

inconsistent performance #629

Closed shunjizhan closed 10 months ago

shunjizhan commented 10 months ago

when sending the same transaction to chopsticks with the same config, the block building time varies a lot - sometimes it's as fast as 4s, but sometimes it takes as long as a couple minutes.

Could this be network issue? I didn't change network either among different runs.

I am using local build at this commit, and start with yarn start -c configs/acala.yml with Apple chip. Tx is simple erc20 transfer or sending native ACA

shunjizhan commented 10 months ago

this is the full config, I also tried removing db.* before restarting chopsticks, same result.

endpoint:
  - wss://crosschain-dev.polkawallet.io:9915
mock-signature-host: true
# block: ${env.ACALA_BLOCK_NUMBER}
db: ./db.sqlite
runtime-log-level: 5
# wasm-override: acala_runtime.wasm

import-storage:
  Sudo:
    Key: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY # Alice
  System:
    Account:
      -
        -
          - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
        - providers: 1
          data:
            free: 1000000000000000
      -
        -
          - 246gNkjCexYRsCpdjtVhz35sHjcb21jpqipzT9u4uwKV8iEE
        - providers: 1
          data:
            free: 1000000000000000
      -
        -
          - 249LSvsEyxS4VpEJGg62yhYA7sHy1KcgGW6KzACBCLW1RsZF
        - providers: 1
          data:
            free: 1000000000000000
      -
        -
          - 21y4X7QDByUjnu5KX9W1H5TbG2wTLPDbhYFHqc4v6Q1nTBnu
        - providers: 1
          data:
            free: 1000000000000000
      -
        -
          - 265dERKLvMFwWWvtGNUjQBrHFTT88VcEtb5QYh2Zuj79UGMf
        - providers: 1
          data:
            free: 1000000000000000
      -
        -
          - 21XH88Kd5vDLkrZMb4D2eYJAB9yKbycfkYBqAaD1wQQi1uJ8
        - providers: 1
          data:
            free: 1000000000000000
  Tokens:
    Accounts:
      -
        -
          - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
          - token: AUSD
        - free: 1000000000000000
      -
        -
          - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
          - token: DOT
        - free: 1000000000000000
      -
        -
          - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
          - token: LDOT
        - free: 1000000000000000
      -
        -
          - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
          - liquidCrowdloan: 13
        - free: 1000000000000000
  GeneralCouncil:
    Members:
      - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
      - 246gNkjCexYRsCpdjtVhz35sHjcb21jpqipzT9u4uwKV8iEE
      - 249LSvsEyxS4VpEJGg62yhYA7sHy1KcgGW6KzACBCLW1RsZF
      - 21y4X7QDByUjnu5KX9W1H5TbG2wTLPDbhYFHqc4v6Q1nTBnu
      - 265dERKLvMFwWWvtGNUjQBrHFTT88VcEtb5QYh2Zuj79UGMf
      - 21XH88Kd5vDLkrZMb4D2eYJAB9yKbycfkYBqAaD1wQQi1uJ8
  TechnicalCommittee:
    Members:
      - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
      - 246gNkjCexYRsCpdjtVhz35sHjcb21jpqipzT9u4uwKV8iEE
      - 249LSvsEyxS4VpEJGg62yhYA7sHy1KcgGW6KzACBCLW1RsZF
  EvmAccounts:
    EvmAddresses:
    - - - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
      - '0x75E480dB528101a381Ce68544611C169Ad7EB342'
    Accounts:
    - - - '0x75E480dB528101a381Ce68544611C169Ad7EB342'
      - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
shunjizhan commented 10 months ago

in the same run, sending erc20 can also vary a lot Screenshot 2024-01-11 at 17 55 00

ermalkaleci commented 10 months ago

it's not performance issue. Chopsticks can build the block within a second if it has the storage. It's probably your tx reads a lot of storage or you're connected to an endpoint with low rate limit burst

ermalkaleci commented 10 months ago

@shunjizhan wss://crosschain-dev.polkawallet.io:9915 is so slow it takes forever to connect to