Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add entropy correctness test #565

Merged
merged 2 commits into from
Feb 28, 2023
Merged

Conversation

ulbqb
Copy link
Member

@ulbqb ulbqb commented Feb 13, 2023

Description

PR #559 adds Entropy to Block and says that Entropy is single at every height. But that was not tested. So this PR adds a test that checks Entropy is single in every height. The following items need to be confirmed:

Closes: #XXX

@ulbqb ulbqb self-assigned this Feb 13, 2023
@ulbqb ulbqb added the C: enhancement Classification: New feature or its request, or improvement in maintainability of code label Feb 13, 2023
@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Merging #565 (413d63a) into main (7ca9a20) will increase coverage by 0.01%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #565      +/-   ##
==========================================
+ Coverage   66.07%   66.08%   +0.01%     
==========================================
  Files         278      277       -1     
  Lines       36999    36946      -53     
==========================================
- Hits        24446    24416      -30     
+ Misses      10791    10773      -18     
+ Partials     1762     1757       -5     
Impacted Files Coverage Δ
crypto/sr25519/pubkey.go 35.89% <0.00%> (-7.70%) ⬇️
p2p/switch.go 65.08% <0.00%> (-1.45%) ⬇️
p2p/pex/pex_reactor.go 79.67% <0.00%> (-0.62%) ⬇️
light/client.go 72.79% <0.00%> (ø)
blockchain/v0/pool.go 79.58% <0.00%> (ø)
proxy/multi_app_conn.go 47.66% <0.00%> (ø)
libs/rand/sampling.go
consensus/reactor.go 74.97% <0.00%> (+0.26%) ⬆️
types/block.go 79.58% <0.00%> (+0.36%) ⬆️
p2p/conn/connection.go 80.38% <0.00%> (+0.57%) ⬆️
... and 6 more

@torao
Copy link
Contributor

torao commented Feb 15, 2023

Just the wording, but "uniqueness" asserts that "never duplicates" (i.e. can be used for such as primary keys or node ids); verification and correctness seem better in terms of Entropy's behaviour and this test.

tnasu
tnasu previously approved these changes Feb 15, 2023
types/block_test.go Outdated Show resolved Hide resolved
Kynea0b
Kynea0b previously approved these changes Feb 16, 2023
Copy link
Contributor

@Kynea0b Kynea0b left a comment

Choose a reason for hiding this comment

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

LGTM

@ulbqb ulbqb changed the title Add entropy uniqueness test Add entropy correctness test Feb 22, 2023
@ulbqb ulbqb dismissed stale reviews from Kynea0b and tnasu via 413d63a February 22, 2023 07:31
@ulbqb
Copy link
Member Author

ulbqb commented Feb 22, 2023

Just the wording, but "uniqueness" asserts that "never duplicates" (i.e. can be used for such as primary keys or node ids); verification and correctness seem better in terms of Entropy's behaviour and this test.

@torao
I see. I'll use "correctness" or "single" instead of "uniqueness".

@ulbqb ulbqb requested review from torao, tnasu and Kynea0b February 22, 2023 07:33
@ulbqb ulbqb merged commit 6be90a9 into Finschia:main Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: enhancement Classification: New feature or its request, or improvement in maintainability of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants