Skip to content

itest flake: fixes flake in burn test #1514

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

itest flake: fixes flake in burn test #1514

wants to merge 5 commits into from

Conversation

guggero
Copy link
Member

@guggero guggero commented May 6, 2025

Fixes a flake in the integration test that happens since we refactored the burn funding logic to use the allocation code for creating virtual packets.

@guggero guggero requested review from ffranr and gijswijs May 6, 2025 14:18
@guggero guggero self-assigned this May 6, 2025
@guggero guggero moved this from 🆕 New to 🏗 In progress in Taproot-Assets Project Board May 6, 2025
@guggero guggero moved this from 🏗 In progress to 👀 In review in Taproot-Assets Project Board May 6, 2025
@guggero guggero added this to the v0.6 milestone May 6, 2025
guggero added 5 commits May 6, 2025 20:44
This allows us to specify a pkg= and case= argument to the
flake-unit-race test.
Before we refactor the ordering, we add a unit test to make sure we
don't change the behavior.
We refactor the input piece sort mechanism and export the main
comparison function so we can re-use it in other packages to do the same
ordering where necessary.
This fixes a bug where the order of the inputs in a virtual packet
wasn't deterministic, because we only sorted the proofs _after_ already
assigning them as inputs to the packet.
This fixes the main part of the flake that caused burns to sometimes not
be recognized correctly.
Because we now also use the allocation code to create virtual packets,
we need to apply the same ordering of inputs to the selected commitments
before choosing the first input that the burn key is derived from.
Otherwise it can happen that the actual first input in the allocated
virtual transaction is another one and the resulting burn key isn't
recognized correctly.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 14867407240

Details

  • 18 of 21 (85.71%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on burn-flake-fix at 37.006%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tapfreighter/wallet.go 0 3 0.0%
Totals Coverage Status
Change from base Build 14866822237: 37.0%
Covered Lines: 26508
Relevant Lines: 71632

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

2 participants