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

Update genesis block tests #8440

Merged
merged 6 commits into from
May 16, 2023
Merged

Conversation

shuse2
Copy link
Collaborator

@shuse2 shuse2 commented May 10, 2023

What was the problem?

This PR resolves #8136 and resolves #7237

How was it solved?

How was it tested?

N/A

@shuse2 shuse2 self-assigned this May 10, 2023
@codecov
Copy link

codecov bot commented May 10, 2023

Codecov Report

Merging #8440 (4dc8572) into development (72b4bb4) will increase coverage by 0.00%.
The diff coverage is n/a.

❗ Current head 4dc8572 differs from pull request most recent head 896afe2. Consider uploading reports for the commit 896afe2 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##           development    #8440   +/-   ##
============================================
  Coverage        83.35%   83.36%           
============================================
  Files              593      593           
  Lines            22265    22265           
  Branches          3255     3255           
============================================
+ Hits             18560    18562    +2     
+ Misses            3705     3703    -2     

see 6 files with indirect coverage changes

Copy link
Contributor

@AndreasKendziorra AndreasKendziorra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following point from #8136 is still unaddressed:

There is no test for the stateRoot property. In particular, there is no test that expects that genesis block processing fails if the value of header.stateRoot in incorrect.

@AndreasKendziorra
Copy link
Contributor

I left two additional review comments for a file, but they got somehow lost. So, I repeat them here:

@shuse2 shuse2 force-pushed the 8136-improve-genesis-block-test branch from 64f0752 to 91ec97b Compare May 12, 2023 13:01
@shuse2 shuse2 requested a review from AndreasKendziorra May 12, 2023 13:11
@shuse2
Copy link
Collaborator Author

shuse2 commented May 12, 2023

@AndreasKendziorra
Added valid genesis block case and merged the other PR into development, so the error message should be resolved on the branch already.

For the signature property, I made a comment on the issue 🙇

@AndreasKendziorra
Copy link
Contributor

ok, looks all good. But what is with this one:

There is no test for the stateRoot property. In particular, there is no test that expects that genesis block processing fails if the value of header.stateRoot in incorrect.

I assume it also somehow done in lisk-db. But do we ensure somewhere that genesis block processing fails if lisk-db fails to validate the stateroot?

@shuse2
Copy link
Collaborator Author

shuse2 commented May 12, 2023

@AndreasKendziorra i think i missed the comment. Added the relevant test 👍

@shuse2 shuse2 enabled auto-merge (squash) May 16, 2023 15:44
@shuse2 shuse2 merged commit d78eb5e into development May 16, 2023
@shuse2 shuse2 deleted the 8136-improve-genesis-block-test branch May 16, 2023 16:04
mosmartin pushed a commit that referenced this pull request May 24, 2023
* ✅ Update genesis block tests

* ✅ Add test for valid genesis block

* ✅ Add abi commit error check

* ✅ Fix merge error
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unit test review genesis block processing (LIP 0060) Add missing integration test for "genesis block"
3 participants