Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Add missing configurable config params #8753

Closed
Tracked by #7226
bobanm opened this issue Jul 19, 2023 · 1 comment
Closed
Tracked by #7226

Add missing configurable config params #8753

bobanm opened this issue Jul 19, 2023 · 1 comment
Assignees
Milestone

Comments

@bobanm
Copy link
Contributor

bobanm commented Jul 19, 2023

LIP-0063 defines configurable constants. Most of them are not implemented as per the specification. Here is the result of the analysis, grouped in 6 categories:

Both constant and config property exists and names are aligned

LIP Constant Name Config Property Name Module
BLOCK_TIME blockTime Application
COMMISSION_INCREASE_PERIOD commissionIncreasePeriod PoS
VALIDATOR_REGISTRATION_FEE validatorRegistrationFee PoS

Both constant and config property exists, but names are not aligned

LIP Constant Name Config Property Name Module
MAX_COMMISSION_INCREASE maxCommissionIncreaseRate PoS

Config property exists, but the constant is missing

LIP Constant Name Config Property Name Module Comment
MAX_TRANSACTIONS_SIZE_BYTES maxTransactionsSize Application property name is different
FACTOR_SELF_STAKING factorSelfStakes PoS property name is different
FAIL_SAFE_MISSED_BLOCKS failSafeMissedBlocks PoS
FAIL_SAFE_INACTIVE_WINDOW failSafeInactiveWindow PoS
MAX_BFT_WEIGHT_CAP maxBFTWeightCap PoS Configured as 500 instead of 1000
MIN_FEE_PER_BYTE minFeePerByte Fee
MAX_BLOCK_HEIGHT_ZERO_FEE_PER_BYTE maxBlockHeightZeroFeePerByte Fee
FACTOR_MINIMUM_REWARD_ACTIVE_VALIDATORS factorMinimumRewardActiveValidators Dyn. rewards

Config property exists, but it's different from the LIP and the constant is missing

LIP Constant Name Config Property Name Module Comment
LSK_BFT_BATCH_SIZE bftBatchSize Application
INVALID_BLS_KEYS_IN_GENESIS_BLOCK useInvalidBLSKey PoS Configured as false instead of true.

Config property exists, but constant name is different from LIP

LIP Constant Name Config Property Name Module SDK Constant Name
MAX_LENGTH_VALIDATOR_REVEALS maxLengthReveals Random DEFAULT_MAX_LENGTH_REVEALS
USER_ACCOUNT_INITIALIZATION_FEE userAccountInitializationFee Token USER_SUBSTORE_INITIALIZATION_FEE
ESCROW_ACCOUNT_INITIALIZATION_FEE escrowAccountInitializationFee Token ESCROW_SUBSTORE_INITIALIZATION_FEE

Not part of a module, so not having corresponding defaultConfig object

LIP Constant Name Element Comment
MAX_ASSET_DATA_SIZE_BYTES lisk-chain Defined as 64, instead of 18
TRANSACTION_MAX_PARAMS_SIZE lisk-chain

Not configurable

LIP Constant Name Module Comment
NUMBER_ACTIVE_VALIDATORS PoS
NUMBER_STANDBY_VALIDATORS PoS
OWN_CHAIN_ID Token Used as genesisConfig.chainID
MAX_LENGTH_NAME PoS
MAX_LENGTH_NAME Interoperability Defined as 40
MAX_NUMBER_PENDING_UNLOCKS PoS
LOCKING_PERIOD_STAKING PoS
REPORT_MISBEHAVIOR_REWARD PoS Constant name is REPORTING_PUNISHMENT_REWARD
REPORT_MISBEHAVIOR_LIMIT_BANNED PoS
MIN_WEIGHT PoS Constant exists, but it is not used anywhere
TOKEN_ID_POS PoS Constant exists, but it is not used anywhere
ADDRESS_FEE_POOL Fee? feePoolAddress exists in code, but unclear where the value comes from

Not configurable, but imported as a constant

LIP Constant Name Module Comment
BASE_STAKE_AMOUNT PoS
LOCKING_PERIOD_SELF_STAKING PoS
PUNISHMENT_WINDOW_STAKING PoS Decrease default value from 260_000 to 241_920
PUNISHMENT_WINDOW_SELF_STAKING PoS Decrease default value from 780_000 to 725_760
WEIGHT_SCALE_FACTOR PoS
REWARD_REDUCTION_FACTOR_BFT Rewards Defined in Rewards, not in Dynamic Rewards as LIP states
MAX_NUMBER_OF_SIGNATURES Auth

Unknown

LIP Constant Name
MIN_CERTIFICATE_HEIGHT
MAX_NUMBER_STAKING_SLOTS

TOKEN_ID_DYNAMIC_BLOCK_REWARD and TOKEN_ID_FEE constants don't need to be defined as constants, because SDK calculates them dynamically.

@ishantiw
Copy link
Contributor

Some constants were not updated related to PoS:

  • FAIL_SAFE_INACTIVE_WINDOW = 120,960 = 14 * 24 * 3600 // BLOCK_TIME
  • LOCKING_PERIOD_STAKING = 25,920 = 3 * 24 * 3600 // BLOCK_TIME
  • LOCKING_PERIOD_SELF_STAKING = 241,920 = 28 * 24 * 3600 // BLOCK_TIME
  • PUNISHMENT_WINDOW_STAKING = 241,920 = 28 * 24 * 3600 // BLOCK_TIME
  • PUNISHMENT_WINDOW_SELF_STAKING = 725,760 = 3 * PUNISHMENT_WINDOW_STAKING
  • COMMISSION_INCREASE_PERIOD = 241,920 = 28 * 24 * 3600 // BLOCK_TIME

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants