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

Update account with new properties #4924

Closed
shuse2 opened this issue Mar 9, 2020 · 0 comments · Fixed by #4991
Closed

Update account with new properties #4924

shuse2 opened this issue Mar 9, 2020 · 0 comments · Fixed by #4991
Assignees
Milestone

Comments

@shuse2
Copy link
Collaborator

shuse2 commented Mar 9, 2020

Description

Add properties in account class and in the database schema.

  1. votes property is an array with objects { delegateAddress: string, amount: bigint }, and in the JSON format, amount has to be “string”
    account.votes property in the database is changed to JSONB
  2. unlocking property is an array with objects { delegateAddress: string, amount: bigint, unvoteHeight: number }, and in the JSON format, amount has to be “string”
    account.unlocking property in the database is JSONB
  3. Update voteWeight to totalVotesReceived. Property should be bigint and in the database it should be string
  4. Bundle all the delegate related properties into delegate property for both application and database.
    which will be
delegate: {
	lastForgedHeight: number,
	registeredHeight: number,
	totalVotesReceived: bigint,
	consecutiveMissedBlocks: number,
	isBanned: boolean,
	pomHeights: number[],
}

Motivation

In order to support new DPoS system, account need to have new properties

Acceptance Criteria

  • All properties in the description is added to account class
  • All properties in the description is added to mem_account table
  • Test all property can be read/write from the database
  • Test all property are correctly converted from JSON to instance properties

Related issues

#4915

@shuse2 shuse2 changed the title Update account class with new properties Update account with new properties Mar 11, 2020
@shuse2 shuse2 self-assigned this Mar 16, 2020
shuse2 added a commit that referenced this issue Mar 20, 2020
Update Framework and Lisk-chain to have updated account - Closes #4924
@karmacoma karmacoma added this to the Sprint 16 milestone Apr 8, 2020
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