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

parentchain import ExtrinsicFilter fails: Could not decode `GenericSignedExtra::mode #1672

Open
brenzi opened this issue Jan 15, 2025 · 2 comments
Assignees
Labels
F2-bug Something isn't working

Comments

@brenzi
Copy link
Collaborator

brenzi commented Jan 15, 2025

seen with 0.15.7 on asset hub polkadot as target-b
[2025-01-14T22:05:58.415773Z ERROR ita_parentchain_interface::target_b] ExtrinsicFilter: Could not parse parentchain extrinsic: Error { cause: Some(Error { cause: None, desc: "Invalid boolean representation" }), desc: "Could not decode GenericSignedExtra::mode" }

the only extrinsic we parse is timestamp::set. but parentchain timestamps seem to work ok (target_b.now is Some):

> incognitee-ahp get-parentchains-info
ParentchainsInfo { 
  integritee: ParentchainInfo { id: Integritee, genesis_hash: 
    Some(0xe13e7af377c64e83f95e0d70d5e5c3c01d697a84538776c5b9bbe0e7d7b6034c), block_number: Some(3673123), 
    now: Some(1736934498000), creation_block_number: Some(3621327), creation_timestamp: Some(1736493078000) }, 
  target_a: ParentchainInfo { id: TargetA, genesis_hash: None, block_number: None, now: None, creation_block_number: 
    None, creation_timestamp: None }, 
  target_b: ParentchainInfo { id: TargetB, genesis_hash: 
    Some(0x68d56f15f85d3136970ec16946040bc1752654e906147f7e43e9d539d7c3de2f), block_number: Some(7997357), 
    now: Some(1736934498000), creation_block_number: Some(7946641), creation_timestamp: None }, 
  shielding_target: 
    TargetB }

therefore, it seems to be an extrinsic we don't care about which causes the issue

@brenzi brenzi added the F2-bug Something isn't working label Jan 15, 2025
@brenzi
Copy link
Collaborator Author

brenzi commented Jan 17, 2025

Here a few example blocks where this happens. doesn't happen in every block:

[2025-01-17T12:43:34.708394Z INFO  ita_parentchain_interface::indirect_calls::timestamp_set] Found TimestampSet extrinsic in block: now = 1737111708000
[2025-01-17T12:43:34.711024Z INFO  itc_parentchain_block_importer::block_importer] [TargetB] Successfully imported parentchain block (number: 8011984, hash: 0x6c81…8b86)
[2025-01-17T12:43:34.752363Z INFO  ita_parentchain_interface::indirect_calls::timestamp_set] Found TimestampSet extrinsic in block: now = 1737111720000
[2025-01-17T12:43:34.754990Z INFO  itc_parentchain_block_importer::block_importer] [TargetB] Successfully imported parentchain block (number: 8011985, hash: 0x4c05…0e6b)
[2025-01-17T12:43:34.781213Z INFO  ita_parentchain_interface::indirect_calls::timestamp_set] Found TimestampSet extrinsic in block: now = 1737111732000
[2025-01-17T12:43:34.783840Z INFO  itc_parentchain_block_importer::block_importer] [TargetB] Successfully imported parentchain block (number: 8011986, hash: 0xd040…7418)
[2025-01-17T12:43:34.797274Z INFO  ita_parentchain_interface::indirect_calls::timestamp_set] Found TimestampSet extrinsic in block: now = 1737111744000
[2025-01-17T12:43:34.799901Z INFO  itc_parentchain_block_importer::block_importer] [TargetB] Successfully imported parentchain block (number: 8011987, hash: 0x5916…d3be)
[2025-01-17T12:43:34.813071Z INFO  ita_parentchain_interface::indirect_calls::timestamp_set] Found TimestampSet extrinsic in block: now = 1737111756000
[2025-01-17T12:43:34.815721Z INFO  itc_parentchain_block_importer::block_importer] [TargetB] Successfully imported parentchain block (number: 8011988, hash: 0xa838…7d7a)
[2025-01-17T12:43:34.846434Z INFO  ita_parentchain_interface::indirect_calls::timestamp_set] Found TimestampSet extrinsic in block: now = 1737111768000
[2025-01-17T12:43:34.849044Z ERROR ita_parentchain_interface::target_b] ExtrinsicFilter: Could not parse parentchain extrinsic: Error { cause: Some(Error { cause: None, desc: "Invalid boolean representation" }), desc: "Could not decode `GenericSignedExtra::mode`" }
[2025-01-17T12:43:34.849125Z INFO  itc_parentchain_block_importer::block_importer] [TargetB] Successfully imported parentchain block (number: 8011989, hash: 0x178b…dc95)
[2025-01-17T12:43:34.862337Z INFO  ita_parentchain_interface::indirect_calls::timestamp_set] Found TimestampSet extrinsic in block: now = 1737111780000
[2025-01-17T12:43:34.864967Z INFO  itc_parentchain_block_importer::block_importer] [TargetB] Successfully imported parentchain block (number: 8011990, hash: 0x0014…8c2a)
[2025-01-17T12:43:34.878166Z INFO  ita_parentchain_interface::indirect_calls::timestamp_set] Found TimestampSet extrinsic in block: now = 1737111792000
[2025-01-17T12:43:34.880791Z INFO  itc_parentchain_block_importer::block_importer] [TargetB] Successfully imported parentchain block (number: 8011991, hash: 0x01ba…2575)
[2025-01-17T12:43:34.911465Z INFO  ita_parentchain_interface::indirect_calls::timestamp_set] Found TimestampSet extrinsic in block: now = 1737111804000
[2025-01-17T12:43:34.914075Z ERROR ita_parentchain_interface::target_b] ExtrinsicFilter: Could not parse parentchain extrinsic: Error { cause: Some(Error { cause: None, desc: "Invalid boolean representation" }), desc: "Could not decode `GenericSignedExtra::mode`" }
[2025-01-17T12:43:34.914103Z INFO  itc_parentchain_block_importer::block_importer] [TargetB] Successfully imported parentchain block (number: 8011992, hash: 0xbde2…8572)
[2025-01-17T12:43:34.927413Z INFO  ita_parentchain_interface::indirect_calls::timestamp_set] Found TimestampSet extrinsic in block: now = 1737111816000
[2025-01-17T12:43:34.930046Z INFO  itc_parentchain_block_importer::block_importer] [TargetB] Successfully imported parentchain block (number: 8011993, hash: 0x66b8…d976)

a difference in the failing blocks is the presence of an asset.transfer extrinsic:
https://assethub-polkadot.subscan.io/block/8011989
https://assethub-polkadot.subscan.io/block/8011992

should be reproducible easily

@clangenb
Copy link
Contributor

Hmmm, so we don't care about the particular extrinsic probably, but identifying, which call it is requires decoding past the signed extra, as the call index comes afterward, see here.

What baffles me though, is that we have to decode a pub signature: Option<(Address, Signature, SignedExtra)>, which I assume should always work or never, as the particular extrinsic does not matter at this stage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F2-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants