Skip to content

Commit 16d5238

Browse files
committed
Re-enable burn tests on Kusama relay; keep them disabled on Polkadot
Kusama passes at the current known-good block because the AHM accounts migration has not yet run there, so validator accounts still have free balance on the relay chain and fee routing via DealWithFees/ToAuthor succeeds. Polkadot's known-good block is past that migration, leaving validator accounts with free = 0, which causes ToAuthor to silently drop the fee credit and reduce TotalIssuance by 0.2 * fee, breaking the strict equality assertion in the burn tests. Polkadot tests will be re-enabled once DealWithFees/ToAuthor is fixed upstream to not drop fee credits when the author account is below ED. See paritytech/polkadot-sdk#9986.
1 parent d434e6f commit 16d5238

2 files changed

Lines changed: 19 additions & 32 deletions

File tree

packages/kusama/src/kusama.accounts.e2e.test.ts

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,14 @@ import { kusama } from '@e2e-test/networks/chains'
22
import {
33
accountsE2ETests,
44
createAccountsConfig,
5-
type DescribeNode,
65
manualLockAction,
76
manualReserveAction,
87
multisigCreationDepositAction,
98
proxyAdditionDepositAction,
10-
type RootTestTree,
119
registerTestTree,
1210
type TestConfig,
13-
type TestNode,
1411
} from '@e2e-test/shared'
1512

16-
import { match } from 'ts-pattern'
17-
1813
const generalTestConfig: TestConfig = {
1914
testSuiteName: 'Kusama Accounts',
2015
}
@@ -37,30 +32,4 @@ const accountsTestCfg = createAccountsConfig({
3732
},
3833
})
3934

40-
/**
41-
* `burn` tests are temporarily disabled on Kusama relay, see
42-
* https://github.com/paritytech/polkadot-sdk/issues/9986.
43-
*
44-
* TODO: reenable after fix
45-
*/
46-
const filterOutBurnTests = (tree: RootTestTree): RootTestTree => {
47-
const filterChildren = (children: (TestNode | DescribeNode)[]): (TestNode | DescribeNode)[] => {
48-
return children
49-
.filter((child) => !child.label.includes('burn'))
50-
.map((child) => {
51-
return match(child)
52-
.with({ kind: 'test' }, () => child)
53-
.with({ kind: 'describe' }, (desc) => {
54-
return { ...desc, children: filterChildren(desc.children) }
55-
})
56-
.exhaustive()
57-
})
58-
}
59-
60-
return {
61-
...tree,
62-
children: filterChildren(tree.children),
63-
}
64-
}
65-
66-
registerTestTree(filterOutBurnTests(accountsE2ETests(kusama, generalTestConfig, accountsTestCfg)))
35+
registerTestTree(accountsE2ETests(kusama, generalTestConfig, accountsTestCfg))

packages/polkadot/src/polkadot.accounts.e2e.test.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,24 @@ const accountsTestCfg = createAccountsConfig({
3737
},
3838
})
3939

40+
// `burn` tests are disabled on Polkadot relay. See https://github.com/paritytech/polkadot-sdk/issues/9986.
41+
//
42+
// Root cause: post-AHM, most validator relay-chain accounts have small or zero residual
43+
// free balances. `DealWithFees` routes 20% of every tx fee to the block author via
44+
// `ToAuthor`; `pallet_balances::resolve` rejects deposits below ED, silently drops the
45+
// `Credit`, and `TotalIssuance` shrinks by `0.2 × fee`. The burn tests assert strict TI
46+
// equality, so they fail by exactly that amount.
47+
//
48+
// Whether this manifests depends on the specific block author's free balance vs ED:
49+
// - Polkadot ED = 10,000,000,000 Planck (1 DOT): most post-AHM validator balances are
50+
// below this, so the deposit fails consistently at the current known-good block.
51+
// - Kusama ED = 333,333,333 Planck (~0.033 KSM): smaller, so the author at the current
52+
// Kusama known-good block happens to clear it — but Kusama will fail too if its
53+
// known-good block is updated to one where the author's balance is below that ED.
54+
//
55+
// The correct fix is upstream: `DealWithFees`/`ToAuthor` must not silently drop the fee
56+
// credit when the author account is below ED (e.g. route to treasury instead).
57+
// TODO: remove this filter once that is resolved.
4058
const filterOutBurnTests = (tree: RootTestTree): RootTestTree => {
4159
const filterChildren = (children: (TestNode | DescribeNode)[]): (TestNode | DescribeNode)[] => {
4260
return children

0 commit comments

Comments
 (0)