LiskArchive/lips

Verify substore prefix values alignment with sdk

vjaiman opened this issue · 0 comments

Motivation

Verify substore prefix values alignment with the sdk implemetaiton.

Current Specifications

Currently some of the substore prefix values in some LIPs are not aligned with the sdk implementation.

Indexed are passed during the instantiation of the store as below:
Validators module
PoA module
Token module
NFT module
PoS module
Dynamic block rewards
BFT

SDK implementation for generating the prefix is here:

computeSubstorePrefix

Proposed Specifications

Update the substore prefix values in the LIPs and make it aligned with the sdk implementation.

  1. LIP 44:

SUBSTORE_PREFIX_VALIDATOR_PARAMS : 0x4000 -> 0x8000
SUBSTORE_PREFIX_BLS_KEYS : 0x8000 -> 0x4000

  1. LIP 47:

SUBSTORE_PREFIX_VALIDATOR : 0x8000 -> 0x0000
SUBSTORE_PREFIX_NAME: 0xc0000 -> 0x4000
SUBSTORE_PREFIX_SNAPSHOT: 0xe000 ->0xc000
SUBSTORE_PREFIX_CHAIN : 0x0000 -> 0x8000

  1. LIP 51:

SUBSTORE_PREFIX_ESCROW : 0xc000 -> 0x4000
SUBSTORE_PREFIX_SUPPORTED_TOKENS : 0xe000 -> 0xc000

  1. LIP 52:

SUBSTORE_PREFIX_ESCROW : 0xc0 00 -> 0x4000
SUBSTORE_PREFIX_SUPPORTED_NFTS : 0xd0 00 -> 0xc000

  1. LIP 57:

SUBSTORE_PREFIX_VALIDATOR: 0x4000 -> 0x8000
SUBSTORE_PREFIX_NAME: 0x8000 -> 0x4000
SUBSTORE_PREFIX_SNAPSHOT: 0xd000 -> 0xc000
SUBSTORE_PREFIX_GENESIS_DATA: 0xc000 -> 0x2000
SUBSTORE_PREFIX_PREVIOUS_TIMESTAMP: 0xe000 -> 0xa000
SUBSTORE_PREFIX_ELIGIBLE_VALIDATORS : 0xf000 -> 0x6000

  1. LIP 71:

SUBSTORE_PREFIX_END_OF_ROUND_TIMESTAMP: 0xe000 -> 0x0000

Affected LIPs

LIP 44, 47, 51, 52, 57, 71