Adjustments to the wallet proposal generator #3788
Merged
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.
Refs: keep-network/tbtc-v2#781
Depends on: keep-network/tbtc-v2#788 (the
client-build-test-publish
job will become green once 788 is merged and a newtbtc-v2@development
package withRedemptionWatchtower
artifact will be published to npm)The optimistic redemption upgrade introduces a veto mechanism (keep-network/tbtc-v2#788) that enforces a processing delay on each redemption request. The exact delay value depends on the number of objections raised against the given redemption request. The
WalletProposalValidator
contract has been modified to include validation of that delay factor. The first change ed9c4ae introduces the same for the redemption proposal generator. This ensures the generator issues proposals that conform to the on-chain validation rules and coordination windows are not being wasted.By the way, we are taking an opportunity to optimize the deposit sweep proposal generation. The
WalletProposalValidator
contract enforces the minimum age of a deposit that can become part of the proposal. The proposal generatorwas missing this check and was often producing invalid proposals that were violating the on-chain minimum deposit age rule. We fix that in 55be487.