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

SpendBundle members #315

Merged
merged 4 commits into from
Dec 28, 2023
Merged

SpendBundle members #315

merged 4 commits into from
Dec 28, 2023

Conversation

arvidn
Copy link
Contributor

@arvidn arvidn commented Nov 13, 2023

This PR is best reviewed one commit at a time.

The core of this patch is adding the following member functions to the SpendBundle type:

    @staticmethod
    def aggregate(sbs: List[SpendBundle]) -> SpendBundle: ...
    def name(self) -> bytes32: ...
    def removals(self) -> List[Coin]: ...
    def additions(self) -> List[Coin]: ...
    def debug(self) -> None: ...

By far the most complex one is additions(), which actually runs the puzzles in the spend bundle, and pulls out the CREATE_COIN conditions to return the coins being created by the spend bundle.

Most of the additional code are tests, a fuzzer and an extension to the corpus generation tool to pull out spend bundles from the block chain database.

Copy link

coveralls-official bot commented Nov 13, 2023

Pull Request Test Coverage Report for Build 7333749758

  • 156 of 201 (77.61%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 86.023%

Changes Missing Coverage Covered Lines Changed/Added Lines %
chia-protocol/src/program.rs 29 33 87.88%
chia-tools/src/visit_spends.rs 0 5 0.0%
chia-protocol/src/spend_bundle.rs 127 163 77.91%
Totals Coverage Status
Change from base Build 7333029126: -0.1%
Covered Lines: 11035
Relevant Lines: 12828

💛 - Coveralls

@arvidn arvidn force-pushed the spend-bundle branch 4 times, most recently from 7fc5846 to 98f28a3 Compare December 20, 2023 21:54
@arvidn arvidn marked this pull request as ready for review December 27, 2023 01:05
@arvidn arvidn requested a review from Rigidity December 27, 2023 01:05
Copy link
Contributor

@Rigidity Rigidity left a comment

Choose a reason for hiding this comment

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

looks good

@arvidn arvidn merged commit 1f82bca into main Dec 28, 2023
54 checks passed
@arvidn arvidn deleted the spend-bundle branch December 28, 2023 01:37
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.

2 participants