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

Svnn ibc proof generation #37

Merged
merged 36 commits into from
May 2, 2024
Merged

Svnn ibc proof generation #37

merged 36 commits into from
May 2, 2024

Conversation

systemzax
Copy link
Member

@systemzax systemzax commented Apr 16, 2024

This PR updates the standalone svnn_ibc unit test to include proof generation. Resolves #90.

@ericpassmore
Copy link
Contributor

Note:start
group: IF
category: TEST
summary: Update standalone svnn_ibc unit test to include proof generation.
Note:end

unittests/svnn_ibc_test_cluster.hpp Outdated Show resolved Hide resolved
unittests/test-contracts/svnn_ibc/svnn_ibc.cpp Outdated Show resolved Hide resolved
@BenjaminGormanPMP BenjaminGormanPMP requested a review from arhag April 19, 2024 16:42
@systemzax systemzax requested review from greg7mdp and linh2931 April 29, 2024 17:57
Base automatically changed from savanna to main April 29, 2024 18:39
unittests/test-contracts/svnn_ibc/svnn_ibc.hpp Outdated Show resolved Hide resolved

uint32_t block_num;

checksum256 finality_mroot;

time_point cache_expiry;

uint64_t primary_key()const { return id; }
uint64_t by_block_num()const { return block_num; }
//uint64_t primary_key()const { return id; }
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove commented line.


};

TABLE lastproof {

uint64_t id;
//uint64_t id;
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove commented line.

@@ -100,20 +94,20 @@ CONTRACT svnn_ibc : public contract {
}

struct quorum_certificate {
std::vector<uint64_t> finalizers;
bls_signature signature;
std::vector<uint32_t> finalizers;
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we switched to std::vector<uint8_t> in spring.

if (pairIndex<leaf_count) proof_path.push_back(isLeft);

leaf_count/=2;
leaf_index=leaf_index / 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

why not /=2 to be consistent with line above?

@systemzax systemzax merged commit a3fa40e into main May 2, 2024
36 checks passed
@systemzax systemzax deleted the svnn_ibc_proof_generation branch May 2, 2024 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unit tests of IBC functionality with new algorithm
5 participants