Remove hardcoded chain parameters #315

Closed
opened 2022-03-09 17:28:33 +00:00 by serkixenos · 4 comments
serkixenos commented 2022-03-09 17:28:33 +00:00 (Migrated from gitlab.com)

https://gitlab.com/PBSA/peerplays/-/blob/develop/libraries/chain/db_maint.cpp#L2035

libraries/chain/db_maint.cpp contains hardcoded chain params in function void update_son_params(database& db).

The implementation does not control that these parameters are applied only once, immediately after HARDFORK_SON2_TIME, but it will continue to apply them on each maintenance block, which will prevent changes initiated through chain parameter change, or asset update proposal to apply.

Additionally, changing BTC asset properties is redundant, since the asset is already created with appropriate flags.

  1. Remove changing BTC asset properties
  2. Make sure that son count is changes only once, immediately after HARDFORK_SON2_TIME
  3. Test both Mainnet and Testnet implementations
https://gitlab.com/PBSA/peerplays/-/blob/develop/libraries/chain/db_maint.cpp#L2035 libraries/chain/db_maint.cpp contains hardcoded chain params in function void update_son_params(database& db). The implementation does not control that these parameters are applied only once, immediately after HARDFORK_SON2_TIME, but it will continue to apply them on each maintenance block, which will prevent changes initiated through chain parameter change, or asset update proposal to apply. Additionally, changing BTC asset properties is redundant, since the asset is already created with appropriate flags. 1. Remove changing BTC asset properties 2. Make sure that son count is changes only once, immediately after HARDFORK_SON2_TIME 3. Test both Mainnet and Testnet implementations
serkixenos commented 2022-03-10 14:15:36 +00:00 (Migrated from gitlab.com)

changed title from Remove hardcoded chain parametrs to Remove hardcoded chain paramet{+e+}rs

changed title from **Remove hardcoded chain parametrs** to **Remove hardcoded chain paramet{+e+}rs**
hirunda commented 2022-03-17 12:38:34 +00:00 (Migrated from gitlab.com)

assigned to @hirunda

assigned to @hirunda
hirunda commented 2022-03-17 23:35:59 +00:00 (Migrated from gitlab.com)

Review is ready, we just have to decide about the time for HARDFORK_SON3_TIME when we decide to apply the change in MR !85 .

Review is ready, we just have to decide about the time for HARDFORK_SON3_TIME when we decide to apply the change in MR !85 .
serkixenos commented 2022-03-18 23:23:51 +00:00 (Migrated from gitlab.com)

QA covered by unit tests.

QA covered by unit tests.
serkixenos (Migrated from gitlab.com) closed this issue 2022-03-18 23:23:52 +00:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Peerplays_Blockchain/peerplays_migrated#315
No description provided.