Skip to content

Commit

Permalink
- Set estimatedPegoutTxIndexBtcActivationHeight final value.
Browse files Browse the repository at this point in the history
- Set pegoutTxIndexGracePeriodInBtcBlocks final value.
  • Loading branch information
nathanieliov committed Mar 1, 2024
1 parent 6cb7531 commit 80dc7d1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public class BridgeMainNetConstants extends BridgeConstants {

numberOfBlocksBetweenPegouts = 360; // 3 hours of RSK blocks (considering 1 block every 30 seconds)

btcHeightWhenPegoutTxIndexActivates = 100; // TODO: TBD and change current mock value. This is an estimation of the btc block number once RSKIP379 is activated.
btcHeightWhenPegoutTxIndexActivates = 837_589; // Estimated date Wed, 03 Apr 2024 15:00:00 GMT. 832,430 was the block number at time of calculation
pegoutTxIndexGracePeriodInBtcBlocks = 4_320; // 30 days in BTC blocks (considering 1 block every 10 minutes)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ public class BridgeTestNetConstants extends BridgeConstants {

numberOfBlocksBetweenPegouts = 360; // 3 hours of RSK blocks (considering 1 block every 30 seconds)

btcHeightWhenPegoutTxIndexActivates = 150; // TODO: TBD and change current mock value. This is an estimation of the btc block number once RSKIP379 is activated.
pegoutTxIndexGracePeriodInBtcBlocks = 4_320; // 30 days in BTC blocks (considering 1 block every 10 minutes)
btcHeightWhenPegoutTxIndexActivates = 2_589_553; // Estimated date Wed, 20 Mar 2024 15:00:00 GMT. 2,579,823 was the block number at time of calculation
pegoutTxIndexGracePeriodInBtcBlocks = 1_440; // 10 days in BTC blocks (considering 1 block every 10 minutes)
}

public static BridgeTestNetConstants getInstance() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ void test_getMinimumPeginTxValue(BridgeConstants bridgeConstants, boolean isRSKI

private static Stream<Arguments> getBtcHeightWhenPegoutTxIndexActivatesArgProvider() {
return Stream.of(
Arguments.of(BridgeMainNetConstants.getInstance(), 100),
Arguments.of(BridgeTestNetConstants.getInstance(), 150),
Arguments.of(BridgeMainNetConstants.getInstance(), 837589),
Arguments.of(BridgeTestNetConstants.getInstance(), 2589553),
Arguments.of(BridgeRegTestConstants.getInstance(), 250)
);
}
Expand All @@ -143,7 +143,7 @@ void test_getBtcHeightWhenPegoutTxIndexActivates(BridgeConstants bridgeConstants
private static Stream<Arguments> getPegoutTxIndexGracePeriodInBtcBlocksArgProvider() {
return Stream.of(
Arguments.of(BridgeMainNetConstants.getInstance(), 4_320),
Arguments.of(BridgeTestNetConstants.getInstance(), 4_320),
Arguments.of(BridgeTestNetConstants.getInstance(), 1_440),
Arguments.of(BridgeRegTestConstants.getInstance(), 100)
);
}
Expand Down

0 comments on commit 80dc7d1

Please sign in to comment.