This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 457
Add asset root on block generation - Closes #6750 #6882
Merged
shuse2
merged 11 commits into
feature/6554-improve-framework-architecture
from
6750-addAssetRoot-block-generation
Nov 5, 2021
Merged
Add asset root on block generation - Closes #6750 #6882
shuse2
merged 11 commits into
feature/6554-improve-framework-architecture
from
6750-addAssetRoot-block-generation
Nov 5, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Expose registered module ids from state machine - Check the size of data of an asset not exceeding the limit - Check a module asset is not duplicated - Check a module assets are sorted by id and are registered in state machine
…addAssetRoot-block-generation
shuse2
suggested changes
Nov 5, 2021
@@ -28,3 +28,6 @@ export const GENESIS_BLOCK_TRANSACTION_ROOT = EMPTY_HASH; | |||
|
|||
export const TAG_BLOCK_HEADER = createMessageTag('BH'); | |||
export const TAG_TRANSACTION = createMessageTag('TX'); | |||
|
|||
// TODO: Actual size TBD | |||
export const MAX_ASSET_DATA_SIZE_BYTES = 64; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think genesis block will exceed this value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what could be the safe value until we get the announced value?
…addAssetRoot-block-generation
mehmetegemen
reviewed
Nov 5, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a very minor comment, great job 🎉
shuse2
approved these changes
Nov 5, 2021
mehmetegemen
approved these changes
Nov 5, 2021
…addAssetRoot-block-generation
…addAssetRoot-block-generation
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was the problem?
This PR resolves #6750
How was it solved?
🌱 Add block asset validation 004e232
🌱 Calculate asset root and add it to block header on block generation f9337ec
♻️ Add _validateBlockAsset d810783
✅ Add Block and BlockAssets validation tests 89778d6
✅ Add tests for BlockAssets validation in consensus and generator b9dea4f
How was it tested?
Under
framework
,npm run test:unit consensus.spec
npm run test:unit generator.spec
Under
lisk-chain
,npm run test block_asset.spec
npm run test block.spec