diff --git a/lib/constants/index.js b/lib/constants/index.js index 9bc068d00..c66535063 100644 --- a/lib/constants/index.js +++ b/lib/constants/index.js @@ -40,26 +40,47 @@ module.exports = { // In duffs INSTANTSEND_FEE_PER_INPUT: 10000, LLMQ_TYPES: { - LLMQ_TYPE_50_60: 1, // 50 members, 30 (60%) threshold, one per hour (24 blocks) - LLMQ_TYPE_400_60: 2, + LLMQ_TYPE_50_60: 1, + // 400 members, 240 (60%) threshold, one every 12 hours (288 blocks) - LLMQ_TYPE_400_85: 3, + LLMQ_TYPE_400_60: 2, + // 400 members, 340 (85%) threshold, one every 24 hours (576 blocks) - LLMQ_TYPE_100_67: 4, + LLMQ_TYPE_400_85: 3, + // 100 members, 67 (67%) threshold, one every 24 hours (576 blocks) - LLMQ_TYPE_LLMQ_TEST: 100, + LLMQ_TYPE_100_67: 4, + + // 60 members, 45 (75%) threshold, one every 12 hours + LLMQ_TYPE_60_75: 5, + // 3 members, 2 (66%) threshold, one per hour (24 blocks) // Params might differ when -llmqtestparams is used - LLMQ_TYPE_LLMQ_DEVNET: 101, + LLMQ_TYPE_LLMQ_TEST: 100, + // 10 members, 6 (60%) threshold, one per hour (24 blocks) // Params might differ when -llmqdevnetparams is used + LLMQ_TYPE_LLMQ_DEVNET: 101, + + // 3 members, 2 (66%) threshold, one per hour. + // Params might differ when -llmqtestparams is used LLMQ_TYPE_TEST_V17: 102, + + // 4 members, 2 (66%) threshold, one per hour. + // Params might differ when -llmqtestparams is used + LLMQ_TYPE_TEST_DIP0024: 103, + + // 3 members, 2 (66%) threshold, one per hour. + // Params might differ when -llmqtestinstantsendparams is used + LLMQ_TYPE_TEST_INSTANTSEND: 104, }, - LLMQ_SIGN_HEIGHT_OFFSET: 8, // when selecting a quorum for signing and verification, we use this offset as // starting height for scanning. This is because otherwise the resulting signatures // would not be verifiable by nodes which are not 100% at the chain tip. - SMLSTORE_MAX_DIFFS: 720, // keep diffs for 30 hours (720 blocks) + LLMQ_SIGN_HEIGHT_OFFSET: 8, + + // keep diffs for 30 hours (720 blocks) + SMLSTORE_MAX_DIFFS: 720, }; diff --git a/lib/deterministicmnlist/QuorumEntry.js b/lib/deterministicmnlist/QuorumEntry.js index c3990e0f0..c2d31f77c 100644 --- a/lib/deterministicmnlist/QuorumEntry.js +++ b/lib/deterministicmnlist/QuorumEntry.js @@ -297,6 +297,11 @@ QuorumEntry.getParams = function getParams(llmqType) { params.threshold = 30; params.maximumActiveQuorumsCount = 24; return params; + case constants.LLMQ_TYPES.LLMQ_TYPE_60_75: + params.size = 60; + params.threshold = 45; + params.maximumActiveQuorumsCount = 32; + return params; case constants.LLMQ_TYPES.LLMQ_TYPE_400_60: params.size = 400; params.threshold = 240; @@ -327,6 +332,16 @@ QuorumEntry.getParams = function getParams(llmqType) { params.threshold = 2; params.maximumActiveQuorumsCount = 2; return params; + case constants.LLMQ_TYPES.LLMQ_TYPE_TEST_DIP0024: + params.size = 4; + params.threshold = 2; + params.maximumActiveQuorumsCount = 2; + return params; + case constants.LLMQ_TYPES.LLMQ_TYPE_TEST_INSTANTSEND: + params.size = 3; + params.threshold = 2; + params.maximumActiveQuorumsCount = 2; + return params; default: throw new Error(`Invalid llmq type ${llmqType}`); } diff --git a/lib/deterministicmnlist/SimplifiedMNList.js b/lib/deterministicmnlist/SimplifiedMNList.js index eb6f43fde..b9485cdce 100644 --- a/lib/deterministicmnlist/SimplifiedMNList.js +++ b/lib/deterministicmnlist/SimplifiedMNList.js @@ -368,14 +368,17 @@ SimplifiedMNList.prototype.getLLMQTypes = function getLLMQTypes() { case Networks.livenet.name: llmqTypes = [ constants.LLMQ_TYPES.LLMQ_TYPE_50_60, + constants.LLMQ_TYPES.LLMQ_TYPE_60_75, constants.LLMQ_TYPES.LLMQ_TYPE_400_60, constants.LLMQ_TYPES.LLMQ_TYPE_400_85, + constants.LLMQ_TYPES.LLMQ_TYPE_100_67, ]; return llmqTypes; case Networks.testnet.name: if (this.mnList.length > 100) { llmqTypes = [ constants.LLMQ_TYPES.LLMQ_TYPE_50_60, + constants.LLMQ_TYPES.LLMQ_TYPE_60_75, constants.LLMQ_TYPES.LLMQ_TYPE_400_60, constants.LLMQ_TYPES.LLMQ_TYPE_400_85, constants.LLMQ_TYPES.LLMQ_TYPE_TEST_V17, @@ -387,7 +390,10 @@ SimplifiedMNList.prototype.getLLMQTypes = function getLLMQTypes() { llmqTypes = [ constants.LLMQ_TYPES.LLMQ_TYPE_LLMQ_TEST, constants.LLMQ_TYPES.LLMQ_TYPE_50_60, + constants.LLMQ_TYPES.LLMQ_TYPE_60_75, constants.LLMQ_TYPES.LLMQ_TYPE_TEST_V17, + constants.LLMQ_TYPES.LLMQ_TYPE_TEST_INSTANTSEND, + constants.LLMQ_TYPES.LLMQ_TYPE_TEST_DIP0024, ]; return llmqTypes; } @@ -395,9 +401,12 @@ SimplifiedMNList.prototype.getLLMQTypes = function getLLMQTypes() { llmqTypes = [ constants.LLMQ_TYPES.LLMQ_TYPE_LLMQ_DEVNET, constants.LLMQ_TYPES.LLMQ_TYPE_50_60, + constants.LLMQ_TYPES.LLMQ_TYPE_60_75, constants.LLMQ_TYPES.LLMQ_TYPE_400_60, constants.LLMQ_TYPES.LLMQ_TYPE_400_85, constants.LLMQ_TYPES.LLMQ_TYPE_TEST_V17, + constants.LLMQ_TYPES.LLMQ_TYPE_TEST_INSTANTSEND, + constants.LLMQ_TYPES.LLMQ_TYPE_TEST_DIP0024, ]; return llmqTypes; default: