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

itest: add test for consistent balance reporting #871

Merged
merged 3 commits into from
Oct 21, 2024
Merged

Conversation

gijswijs
Copy link
Contributor

@gijswijs gijswijs commented Oct 15, 2024

We want proper asset balance reporting between lnd and tapd, without asset balances turing up in both the asset balance from tapd and the custom channel balance from lnd.

Currently this behavior is not aligned with that requirement. tapd has currently now way of not reporting asset balances that are actually part of the funding transaction of a custom channel. This is fixed with taproot-assets PR 1151

The current PR under review here is dependent on the taproot-assets commit:
lightninglabs/taproot-assets@31d333c

Bumping the tap version was included in this commit 5bbf3d7 and that commit should probably be edited once 1151 is merged.

@dstadulis dstadulis added this to the tapd v0.4.2 milestone Oct 15, 2024
@gijswijs gijswijs force-pushed the balance-itest branch 8 times, most recently from e7c40a9 to 091b201 Compare October 18, 2024 09:02
@gijswijs gijswijs marked this pull request as ready for review October 18, 2024 09:49
@guggero guggero self-requested a review October 18, 2024 11:21
@guggero guggero changed the base branch from 2024-09-0_19_reproducible-releases to 0-19-staging October 18, 2024 12:40
@guggero
Copy link
Member

guggero commented Oct 18, 2024

Needs a rebase after changing the base branch.

`assertAssetBalance` would not return an error in the edge case where
the requested `assetID` had no balance but the `expectedBalance` was
non-zero.
This commit fixes the behavior in that specific edge case.
Copy link
Member

@guggero guggero left a comment

Choose a reason for hiding this comment

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

One go.mod fix, other than that looks good to me 💯

gijswijs and others added 2 commits October 21, 2024 17:34
This commit adds an integration test to ensure consistent balance
reporting across various scenarios. The test covers custom channel
funding and list balance operations to verify that balance information
is accurately reported between lnd's `ChannelBalance` and tapd's
`ListBalance` RPCs, without accidental double reporting.

(temp) build: bump tapd

This commit bumps tapd to the this commit:
lightninglabs/taproot-assets@31d333c

This commit should be dropped before merging in the main branch.
@guggero guggero merged commit 221abff into 0-19-staging Oct 21, 2024
10 of 13 checks passed
@guggero guggero deleted the balance-itest branch October 21, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants