Repository navigation
refactor: remove the RSKIP643 pegout tx index grace period - #3795
Merged
marcos-iov merged 23 commits intoOct 23, 2026
Merged
marcos-iov merged 23 commits into
marcos-iov merged 23 commits into
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Existing legacy-release registration tests still expect processing at heights beyond the new cutoff.
1 open issue
What changed in this PR
Updates bridge transaction classification to stop consulting the legacy pegout index after the RSKIP643 grace period.
Changes:
- Passes bridge constants and BTC transaction height into classification.
- Skips sighash computation and index lookup after the cutoff.
- Adds grace-period classification tests for pegouts and migrations.
| File | Description |
|---|---|
| rskj-core/src/test/java/co/rsk/peg/PegUtilsTest.java | Updates classifier calls and tests grace-period boundaries. |
| rskj-core/src/main/java/co/rsk/peg/PegUtils.java | Gates legacy index lookup on the RSKIP643 cutoff. |
Review effort: Balanced
julianlen
force-pushed
the
gracePeriod-generalization
branch
2 times, most recently
from
October 21, 2026 23:15
629ba82 to
83d7450
Compare
julianlen
force-pushed
the
add-gracePeriod-registerBtcTransaction
branch
from
October 21, 2026 23:21
a75b273 to
b6bd65c
Compare
julianlen
force-pushed
the
add-gracePeriod-registerBtcTransaction
branch
from
October 21, 2026 23:58
1a970c2 to
b1960ac
Compare
…est after the grace period
…ITHIN_GRACE_PERIOD_HEIGHT_BLOCK
marcos-iov
force-pushed
the
add-gracePeriod-registerBtcTransaction
branch
from
October 22, 2026 22:46
70e5184 to
1409e06
Compare
julia-zack
approved these changes
Oct 23, 2026
|
julianlen
requested review from
julia-zack
and
a balanced review from Copilot
October 23, 2026 15:35
marcos-iov
merged commit Oct 23, 2026
461300b
into
registerPegoutTransaction-integration
10 checks passed
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.





Description
We decided to drop the grace period for the pegout tx index after RSKIP643. A release created before RSKIP643 is only recorded in the pegout tx index, by sighash. A release created after it has its outputs to the live federations stored in
federationsPendingBtcUTXOs.registerBtcTransactionnow recognises both kinds at any BTC height, so there is no longer a height at which the Bridge stops looking up the pegout tx index.This PR removes what was left of the grace period:
PegUtils.isFederationsPendingBtcUTXOsEnabled, which nothing called anymore.btcHeightWhenFederationsPendingBtcUTXOsActivatesand its getter fromBridgeConstants, plus the placeholder values in the mainnet, testnet, testnet2 and regtest constants.Production behaviour is the same as on the base branch. With RSKIP643 active,
registerBtcTransactionhandles releases like this:PEGOUT_OR_MIGRATION, outputs to the live federations are registeredfederationsPendingBtcUTXOsregisterNewUTXOsByTxIdAndMarkTxHashAsProcessedMotivation and Context
How Has This Been Tested?
BridgeSupportRegisterBtcTransactionTestHEIGHT_AT_WHICH_TO_START_USING_PEGOUT_INDEX. Cardamom releases register atHEIGHT_TO_USE_FEDERATIONS_PENDING_BTC_UTXOS, 100 blocks later.forVetivercases for segwit pegouts and migrations inPegoutTransactionandMigrationTransaction.BridgeSupportSvpTest: the SVP fund tx created for Vetiver and created for Cardamom, registered while the SVP is ongoing and after its values were cleared.BridgeConstantsTest: removed thegetBtcHeightWhenFederationsPendingBtcUTXOsActivatestest together with the constant.PegUtilsTest: readability only, with static imports forPegTxTypeand one argument per line.Types of changes
Checklist:
Gated by RSKIP643. The mainnet/testnet
btcHeightWhenFederationsPendingBtcUTXOsActivatesvalues on the base branch are placeholders (10_000_000) until the activation is scheduled.