Skip to content

[Investigate/Testing] Add test-case to verify that changing RetentionPeriod (+/-) live does not break anything #159

@bkontur

Description

@bkontur

Now we have RetentionPeriod as storage item exposed by runtime API, so the node binaries are reading it directly, no hard-coded values anymore.

We should have some kind of test (or at least verify), probably on the runtime level or maybe pallet level is enough?

Something like:

RetentionPeriod = 3
Block1
- store data
Block2
- store data
Block3
- store data
Block4
- check_proof(Block1) inherent
- store data
- change RetentionPeriod = 2 (decrease should be fine)
Block5
- check_proof(Block3) inherent
- store data
- change RetentionPeriod = 4 (increase, potential problems?)
Block6
- check_proof(Block2) inherent (Block2 transaction metadata where removed ??)
  - we could have a problem here, because transaction metdata were already removed?, do we need here some more fixing - something like to store previous retention period from some block and do some magic?) 

The problem could be also when we just do a decrease, there could exist potentially some gap between, which is never removed from transaction metadata. (probably not a big issue, we can cleanup manually when decreasing)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions