Conversation
…ay block number option
| await check(announcements[0][0]).toMatchObject(announcementObject) | ||
| await check(announcements[0][0]).toMatchObject({ | ||
| ...announcementObject, | ||
| height: currBlockNumber + 4, |
|
@rockbmb would you be able to continue on this? also not exactly sure what's wrong but running those tests locally was very very slow for me |
There was a problem hiding this comment.
The changes introduce a new useRelayBlockNumber parameter to handle differences in block numbering between parachains and relay chains in proxy-related tests. However, this new logic is applied incorrectly in two places, likely causing test failures.
| // `createPure` extrinsics were executed. | ||
| const currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() | ||
|
|
||
| const currBlockNumber = await getBlockNumber(client, useRelayBlockNumber) |
There was a problem hiding this comment.
In createKillPureProxyTest, the currBlockNumber is fetched using getBlockNumber, which may return a relay chain block number. This block number is then passed to the proxy.killPure extrinsic. The killPure extrinsic requires the block number of the parachain where the proxy was created, not a relay chain block number. Using the relay block number will cause the extrinsic to fail as it won't be able to find the proxy's creation event.
| await check(announcements[0][0]).toMatchObject({ | ||
| ...announcementObject, | ||
| height: currBlockNumber + 4, | ||
| }) |
There was a problem hiding this comment.
In proxyAnnouncementLifecycleTest, the expected block height for a re-announced proxy call is hardcoded to currBlockNumber + 4. This offset is likely incorrect for tests that do not use the relay block number (i.e., when useRelayBlockNumber is false), where the expected offset should be +2. Applying the +4 offset unconditionally will break these tests. The offset should be determined based on the value of useRelayBlockNumber.
|
@xlc I can take over. |
| }) | ||
| } | ||
|
|
||
| export async function getBlockNumber( |
There was a problem hiding this comment.
I also had to do this in #384 .
polkadot-ecosystem-tests/packages/shared/src/helpers/index.ts
Lines 364 to 378 in fd2ca4e
|
#384 fixes the proxy tests' differing announcement block numbers, so closing in favor of it. |
fix proxy e2e tests