Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chopstick not compatible with subxt somewhat #229

Closed
dzmitry-lahoda opened this issue Mar 8, 2023 · 3 comments · Fixed by #241
Closed

chopstick not compatible with subxt somewhat #229

dzmitry-lahoda opened this issue Mar 8, 2023 · 3 comments · Fixed by #241

Comments

@dzmitry-lahoda
Copy link
Contributor

dzmitry-lahoda commented Mar 8, 2023

  1. open /~https://github.com/ComposableFi/composable/tree/dz/13/code/parachain/frame/vesting/cli
  2. Run export RUST_LOG=trace && clear && cargo +nightly run -- --client="wss://picasso-rpc.composable.finance:443" --schedule="asd" --key="//Alice"
  3. See error about cannot pay fee. Good. No serde issues.
  4. Clone making picasso up to date #228
  5. Start yarn start dev --config=configs/picasso-kusama.yml
  6. Run export RUST_LOG=trace && clear && cargo +nightly run -- --client="ws://localhost:8000" --schedule="asd" --key="//Alice"

Expected: Success or some gas issue
Actual:

te(Unnamed([Value { value: Primitive(U128(0)), context: () }, Value { value: Primitive(U128(1)), context: () }])), context: () }]) }
2023-03-08T15:07:27.694659Z TRACE method_call{method="system_accountNextIndex"}: jsonrpsee_core::tracing: send="{\"jsonrpc\":\"2.0\",\"id\":3,\"method\":\"system_accountNextIndex\",\"params\":[\"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY\"]}"
2023-03-08T15:07:27.695035Z TRACE jsonrpsee_client_transport::ws: send: {"jsonrpc":"2.0","id":3,"method":"system_accountNextIndex","params":["5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"]}
2023-03-08T15:07:27.695172Z TRACE soketto::connection: d6b4647d: send: (Text (fin 1) (rsv 000) (mask (1 4b95fc95)) (len 121))    
2023-03-08T15:07:27.695263Z TRACE soketto::connection: d6b4647d: Sender flushing connection    
2023-03-08T15:07:27.940911Z TRACE soketto: read 2 bytes    
2023-03-08T15:07:27.941091Z TRACE soketto::connection: d6b4647d: recv: (Text (fin 1) (rsv 000) (mask (0 0)) (len 38))    
2023-03-08T15:07:27.941601Z TRACE method_call{method="system_accountNextIndex"}: jsonrpsee_core::tracing: recv="{\"jsonrpc\":\"2.0\",\"result\":null,\"id\":3}"
2023-03-08T15:07:27.943403Z TRACE mio::poll: deregistering event source from poller    
Error: Serde json error: invalid type: null, expected u32 at line 1 column 4

Caused by:
    invalid type: null, expected u32 at line 1 column 4

Some hard to comprehend error about serde.

@dzmitry-lahoda dzmitry-lahoda changed the title chopstick is incapable with subxt somewhat chopstick not compatible with subxt somewhat Mar 8, 2023
@xlc
Copy link
Member

xlc commented Mar 9, 2023

Can you provide some logs on Chopsticks? Use LOG_LEVEL=trace to have more output

@dzmitry-lahoda
Copy link
Contributor Author

Just repeated steps on latest things.

  1. Run dz@dz-pc-11:~/github.com/AcalaNetwork/chopsticks$ nix run composable#devnet-picasso
  2. Run dz@dz-pc-11:~/github.com/ComposableFi/composable/code/parachain/frame/vesting/cli$ cargo +nightly run -- --client="ws://localhost:9988" --schedule="./test/test.csv" --key="//Alice" --from="5yNZjX24n2eg7W6EVamaTXNQbWCwchhThEaSWB7V3GRjtHeL" 2>&1 | tee vesting.log
  3. Success
Args { client: "ws://localhost:9988", schedule: "./test/test.csv", key: "//Alice", from: "5yNZjX24n2eg7W6EVamaTXNQbWCwchhThEaSWB7V3GRjtHeL" }
Record { address: "5xD9TpbabV6VdC2F9RL5yQA61DPzWfWn1U6b76ckZBeQL2vo", window_moment_start: 1000, window_moment_period: 1000, period_count: 24, per_period: 33333000000000000 }
-=================================-
to,vesting_schedule_added
5xD9TpbabV6VdC2F9RL5yQA61DPzWfWn1U6b76ckZBeQL2vo,0x71038400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d017ea7bc18af48617ae2c0840eee340ae707503ebc3170e4352574d01f2d529f33c7cba42b4f3c93c165b2491cc9ea819e8001ed17e022001ea2efc81fcd561384001c000002013b0100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d00a0ca6ed3b485ce775454e97b9cb8471a2b1e70c8751ac7fb3db79711d6ea264c0100000000000000000000000000000000e803000000000000e803000000000000180000000f00504cd82f6c760000
  1. Run dz@dz-pc-11:~/github.com/AcalaNetwork/chopsticks$ LOG_LEVEL=trace yarn start dev --config=configs/picasso-kusama.yml
  2. Run dz@dz-pc-11:~/github.com/ComposableFi/composable/code/parachain/frame/vesting/cli$ export RUST_LOG=trace && cargo +nightly run -- --client="ws://localhost:8000" --schedule="./test/test.csv" --key="//Alice" --from="5yNZjX24n2eg7W6EVamaTXNQbWCwchhThEaSWB7V3GRjtHeL" 2>&1 | tee vesting.log

@dzmitry-lahoda
Copy link
Contributor Author

  1. Error same as mentioned
  2. Logs from chopstick
^Cdz@dz-pc-11:~/github.com/AcalaNetwork/chopsticks$ LOG_LEVEL=trace yarn start dev --config=configs/picasso-kusama.yml
[13:55:32.146] DEBUG (26404): Args
    endpoint: "wss://rpc.composablenodes.tech"
    block: 1935395
    import-storage: {
      "Sudo": {
        "Key": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
      },
      "System": {
        "Account": [
          [
            [
              "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
            ],
            {
              "data": {
                "free": 1000000000000000
              }
            }
          ]
        ]
      }
    }
    mock-signature-host: true
    db: "./picasso.kusama.db.sqlite"
    _: [
      "dev"
    ]
    config: "configs/picasso-kusama.yml"
    $0: "chopsticks"
    port: 8000
    blockHash: "0x46e182c2263828f566b99bf0e57a6c6dd822c3de175ef5015dd236e6096c2911"
[13:55:33.526] TRACE (executor/26404): taskRun
    wasm: "0x52bc537646db8e0528b52ffd00588478…1a36186c55097c35670b34824148eb02"
    calls: [
      [
        "Metadata_metadata",
        []
      ]
    ]
    storage: []
    mockSignatureHost: true
    allowUnresolvedImports: false
[13:55:34.506] TRACE (executor/26404): taskResponse
    result: "0x96230e006d6574610e3908000c1c7370…657454785061796d656e7431087c3508"
    storageDiff: []
[13:55:35.038] TRACE (26404): ImportStorage
    blockHash: "0x46e182c2263828f566b99bf0e57a6c6dd822c3de175ef5015dd236e6096c2911"
    storage: {
      "Sudo": {
        "Key": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
      },
      "System": {
        "Account": [
          [
            [
              "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
            ],
            {
              "data": {
                "free": 1000000000000000
              }
            }
          ]
        ]
      }
    }
[13:55:35.039] DEBUG (ws/26404): Try starting on port 8000
[13:55:35.114] INFO (rpc/26404): Picasso RPC listening on port 8000
[13:56:07.545] DEBUG (ws/26404): New connection
[13:56:07.549] TRACE (ws/26404): Received message
    id: 0
    method: "chain_getBlockHash"
[13:56:07.550] TRACE (rpc/26404): Handling chain_getBlockHash
[13:56:07.552] TRACE (ws/26404): Received message
    id: 1
    method: "state_getRuntimeVersion"
[13:56:07.553] TRACE (rpc/26404): Handling state_getRuntimeVersion
[13:56:07.554] TRACE (ws/26404): Received message
    id: 2
    method: "state_call"
[13:56:07.554] TRACE (rpc/26404): Handling state_call
[13:56:07.555] TRACE (executor/26404): taskRun
    wasm: "0x52bc537646db8e0528b52ffd00588478…1a36186c55097c35670b34824148eb02"
    calls: [
      [
        "Metadata_metadata",
        [
          "0x"
        ]
      ]
    ]
    storage: []
    mockSignatureHost: true
    allowUnresolvedImports: false
[13:56:07.929] TRACE (ws/26404): Sending response for request
    id: 1
    method: "state_getRuntimeVersion"
    result: {
      "specName": "picasso",
      "implName": "picasso",
      "authoringVersion": 1,
      "specVersion": 10009,
      "implVersion": 2,
      "apis": [
        [
          "0x9c53906fa888fe7c",
          1
        ],
        [
          "0x5c497be959ff24ab",
          1
        ],
        [
          "0xf60c4a6e7ca253cc",
          1
        ],
        [
          "0xdf6acb689907609b",
          4
        ],
        [
          "0x37e397fc7c91f5e4",
          1
        ],
        [
          "0x40fe3ad401f8959a",
          6
        ],
        [
          "0xd2bc9897eed08f15",
          3
        ],
        [
          "0xf78b278be53f454c",
          2
        ],
        [
          "0xdd718d5cc53262d4",
          1
        ],
        [
          "0xab3c0572291feb8b",
          1
        ],
        [
          "0xea93e3f16f3d6962",
          2
        ],
        [
          "0xbc9d89904f5b923f",
          1
        ],
        [
          "0x37c8bb1350a9a2a8",
          1
        ]
      ],
      "transactionVersion": 1,
      "stateVersion": 0
    }
[13:56:07.933] TRACE (executor/26404): taskResponse
    result: "0x96230e006d6574610e3908000c1c7370…657454785061796d656e7431087c3508"
    storageDiff: []
[13:56:07.933] TRACE (ws/26404): Sending response for request
    id: 2
    method: "state_call"
    result: "0x96230e006d6574610e3908000c1c7370…657454785061796d656e7431087c3508"
[13:56:07.941] TRACE (ws/26404): Sending response for request
    id: 0
    method: "chain_getBlockHash"
    result: "0x6811a339673c9daa897944dcdac99c6e2939cc88245ed21951a0a3c9a2be75bc"
[13:56:08.025] TRACE (ws/26404): Received message
    id: 3
    method: "system_accountNextIndex"
[13:56:08.026] TRACE (rpc/26404): Handling system_accountNextIndex
[13:56:08.028] TRACE (executor/26404): taskRun
    wasm: "0x52bc537646db8e0528b52ffd00588478…1a36186c55097c35670b34824148eb02"
    calls: [
      [
        "AccountNonceApi_account_nonce",
        [
          "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"
        ]
      ]
    ]
    storage: []
    mockSignatureHost: true
    allowUnresolvedImports: false
[13:56:08.298] TRACE (executor/26404): taskResponse
    result: "0x00000000"
    storageDiff: []
[13:56:08.298] TRACE (ws/26404): Sending response for request
    id: 3
    method: "system_accountNextIndex"
    result: 0
[13:56:08.310] DEBUG (ws/26404): Connection closed
[13:56:27.401] DEBUG (ws/26404): New connection
[13:56:27.403] TRACE (ws/26404): Received message
    id: 0
    method: "chain_getBlockHash"
[13:56:27.403] TRACE (rpc/26404): Handling chain_getBlockHash
[13:56:27.404] TRACE (ws/26404): Sending response for request
    id: 0
    method: "chain_getBlockHash"
    result: "0x6811a339673c9daa897944dcdac99c6e2939cc88245ed21951a0a3c9a2be75bc"
[13:56:27.404] TRACE (ws/26404): Received message
    id: 1
    method: "state_getRuntimeVersion"
[13:56:27.404] TRACE (rpc/26404): Handling state_getRuntimeVersion
[13:56:27.404] TRACE (ws/26404): Received message
    id: 2
    method: "state_call"
[13:56:27.405] TRACE (rpc/26404): Handling state_call
[13:56:27.405] TRACE (executor/26404): taskRun
    wasm: "0x52bc537646db8e0528b52ffd00588478…1a36186c55097c35670b34824148eb02"
    calls: [
      [
        "Metadata_metadata",
        [
          "0x"
        ]
      ]
    ]
    storage: []
    mockSignatureHost: true
    allowUnresolvedImports: false
[13:56:27.788] TRACE (ws/26404): Sending response for request
    id: 1
    method: "state_getRuntimeVersion"
    result: {
      "specName": "picasso",
      "implName": "picasso",
      "authoringVersion": 1,
      "specVersion": 10009,
      "implVersion": 2,
      "apis": [
        [
          "0x9c53906fa888fe7c",
          1
        ],
        [
          "0x5c497be959ff24ab",
          1
        ],
        [
          "0xf60c4a6e7ca253cc",
          1
        ],
        [
          "0xdf6acb689907609b",
          4
        ],
        [
          "0x37e397fc7c91f5e4",
          1
        ],
        [
          "0x40fe3ad401f8959a",
          6
        ],
        [
          "0xd2bc9897eed08f15",
          3
        ],
        [
          "0xf78b278be53f454c",
          2
        ],
        [
          "0xdd718d5cc53262d4",
          1
        ],
        [
          "0xab3c0572291feb8b",
          1
        ],
        [
          "0xea93e3f16f3d6962",
          2
        ],
        [
          "0xbc9d89904f5b923f",
          1
        ],
        [
          "0x37c8bb1350a9a2a8",
          1
        ]
      ],
      "transactionVersion": 1,
      "stateVersion": 0
    }
[13:56:27.789] TRACE (executor/26404): taskResponse
    result: "0x96230e006d6574610e3908000c1c7370…657454785061796d656e7431087c3508"
    storageDiff: []
[13:56:27.789] TRACE (ws/26404): Sending response for request
    id: 2
    method: "state_call"
    result: "0x96230e006d6574610e3908000c1c7370…657454785061796d656e7431087c3508"
[13:56:27.881] TRACE (ws/26404): Received message
    id: 3
    method: "system_accountNextIndex"
[13:56:27.881] TRACE (rpc/26404): Handling system_accountNextIndex
[13:56:27.883] TRACE (executor/26404): taskRun
    wasm: "0x52bc537646db8e0528b52ffd00588478…1a36186c55097c35670b34824148eb02"
    calls: [
      [
        "AccountNonceApi_account_nonce",
        [
          "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"
        ]
      ]
    ]
    storage: []
    mockSignatureHost: true
    allowUnresolvedImports: false
[13:56:28.143] TRACE (executor/26404): taskResponse
    result: "0x00000000"
    storageDiff: []
[13:56:28.144] TRACE (ws/26404): Sending response for request
    id: 3
    method: "system_accountNextIndex"
    result: 0
[13:56:28.278] DEBUG (ws/26404): Connection closed

@ermalkaleci ermalkaleci linked a pull request Mar 9, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants