Repository navigation
fix(rgb): settle RGB on justice sweeps and color both views - #43
Open
ABallarini wants to merge 1 commit into
Open
ABallarini wants to merge 1 commit into
ABallarini wants to merge 1 commit into
Conversation
ABallarini
force-pushed
the
fix/penalty-transaction
branch
from
October 14, 2026 11:05
e3c74f8 to
16e3faf
Compare
ABallarini
force-pushed
the
fix/penalty-transaction
branch
from
October 14, 2026 12:58
16e3faf to
40877cc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Justice (penalty) sweeps now carry the channel's RGB state transition, so the RGB assigned to the revoked commitment settles for the honest peer instead of being burned. Every node also colors both commitment views of each state, so whichever commitment is broadcast, both nodes hold its allocation.
color_claim: colors only the revoked vouts the justice actually spends; inputs grouped by spent txid, so justice packages spanning several revoked transactions are handled.color_commitment/color_closing: rgb-lib errors map toChannelError::closeinstead of panicking; allchannel.rscall sites handle the result (?, logged abort, or logged skip).ldk_data_dirthreaded through the monitor intoOnchainTxHandler(never serialized) so the justice path can locate the{txid}_transfer_infofiles.Verified end-to-end by RGB-Tools/rgb-lightning-node#172.
Documentation: https://hackmd.io/@6IaNVzsDRAeobScrx7A32A/rk4MN39sMx