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

Update block schema and usages #6739

Closed
Tracked by #6749
shuse2 opened this issue Sep 6, 2021 · 0 comments · Fixed by #6765
Closed
Tracked by #6749

Update block schema and usages #6739

shuse2 opened this issue Sep 6, 2021 · 0 comments · Fixed by #6765

Comments

@shuse2
Copy link
Collaborator

shuse2 commented Sep 6, 2021

Description

  1. Update current block header schema to be defined as defined in LIP. Also, remove unused schemas and types

  2. move current block header property assets should be moved to block property as BlockAssets and the class should have

  • fromBytes
  • fromJSON
  • getBytes
  • sort
  • getAsset (same as the current implementation)
  • setAsset (same as the current implementation)
    Include BlockAssets as part of block.
  1. Update storage and data access to store and get assets as part of Block. Block Assets should be stored as
[storageKey,blockID]: encodeBytesArray(assets),

where encodeBytesArray and decodeBytesArray should be defined as utils which encode/decode bytes array using schema like

arraySchema = {
  "type": "object",
  "required": ["list"],
  "properties": {
    "list": {
      "type": "array",
      "fieldNumber": 1,
      "items": {
        "dataType": "bytes"
      }
    },
  }
}
  1. Update framework to use updated properties to pass build and test. (Mainly maxHeightPrevoted and maxHeightGenerated)

Acceptance Criteria

  • Build and unit test should pass
  • Unit test should be added for BlockAssets
  • Storage integration test on lisk-chain should be added

Additional Information

Related ##6749

@shuse2 shuse2 added this to the Sprint 52 milestone Sep 6, 2021
@shuse2 shuse2 self-assigned this Sep 6, 2021
@shuse2 shuse2 removed the unplanned label Sep 7, 2021
@shuse2 shuse2 removed this from the Sprint 52 milestone Sep 7, 2021
@shuse2 shuse2 changed the title Introduce minimum skeleton of new block format for module LIPs Introduce new block header and block asset schema Sep 7, 2021
@shuse2 shuse2 changed the title Introduce new block header and block asset schema Update block schema and usages Sep 8, 2021
@shuse2 shuse2 linked a pull request Sep 13, 2021 that will close this issue
@sridharmeganathan sridharmeganathan added this to the Sprint 53 milestone Sep 13, 2021
shuse2 added a commit that referenced this issue Sep 15, 2021
@shuse2 shuse2 closed this as completed Sep 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants