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

smoketest: mismatch of NetworkId encoding in register_token test #1352

Closed
Lederstrumpf opened this issue Dec 10, 2024 · 2 comments
Closed

smoketest: mismatch of NetworkId encoding in register_token test #1352

Lederstrumpf opened this issue Dec 10, 2024 · 2 comments

Comments

@Lederstrumpf
Copy link
Contributor

Lederstrumpf commented Dec 10, 2024

The runtime API client code generated by subxt for the NetworkId enum encodes its Ethereum variant as 7.

However, the foreignAssets.Created event in the register_token smoketest actually encodes this variant to 4.

Patching the assethub.rs generated code to flip the Westend and Ethereum NetworkId variant encodings "fixes" the test.

Reporting here first for triage, but may in fact be an issue with subxt or the latest polkadot-sdk (tested using sdk revision e79fd2bb9926be7d94be0c002676fca57b6116bf).

Log:

running 1 test
receipt transaction hash: "3681bb9ac2dda473f70e6376d9b52de8efa9e9da44c42a3c61b8ecdfc0983b26", transaction block: Some(
    5957,
)
Log {
        address: hex!("87d1f7fdfee7f651fabc8bfcb6e086c278b77a7d").into(),
        topics: vec![
                hex!("7153f9357c8ea496bba60bf82e67143e27b64462b49041f8e689e1b05728f84f").into(),
                hex!("c173fac324158e77fb5840738a1a541f633cbec8884c6a601c567d2b376a0539").into(),
                hex!("5f7060e971b0dc81e63f0aa41831091847d97c1a4693ac450cc128c7214e65e0").into(),
        ],
        data: hex!("00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002e00a736aa000000000000774667629726ec1fabebcec0d9139bd1c
8f72a2300e87648170000000000000000000000000000000000000000000000000000000000").into(),
}
Polling assethub block 916 for created event.
Polling assethub block 917 for created event.
Polling assethub block 918 for created event.
Polling assethub block 919 for created event.
Polling assethub block 920 for created event.
Polling assethub block 921 for created event.
Polling assethub block 922 for created event.
Polling assethub block 923 for created event.
Polling assethub block 924 for created event.
Polling assethub block 925 for created event.
Polling assethub block 926 for created event.
test register_token has been running for over 60 seconds
Polling assethub block 927 for created event.
Polling assethub block 928 for created event.
Polling assethub block 929 for created event.
Polling assethub block 930 for created event.
Polling assethub block 931 for created event.
Polling assethub block 932 for created event.
Polling assethub block 933 for created event.
Polling assethub block 934 for created event.
Polling assethub block 935 for created event.
Polling assethub block 936 for created event.
Polling assethub block 937 for created event.
Polling assethub block 938 for created event.
Polling assethub block 939 for created event.
Polling assethub block 940 for created event.
Polling assethub block 941 for created event.
Polling assethub block 942 for created event.
Polling assethub block 943 for created event.
Polling assethub block 944 for created event.
Polling assethub block 945 for created event.
Polling assethub block 946 for created event.
Polling assethub block 947 for created event.
Polling assethub block 948 for created event.
Polling assethub block 949 for created event.
Polling assethub block 950 for created event.
Created event found in assethub block 950.
thread 'register_token' panicked at tests/register_token.rs:88:13:
assertion `left == right` failed
  left: [2, 2, 9, 4, 158, 218, 168, 2, 3, 0, 119, 70, 103, 98, 151, 38, 236, 31, 171, 235, 206, 192, 217, 19, 155, 209, 200, 247, 42, 35]
 right: [2, 2, 9, 7, 158, 218, 168, 2, 3, 0, 119, 70, 103, 98, 151, 38, 236, 31, 171, 235, 206, 192, 217, 19, 155, 209, 200, 247, 42, 35]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
test register_token ... FAILED

failures:

failures:
    register_token

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 213.87s

error: test failed, to rerun pass `--test register_token`
@alistair-singh
Copy link
Contributor

This is probably happening because you are using a later version of polkadot-sdk. Or the bindings where generated with a later version of polkadot-sdk.

The related fix is being made upstream:
paritytech/polkadot-sdk#6503

Please try stable2409 and regenerate bindings.

@alistair-singh
Copy link
Contributor

Resolved with building with stable2409 and the fix has been merged upstream.

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

No branches or pull requests

2 participants