Skip to content

JSON encoding for TransactionHintsBag type hierarchy#577

Merged
greenhat merged 17 commits intodevelopfrom
cmt-json
Jun 3, 2022
Merged

JSON encoding for TransactionHintsBag type hierarchy#577
greenhat merged 17 commits intodevelopfrom
cmt-json

Conversation

@greenhat
Copy link
Copy Markdown
Member

@greenhat greenhat commented May 23, 2022

This PR implements JSON encoding for the hints type hierarchy, including SigmaBoolean and proof tree types used in sigma protocol. Besides that, it swaps the external Scalar with its wrapped version Wscalar.
To implement property-based testing all of the above-mentioned types got Arbitrary implementation.

TODO:

@coveralls
Copy link
Copy Markdown

coveralls commented May 25, 2022

Pull Request Test Coverage Report for Build 2434368031

  • 209 of 228 (91.67%) changed or added relevant lines in 19 files are covered.
  • 29 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.2%) to 87.836%

Changes Missing Coverage Covered Lines Changed/Added Lines %
ergotree-interpreter/src/json/hint.rs 20 21 95.24%
ergotree-interpreter/src/sigma_protocol/prover/prover_result.rs 3 4 75.0%
ergotree-interpreter/src/sigma_protocol/sig_serializer.rs 9 10 90.0%
ergotree-interpreter/src/sigma_protocol/prover.rs 5 7 71.43%
ergotree-interpreter/src/sigma_protocol.rs 3 6 50.0%
ergotree-ir/src/chain/json/sigma_protocol.rs 26 37 70.27%
Files with Coverage Reduction New Missed Lines %
ergotree-interpreter/src/sigma_protocol.rs 1 61.54%
ergotree-ir/src/serialization/types.rs 6 82.7%
ergotree-ir/src/chain/json/ergo_box.rs 7 94.26%
ergotree-ir/src/chain/ergo_box.rs 15 91.02%
Totals Coverage Status
Change from base Build 2361989666: 0.2%
Covered Lines: 15316
Relevant Lines: 17437

💛 - Coveralls

@greenhat greenhat marked this pull request as ready for review June 1, 2022 14:46
@greenhat greenhat requested a review from kettlebell June 1, 2022 14:51
Copy link
Copy Markdown
Collaborator

@kettlebell kettlebell left a comment

Choose a reason for hiding this comment

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

Just a couple of minor comments but otherwise it looks good to me!

Comment thread ergotree-interpreter/src/json/hint.rs Outdated
Comment thread ergotree-interpreter/src/json/hint.rs Outdated
@greenhat greenhat merged commit 075b206 into develop Jun 3, 2022
@greenhat greenhat deleted the cmt-json branch June 3, 2022 12:08
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.

3 participants