Skip to content

Commit 3931f20

Browse files
authored
revert: stalehash extension (#2184)
# Goal The goal of this PR is <!-- insert goal here --> Closes #2183 Reverting #2137 # Checklist - [x] e2e Tests updated - [X] Benchmarks updated - [X] Spec version incremented?
1 parent 37b9cdb commit 3931f20

File tree

5 files changed

+13
-324
lines changed

5 files changed

+13
-324
lines changed

e2e/package-lock.json

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e/stateful-pallet-storage/handleItemized.test.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,7 @@ describe('📗 Stateful Pallet Storage', function () {
180180
add_actions,
181181
0
182182
);
183-
await assert.rejects(itemized_add_result_1.signAndSend('current'), {
184-
name: 'RpcError',
185-
message: /1010: Invalid Transaction: Custom error: 9/,
186-
});
183+
await assert.rejects(itemized_add_result_1.fundAndSend(fundingSource), { name: 'StalePageState' });
187184
});
188185
});
189186

@@ -288,10 +285,7 @@ describe('📗 Stateful Pallet Storage', function () {
288285
};
289286
const remove_actions = [remove_action];
290287
const op = ExtrinsicHelper.applyItemActions(providerKeys, schemaId_deletable, msa_id, remove_actions, 0);
291-
await assert.rejects(op.signAndSend('current'), {
292-
name: 'RpcError',
293-
message: /1010: Invalid Transaction: Custom error: 9/,
294-
});
288+
await assert.rejects(op.fundAndSend(fundingSource), { name: 'StalePageState' });
295289
});
296290
});
297291

e2e/stateful-pallet-storage/handlePaginated.test.ts

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ describe('📗 Stateful Pallet Storage', function () {
202202

203203
const paginated_add_result_1 = ExtrinsicHelper.upsertPage(providerKeys, schemaId, msa_id, page_id, payload_1, 0);
204204
await assert.rejects(paginated_add_result_1.signAndSend('current'), {
205-
name: 'RpcError',
206-
message: /1010: Invalid Transaction: Custom error: 9/,
205+
message: 'Target page hash does not match current page hash',
206+
name: 'StalePageState',
207207
});
208208
});
209209
});
@@ -232,22 +232,6 @@ describe('📗 Stateful Pallet Storage', function () {
232232
section: 'statefulStorage',
233233
});
234234
});
235-
236-
it('🛑 should fail call to remove page for un-delegated attempts', async function () {
237-
const paginated_add_result_1 = ExtrinsicHelper.removePage(providerKeys, schemaId, badMsaId, 0, 0);
238-
await assert.rejects(paginated_add_result_1.fundAndSend(fundingSource), {
239-
name: 'UnauthorizedDelegate',
240-
section: 'statefulStorage',
241-
});
242-
});
243-
244-
it('🛑 should fail call to remove page with stale target hash', async function () {
245-
const paginated_add_result_1 = ExtrinsicHelper.removePage(providerKeys, schemaId, msa_id, 0, 1000);
246-
await assert.rejects(paginated_add_result_1.signAndSend('current'), {
247-
name: 'RpcError',
248-
message: /1010: Invalid Transaction: Custom error: 9/,
249-
});
250-
});
251235
});
252236

253237
describe('Paginated Storage RPC Tests', function () {

node/cli/src/benchmarking.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use sp_core::{Encode, Pair};
1313
use sp_keyring::Sr25519Keyring;
1414
use sp_runtime::{OpaqueExtrinsic, SaturatedConversion};
1515

16-
use frequency_runtime::StaleHashCheckExtension;
1716
use pallet_balances::Call as BalancesCall;
1817
use pallet_msa;
1918
use sp_inherents::InherentDataProvider;
@@ -133,7 +132,6 @@ pub fn create_benchmark_extrinsic(
133132
pallet_frequency_tx_payment::ChargeFrqTransactionPayment::<runtime::Runtime>::from(0),
134133
pallet_msa::CheckFreeExtrinsicUse::<runtime::Runtime>::new(),
135134
pallet_handles::handles_signed_extension::HandlesSignedExtension::<runtime::Runtime>::new(),
136-
StaleHashCheckExtension,
137135
frame_metadata_hash_extension::CheckMetadataHash::<runtime::Runtime>::new(false),
138136
cumulus_primitives_storage_weight_reclaim::StorageWeightReclaim::<runtime::Runtime>::new(),
139137
);
@@ -151,7 +149,6 @@ pub fn create_benchmark_extrinsic(
151149
(),
152150
(),
153151
(),
154-
(),
155152
None,
156153
(),
157154
),

0 commit comments

Comments
 (0)