@xyo-network/chain-sdk 5.0.3 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.d.ts +1 -0
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.mjs +1 -0
- package/dist/browser/index.mjs.map +2 -2
- package/dist/browser/modules/analyze/ChainHeadSelector.d.ts +40 -0
- package/dist/browser/modules/analyze/ChainHeadSelector.d.ts.map +1 -1
- package/dist/browser/modules/analyze/admission.d.ts +65 -0
- package/dist/browser/modules/analyze/admission.d.ts.map +1 -0
- package/dist/browser/modules/analyze/index.d.ts +1 -0
- package/dist/browser/modules/analyze/index.d.ts.map +1 -1
- package/dist/browser/modules/protocol/block/BuildBlockOptions.d.ts +8 -0
- package/dist/browser/modules/protocol/block/BuildBlockOptions.d.ts.map +1 -1
- package/dist/browser/modules/protocol/block/buildBlock.d.ts.map +1 -1
- package/dist/browser/modules/protocol/block/buildNextBlock.d.ts +2 -1
- package/dist/browser/modules/protocol/block/buildNextBlock.d.ts.map +1 -1
- package/dist/browser/modules/services/implementation/processPendingBlocks.d.ts +9 -1
- package/dist/browser/modules/services/implementation/processPendingBlocks.d.ts.map +1 -1
- package/dist/browser/modules/services/simple/block/runner/SimpleBlockRunner.d.ts +34 -1
- package/dist/browser/modules/services/simple/block/runner/SimpleBlockRunner.d.ts.map +1 -1
- package/dist/browser/modules/services/simple/block/runner/index.d.ts +1 -0
- package/dist/browser/modules/services/simple/block/runner/index.d.ts.map +1 -1
- package/dist/browser/modules/services/simple/block/runner/selectSupersededCandidate.d.ts +22 -0
- package/dist/browser/modules/services/simple/block/runner/selectSupersededCandidate.d.ts.map +1 -0
- package/dist/browser/modules/slashing/detect/DetectedOffense.d.ts +27 -0
- package/dist/browser/modules/slashing/detect/DetectedOffense.d.ts.map +1 -0
- package/dist/browser/modules/slashing/detect/candidatePairs.d.ts +44 -0
- package/dist/browser/modules/slashing/detect/candidatePairs.d.ts.map +1 -0
- package/dist/browser/modules/slashing/detect/index.d.ts +5 -0
- package/dist/browser/modules/slashing/detect/index.d.ts.map +1 -0
- package/dist/browser/modules/slashing/detect/offenseGate.d.ts +18 -0
- package/dist/browser/modules/slashing/detect/offenseGate.d.ts.map +1 -0
- package/dist/browser/modules/slashing/detect/suppression.d.ts +23 -0
- package/dist/browser/modules/slashing/detect/suppression.d.ts.map +1 -0
- package/dist/browser/modules/slashing/eligibility/evaluateProducerEligibility.d.ts +71 -0
- package/dist/browser/modules/slashing/eligibility/evaluateProducerEligibility.d.ts.map +1 -0
- package/dist/browser/modules/slashing/eligibility/index.d.ts +2 -0
- package/dist/browser/modules/slashing/eligibility/index.d.ts.map +1 -0
- package/dist/browser/modules/slashing/index/SlashIndexStore.d.ts +22 -0
- package/dist/browser/modules/slashing/index/SlashIndexStore.d.ts.map +1 -0
- package/dist/browser/modules/slashing/index/foldSlashIndex.d.ts +56 -0
- package/dist/browser/modules/slashing/index/foldSlashIndex.d.ts.map +1 -0
- package/dist/browser/modules/slashing/index/index.d.ts +3 -0
- package/dist/browser/modules/slashing/index/index.d.ts.map +1 -0
- package/dist/browser/modules/slashing/index.d.ts +6 -0
- package/dist/browser/modules/slashing/index.d.ts.map +1 -0
- package/dist/browser/modules/slashing/model/OffenseProcedure.d.ts +28 -0
- package/dist/browser/modules/slashing/model/OffenseProcedure.d.ts.map +1 -0
- package/dist/browser/modules/slashing/model/OffenseVerificationContext.d.ts +88 -0
- package/dist/browser/modules/slashing/model/OffenseVerificationContext.d.ts.map +1 -0
- package/dist/browser/modules/slashing/model/SlashHistoryReader.d.ts +34 -0
- package/dist/browser/modules/slashing/model/SlashHistoryReader.d.ts.map +1 -0
- package/dist/browser/modules/slashing/model/VerificationOutcome.d.ts +39 -0
- package/dist/browser/modules/slashing/model/VerificationOutcome.d.ts.map +1 -0
- package/dist/browser/modules/slashing/model/index.d.ts +6 -0
- package/dist/browser/modules/slashing/model/index.d.ts.map +1 -0
- package/dist/browser/modules/slashing/model/offenseKey.d.ts +42 -0
- package/dist/browser/modules/slashing/model/offenseKey.d.ts.map +1 -0
- package/dist/browser/modules/slashing/verify/index.d.ts +10 -0
- package/dist/browser/modules/slashing/verify/index.d.ts.map +1 -0
- package/dist/browser/modules/slashing/verify/preamble.d.ts +63 -0
- package/dist/browser/modules/slashing/verify/preamble.d.ts.map +1 -0
- package/dist/browser/modules/slashing/verify/verifyEquivocation.d.ts +19 -0
- package/dist/browser/modules/slashing/verify/verifyEquivocation.d.ts.map +1 -0
- package/dist/browser/modules/slashing/verify/verifyFalseAnchor.d.ts +15 -0
- package/dist/browser/modules/slashing/verify/verifyFalseAnchor.d.ts.map +1 -0
- package/dist/browser/modules/slashing/verify/verifyFalseAttestation.d.ts +22 -0
- package/dist/browser/modules/slashing/verify/verifyFalseAttestation.d.ts.map +1 -0
- package/dist/browser/modules/slashing/verify/verifyIneligibleProduction.d.ts +18 -0
- package/dist/browser/modules/slashing/verify/verifyIneligibleProduction.d.ts.map +1 -0
- package/dist/browser/modules/slashing/verify/verifyInvalidBlock.d.ts +18 -0
- package/dist/browser/modules/slashing/verify/verifyInvalidBlock.d.ts.map +1 -0
- package/dist/browser/modules/slashing/verify/verifyInvalidSlashRequest.d.ts +11 -0
- package/dist/browser/modules/slashing/verify/verifyInvalidSlashRequest.d.ts.map +1 -0
- package/dist/browser/modules/slashing/verify/verifyOffense.d.ts +29 -0
- package/dist/browser/modules/slashing/verify/verifyOffense.d.ts.map +1 -0
- package/dist/browser/modules/slashing/verify/verifyRewardOvermint.d.ts +23 -0
- package/dist/browser/modules/slashing/verify/verifyRewardOvermint.d.ts.map +1 -0
- package/dist/browser/modules/validation/elevatedPayload/lib/findElevatingTransaction.d.ts +14 -0
- package/dist/browser/modules/validation/elevatedPayload/lib/findElevatingTransaction.d.ts.map +1 -0
- package/dist/browser/modules/validation/elevatedPayload/lib/index.d.ts +2 -0
- package/dist/browser/modules/validation/elevatedPayload/lib/index.d.ts.map +1 -1
- package/dist/browser/modules/validation/elevatedPayload/lib/validateSlashPayloadInBlock.d.ts +33 -0
- package/dist/browser/modules/validation/elevatedPayload/lib/validateSlashPayloadInBlock.d.ts.map +1 -0
- package/dist/browser/modules/validation/elevatedPayload/payloads/index.d.ts +5 -0
- package/dist/browser/modules/validation/elevatedPayload/payloads/index.d.ts.map +1 -1
- package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashAdjudicationInBlock.d.ts +14 -0
- package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashAdjudicationInBlock.d.ts.map +1 -0
- package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashChallengeInBlock.d.ts +10 -0
- package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashChallengeInBlock.d.ts.map +1 -0
- package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashCommitInBlock.d.ts +10 -0
- package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashCommitInBlock.d.ts.map +1 -0
- package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashEvidenceInBlock.d.ts +10 -0
- package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashEvidenceInBlock.d.ts.map +1 -0
- package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashRequestInBlock.d.ts +14 -0
- package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashRequestInBlock.d.ts.map +1 -0
- package/dist/browser/modules/validation/elevatedPayload/validatePayloadInBlock.d.ts.map +1 -1
- package/dist/browser/slashing.d.ts +2 -0
- package/dist/browser/slashing.d.ts.map +1 -0
- package/dist/neutral/analyze.mjs +85 -3
- package/dist/neutral/analyze.mjs.map +3 -3
- package/dist/neutral/index.d.ts +1 -0
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +1 -0
- package/dist/neutral/index.mjs.map +2 -2
- package/dist/neutral/modules/analyze/ChainHeadSelector.d.ts +40 -0
- package/dist/neutral/modules/analyze/ChainHeadSelector.d.ts.map +1 -1
- package/dist/neutral/modules/analyze/admission.d.ts +65 -0
- package/dist/neutral/modules/analyze/admission.d.ts.map +1 -0
- package/dist/neutral/modules/analyze/index.d.ts +1 -0
- package/dist/neutral/modules/analyze/index.d.ts.map +1 -1
- package/dist/neutral/modules/protocol/block/BuildBlockOptions.d.ts +8 -0
- package/dist/neutral/modules/protocol/block/BuildBlockOptions.d.ts.map +1 -1
- package/dist/neutral/modules/protocol/block/buildBlock.d.ts.map +1 -1
- package/dist/neutral/modules/protocol/block/buildNextBlock.d.ts +2 -1
- package/dist/neutral/modules/protocol/block/buildNextBlock.d.ts.map +1 -1
- package/dist/neutral/modules/services/implementation/processPendingBlocks.d.ts +9 -1
- package/dist/neutral/modules/services/implementation/processPendingBlocks.d.ts.map +1 -1
- package/dist/neutral/modules/services/simple/block/runner/SimpleBlockRunner.d.ts +34 -1
- package/dist/neutral/modules/services/simple/block/runner/SimpleBlockRunner.d.ts.map +1 -1
- package/dist/neutral/modules/services/simple/block/runner/index.d.ts +1 -0
- package/dist/neutral/modules/services/simple/block/runner/index.d.ts.map +1 -1
- package/dist/neutral/modules/services/simple/block/runner/selectSupersededCandidate.d.ts +22 -0
- package/dist/neutral/modules/services/simple/block/runner/selectSupersededCandidate.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/detect/DetectedOffense.d.ts +27 -0
- package/dist/neutral/modules/slashing/detect/DetectedOffense.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/detect/candidatePairs.d.ts +44 -0
- package/dist/neutral/modules/slashing/detect/candidatePairs.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/detect/index.d.ts +5 -0
- package/dist/neutral/modules/slashing/detect/index.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/detect/offenseGate.d.ts +18 -0
- package/dist/neutral/modules/slashing/detect/offenseGate.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/detect/suppression.d.ts +23 -0
- package/dist/neutral/modules/slashing/detect/suppression.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/eligibility/evaluateProducerEligibility.d.ts +71 -0
- package/dist/neutral/modules/slashing/eligibility/evaluateProducerEligibility.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/eligibility/index.d.ts +2 -0
- package/dist/neutral/modules/slashing/eligibility/index.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/index/SlashIndexStore.d.ts +22 -0
- package/dist/neutral/modules/slashing/index/SlashIndexStore.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/index/foldSlashIndex.d.ts +56 -0
- package/dist/neutral/modules/slashing/index/foldSlashIndex.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/index/index.d.ts +3 -0
- package/dist/neutral/modules/slashing/index/index.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/index.d.ts +6 -0
- package/dist/neutral/modules/slashing/index.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/model/OffenseProcedure.d.ts +28 -0
- package/dist/neutral/modules/slashing/model/OffenseProcedure.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/model/OffenseVerificationContext.d.ts +88 -0
- package/dist/neutral/modules/slashing/model/OffenseVerificationContext.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/model/SlashHistoryReader.d.ts +34 -0
- package/dist/neutral/modules/slashing/model/SlashHistoryReader.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/model/VerificationOutcome.d.ts +39 -0
- package/dist/neutral/modules/slashing/model/VerificationOutcome.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/model/index.d.ts +6 -0
- package/dist/neutral/modules/slashing/model/index.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/model/offenseKey.d.ts +42 -0
- package/dist/neutral/modules/slashing/model/offenseKey.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/verify/index.d.ts +10 -0
- package/dist/neutral/modules/slashing/verify/index.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/verify/preamble.d.ts +63 -0
- package/dist/neutral/modules/slashing/verify/preamble.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/verify/verifyEquivocation.d.ts +19 -0
- package/dist/neutral/modules/slashing/verify/verifyEquivocation.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/verify/verifyFalseAnchor.d.ts +15 -0
- package/dist/neutral/modules/slashing/verify/verifyFalseAnchor.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/verify/verifyFalseAttestation.d.ts +22 -0
- package/dist/neutral/modules/slashing/verify/verifyFalseAttestation.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/verify/verifyIneligibleProduction.d.ts +18 -0
- package/dist/neutral/modules/slashing/verify/verifyIneligibleProduction.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/verify/verifyInvalidBlock.d.ts +18 -0
- package/dist/neutral/modules/slashing/verify/verifyInvalidBlock.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/verify/verifyInvalidSlashRequest.d.ts +11 -0
- package/dist/neutral/modules/slashing/verify/verifyInvalidSlashRequest.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/verify/verifyOffense.d.ts +29 -0
- package/dist/neutral/modules/slashing/verify/verifyOffense.d.ts.map +1 -0
- package/dist/neutral/modules/slashing/verify/verifyRewardOvermint.d.ts +23 -0
- package/dist/neutral/modules/slashing/verify/verifyRewardOvermint.d.ts.map +1 -0
- package/dist/neutral/modules/validation/elevatedPayload/lib/findElevatingTransaction.d.ts +14 -0
- package/dist/neutral/modules/validation/elevatedPayload/lib/findElevatingTransaction.d.ts.map +1 -0
- package/dist/neutral/modules/validation/elevatedPayload/lib/index.d.ts +2 -0
- package/dist/neutral/modules/validation/elevatedPayload/lib/index.d.ts.map +1 -1
- package/dist/neutral/modules/validation/elevatedPayload/lib/validateSlashPayloadInBlock.d.ts +33 -0
- package/dist/neutral/modules/validation/elevatedPayload/lib/validateSlashPayloadInBlock.d.ts.map +1 -0
- package/dist/neutral/modules/validation/elevatedPayload/payloads/index.d.ts +5 -0
- package/dist/neutral/modules/validation/elevatedPayload/payloads/index.d.ts.map +1 -1
- package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashAdjudicationInBlock.d.ts +14 -0
- package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashAdjudicationInBlock.d.ts.map +1 -0
- package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashChallengeInBlock.d.ts +10 -0
- package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashChallengeInBlock.d.ts.map +1 -0
- package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashCommitInBlock.d.ts +10 -0
- package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashCommitInBlock.d.ts.map +1 -0
- package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashEvidenceInBlock.d.ts +10 -0
- package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashEvidenceInBlock.d.ts.map +1 -0
- package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashRequestInBlock.d.ts +14 -0
- package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashRequestInBlock.d.ts.map +1 -0
- package/dist/neutral/modules/validation/elevatedPayload/validatePayloadInBlock.d.ts.map +1 -1
- package/dist/neutral/protocol.mjs +8 -3
- package/dist/neutral/protocol.mjs.map +2 -2
- package/dist/neutral/services.mjs +77 -7
- package/dist/neutral/services.mjs.map +4 -4
- package/dist/neutral/slashing.d.ts +2 -0
- package/dist/neutral/slashing.d.ts.map +1 -0
- package/dist/neutral/slashing.mjs +824 -0
- package/dist/neutral/slashing.mjs.map +7 -0
- package/dist/neutral/validation.mjs +274 -43
- package/dist/neutral/validation.mjs.map +4 -4
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.mjs +1 -0
- package/dist/node/index.mjs.map +2 -2
- package/dist/node/modules/analyze/ChainHeadSelector.d.ts +40 -0
- package/dist/node/modules/analyze/ChainHeadSelector.d.ts.map +1 -1
- package/dist/node/modules/analyze/admission.d.ts +65 -0
- package/dist/node/modules/analyze/admission.d.ts.map +1 -0
- package/dist/node/modules/analyze/index.d.ts +1 -0
- package/dist/node/modules/analyze/index.d.ts.map +1 -1
- package/dist/node/modules/protocol/block/BuildBlockOptions.d.ts +8 -0
- package/dist/node/modules/protocol/block/BuildBlockOptions.d.ts.map +1 -1
- package/dist/node/modules/protocol/block/buildBlock.d.ts.map +1 -1
- package/dist/node/modules/protocol/block/buildNextBlock.d.ts +2 -1
- package/dist/node/modules/protocol/block/buildNextBlock.d.ts.map +1 -1
- package/dist/node/modules/services/implementation/processPendingBlocks.d.ts +9 -1
- package/dist/node/modules/services/implementation/processPendingBlocks.d.ts.map +1 -1
- package/dist/node/modules/services/simple/block/runner/SimpleBlockRunner.d.ts +34 -1
- package/dist/node/modules/services/simple/block/runner/SimpleBlockRunner.d.ts.map +1 -1
- package/dist/node/modules/services/simple/block/runner/index.d.ts +1 -0
- package/dist/node/modules/services/simple/block/runner/index.d.ts.map +1 -1
- package/dist/node/modules/services/simple/block/runner/selectSupersededCandidate.d.ts +22 -0
- package/dist/node/modules/services/simple/block/runner/selectSupersededCandidate.d.ts.map +1 -0
- package/dist/node/modules/slashing/detect/DetectedOffense.d.ts +27 -0
- package/dist/node/modules/slashing/detect/DetectedOffense.d.ts.map +1 -0
- package/dist/node/modules/slashing/detect/candidatePairs.d.ts +44 -0
- package/dist/node/modules/slashing/detect/candidatePairs.d.ts.map +1 -0
- package/dist/node/modules/slashing/detect/index.d.ts +5 -0
- package/dist/node/modules/slashing/detect/index.d.ts.map +1 -0
- package/dist/node/modules/slashing/detect/offenseGate.d.ts +18 -0
- package/dist/node/modules/slashing/detect/offenseGate.d.ts.map +1 -0
- package/dist/node/modules/slashing/detect/suppression.d.ts +23 -0
- package/dist/node/modules/slashing/detect/suppression.d.ts.map +1 -0
- package/dist/node/modules/slashing/eligibility/evaluateProducerEligibility.d.ts +71 -0
- package/dist/node/modules/slashing/eligibility/evaluateProducerEligibility.d.ts.map +1 -0
- package/dist/node/modules/slashing/eligibility/index.d.ts +2 -0
- package/dist/node/modules/slashing/eligibility/index.d.ts.map +1 -0
- package/dist/node/modules/slashing/index/SlashIndexStore.d.ts +22 -0
- package/dist/node/modules/slashing/index/SlashIndexStore.d.ts.map +1 -0
- package/dist/node/modules/slashing/index/foldSlashIndex.d.ts +56 -0
- package/dist/node/modules/slashing/index/foldSlashIndex.d.ts.map +1 -0
- package/dist/node/modules/slashing/index/index.d.ts +3 -0
- package/dist/node/modules/slashing/index/index.d.ts.map +1 -0
- package/dist/node/modules/slashing/index.d.ts +6 -0
- package/dist/node/modules/slashing/index.d.ts.map +1 -0
- package/dist/node/modules/slashing/model/OffenseProcedure.d.ts +28 -0
- package/dist/node/modules/slashing/model/OffenseProcedure.d.ts.map +1 -0
- package/dist/node/modules/slashing/model/OffenseVerificationContext.d.ts +88 -0
- package/dist/node/modules/slashing/model/OffenseVerificationContext.d.ts.map +1 -0
- package/dist/node/modules/slashing/model/SlashHistoryReader.d.ts +34 -0
- package/dist/node/modules/slashing/model/SlashHistoryReader.d.ts.map +1 -0
- package/dist/node/modules/slashing/model/VerificationOutcome.d.ts +39 -0
- package/dist/node/modules/slashing/model/VerificationOutcome.d.ts.map +1 -0
- package/dist/node/modules/slashing/model/index.d.ts +6 -0
- package/dist/node/modules/slashing/model/index.d.ts.map +1 -0
- package/dist/node/modules/slashing/model/offenseKey.d.ts +42 -0
- package/dist/node/modules/slashing/model/offenseKey.d.ts.map +1 -0
- package/dist/node/modules/slashing/verify/index.d.ts +10 -0
- package/dist/node/modules/slashing/verify/index.d.ts.map +1 -0
- package/dist/node/modules/slashing/verify/preamble.d.ts +63 -0
- package/dist/node/modules/slashing/verify/preamble.d.ts.map +1 -0
- package/dist/node/modules/slashing/verify/verifyEquivocation.d.ts +19 -0
- package/dist/node/modules/slashing/verify/verifyEquivocation.d.ts.map +1 -0
- package/dist/node/modules/slashing/verify/verifyFalseAnchor.d.ts +15 -0
- package/dist/node/modules/slashing/verify/verifyFalseAnchor.d.ts.map +1 -0
- package/dist/node/modules/slashing/verify/verifyFalseAttestation.d.ts +22 -0
- package/dist/node/modules/slashing/verify/verifyFalseAttestation.d.ts.map +1 -0
- package/dist/node/modules/slashing/verify/verifyIneligibleProduction.d.ts +18 -0
- package/dist/node/modules/slashing/verify/verifyIneligibleProduction.d.ts.map +1 -0
- package/dist/node/modules/slashing/verify/verifyInvalidBlock.d.ts +18 -0
- package/dist/node/modules/slashing/verify/verifyInvalidBlock.d.ts.map +1 -0
- package/dist/node/modules/slashing/verify/verifyInvalidSlashRequest.d.ts +11 -0
- package/dist/node/modules/slashing/verify/verifyInvalidSlashRequest.d.ts.map +1 -0
- package/dist/node/modules/slashing/verify/verifyOffense.d.ts +29 -0
- package/dist/node/modules/slashing/verify/verifyOffense.d.ts.map +1 -0
- package/dist/node/modules/slashing/verify/verifyRewardOvermint.d.ts +23 -0
- package/dist/node/modules/slashing/verify/verifyRewardOvermint.d.ts.map +1 -0
- package/dist/node/modules/validation/elevatedPayload/lib/findElevatingTransaction.d.ts +14 -0
- package/dist/node/modules/validation/elevatedPayload/lib/findElevatingTransaction.d.ts.map +1 -0
- package/dist/node/modules/validation/elevatedPayload/lib/index.d.ts +2 -0
- package/dist/node/modules/validation/elevatedPayload/lib/index.d.ts.map +1 -1
- package/dist/node/modules/validation/elevatedPayload/lib/validateSlashPayloadInBlock.d.ts +33 -0
- package/dist/node/modules/validation/elevatedPayload/lib/validateSlashPayloadInBlock.d.ts.map +1 -0
- package/dist/node/modules/validation/elevatedPayload/payloads/index.d.ts +5 -0
- package/dist/node/modules/validation/elevatedPayload/payloads/index.d.ts.map +1 -1
- package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashAdjudicationInBlock.d.ts +14 -0
- package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashAdjudicationInBlock.d.ts.map +1 -0
- package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashChallengeInBlock.d.ts +10 -0
- package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashChallengeInBlock.d.ts.map +1 -0
- package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashCommitInBlock.d.ts +10 -0
- package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashCommitInBlock.d.ts.map +1 -0
- package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashEvidenceInBlock.d.ts +10 -0
- package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashEvidenceInBlock.d.ts.map +1 -0
- package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashRequestInBlock.d.ts +14 -0
- package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashRequestInBlock.d.ts.map +1 -0
- package/dist/node/modules/validation/elevatedPayload/validatePayloadInBlock.d.ts.map +1 -1
- package/dist/node/slashing.d.ts +2 -0
- package/dist/node/slashing.d.ts.map +1 -0
- package/package.json +14 -8
package/dist/browser/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './modules/ethereum/index.js';
|
|
|
3
3
|
export * from './modules/modules/index.js';
|
|
4
4
|
export * from './modules/protocol/index.js';
|
|
5
5
|
export * from './modules/services/index.js';
|
|
6
|
+
export * from './modules/slashing/index.js';
|
|
6
7
|
export * from './modules/telemetry/index.js';
|
|
7
8
|
export * from './modules/utils/index.js';
|
|
8
9
|
export * from './modules/validation/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA"}
|
package/dist/browser/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["// Generated by xy monolith layout sync (package-sync-layout) \u2014 do not edit by hand.\n/* eslint-disable @typescript-eslint/ban-ts-comment -- conditional package imports */\n// @ts-nocheck\nexport * from '#analyze'\nexport * from '#ethereum'\nexport * from '#modules'\nexport * from '#protocol'\nexport * from '#services'\nexport * from '#telemetry'\nexport * from '#utils'\nexport * from '#validation'\nexport * from '#wrappers'\n"],
|
|
5
|
-
"mappings": ";AAGA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
4
|
+
"sourcesContent": ["// Generated by xy monolith layout sync (package-sync-layout) \u2014 do not edit by hand.\n/* eslint-disable @typescript-eslint/ban-ts-comment -- conditional package imports */\n// @ts-nocheck\nexport * from '#analyze'\nexport * from '#ethereum'\nexport * from '#modules'\nexport * from '#protocol'\nexport * from '#services'\nexport * from '#slashing'\nexport * from '#telemetry'\nexport * from '#utils'\nexport * from '#validation'\nexport * from '#wrappers'\n"],
|
|
5
|
+
"mappings": ";AAGA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import type { Address } from '@ariestools/sdk';
|
|
2
2
|
import type { BaseContext, MempoolViewer, SignedHydratedBlockWithHashMeta } from '@xyo-network/xl1-sdk';
|
|
3
|
+
import type { AdmissionAssessment, AdmissionMode, AdmissionShadowReport, ProducerEligibilityEvaluator } from './admission.js';
|
|
3
4
|
import type { ChainFinalizerParams } from './ChainFinalizer.js';
|
|
4
5
|
import { ChainFinalizer } from './ChainFinalizer.js';
|
|
5
6
|
export interface ChainHeadSelectorParams extends ChainFinalizerParams {
|
|
7
|
+
/**
|
|
8
|
+
* How candidates are admitted. Defaults to `allowlist`, which is how the chain runs today.
|
|
9
|
+
*/
|
|
10
|
+
admission?: AdmissionMode;
|
|
6
11
|
/**
|
|
7
12
|
* List of allowed producer addresses, if undefined anyone can participate
|
|
8
13
|
*/
|
|
@@ -14,14 +19,22 @@ export interface ChainHeadSelectorParams extends ChainFinalizerParams {
|
|
|
14
19
|
*/
|
|
15
20
|
backoffMs?: number;
|
|
16
21
|
context: BaseContext;
|
|
22
|
+
/**
|
|
23
|
+
* Computes whether a candidate's producer had standing. Absent means the question is never
|
|
24
|
+
* asked, which is what keeps a node with no stake readers running exactly as it does today.
|
|
25
|
+
*/
|
|
26
|
+
eligibility?: ProducerEligibilityEvaluator;
|
|
17
27
|
mempoolViewer: MempoolViewer;
|
|
18
28
|
/**
|
|
19
29
|
* Minimum number of uncle candidates required before accepting one.
|
|
20
30
|
* When undefined, findBestUncle applies DEFAULT_MIN_CANDIDATES from the protocol SDK.
|
|
21
31
|
*/
|
|
22
32
|
minCandidates?: number;
|
|
33
|
+
/** Where to publish what the two gates concluded, in shadow posture. */
|
|
34
|
+
publishAdmissionShadow?: (report: AdmissionShadowReport) => Promise<void>;
|
|
23
35
|
}
|
|
24
36
|
export declare class ChainHeadSelector extends ChainFinalizer<ChainHeadSelectorParams> {
|
|
37
|
+
protected admission: AdmissionMode;
|
|
25
38
|
protected allowedProducers?: Address[];
|
|
26
39
|
protected backoffMs?: number;
|
|
27
40
|
protected minCandidates?: number;
|
|
@@ -37,5 +50,32 @@ export declare class ChainHeadSelector extends ChainFinalizer<ChainHeadSelectorP
|
|
|
37
50
|
};
|
|
38
51
|
protected get mempoolViewer(): MempoolViewer;
|
|
39
52
|
findBestHead(): Promise<SignedHydratedBlockWithHashMeta[]>;
|
|
53
|
+
/**
|
|
54
|
+
* Applies the configured admission posture.
|
|
55
|
+
*
|
|
56
|
+
* In `shadow` the allow-list still decides — participation is computed and published beside it,
|
|
57
|
+
* and changes nothing. That is the entire value of the posture: the network keeps behaving
|
|
58
|
+
* exactly as it did while everyone gets to see what the new rule would have done.
|
|
59
|
+
*
|
|
60
|
+
* In `enforce` participation gates, but only when it reached a conclusion. A candidate whose
|
|
61
|
+
* standing cannot be established is admitted, not rejected — otherwise a finalizer that lost
|
|
62
|
+
* its stake reader would quietly stop accepting anyone's blocks and stall the chain.
|
|
63
|
+
*
|
|
64
|
+
* Assessments publish in both postures. The audit trail must not disappear at the moment
|
|
65
|
+
* admission starts gating — enforce is when it matters most.
|
|
66
|
+
*/
|
|
67
|
+
protected admit(all: SignedHydratedBlockWithHashMeta[], allowed: SignedHydratedBlockWithHashMeta[]): Promise<SignedHydratedBlockWithHashMeta[]>;
|
|
68
|
+
/**
|
|
69
|
+
* Runs both gates over every candidate.
|
|
70
|
+
*
|
|
71
|
+
* An evaluator that throws yields an unresolvable assessment rather than an exception: this
|
|
72
|
+
* sits on the head-selection path, and a flaky stake reader must never be able to stop the
|
|
73
|
+
* chain from finalizing.
|
|
74
|
+
*/
|
|
75
|
+
protected assess(all: SignedHydratedBlockWithHashMeta[]): Promise<AdmissionAssessment[]>;
|
|
76
|
+
/** Whether the configured allow-list admits a candidate. An empty list admits everyone. */
|
|
77
|
+
protected isAllowed(candidate: SignedHydratedBlockWithHashMeta): boolean;
|
|
78
|
+
/** Publishes what the two gates concluded, swallowing failures. */
|
|
79
|
+
protected publishShadow(assessments: AdmissionAssessment[]): Promise<void>;
|
|
40
80
|
}
|
|
41
81
|
//# sourceMappingURL=ChainHeadSelector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainHeadSelector.d.ts","sourceRoot":"","sources":["../../../../src/modules/analyze/ChainHeadSelector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAI9C,OAAO,KAAK,EACV,WAAW,EAAE,aAAa,EAAE,+BAA+B,EAC5D,MAAM,sBAAsB,CAAA;AAK7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEpD,MAAM,WAAW,uBAAwB,SAAQ,oBAAoB;IACnE;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,EAAE,CAAA;IAC5B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,WAAW,CAAA;IACpB,aAAa,EAAE,aAAa,CAAA;IAC5B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"ChainHeadSelector.d.ts","sourceRoot":"","sources":["../../../../src/modules/analyze/ChainHeadSelector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAI9C,OAAO,KAAK,EACV,WAAW,EAAE,aAAa,EAAE,+BAA+B,EAC5D,MAAM,sBAAsB,CAAA;AAK7B,OAAO,KAAK,EACV,mBAAmB,EAAE,aAAa,EAAE,qBAAqB,EAAE,4BAA4B,EACxF,MAAM,gBAAgB,CAAA;AAEvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEpD,MAAM,WAAW,uBAAwB,SAAQ,oBAAoB;IACnE;;OAEG;IACH,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,EAAE,CAAA;IAC5B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,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type { SignedHydratedBlockWithHashMeta } from '@xyo-network/xl1-sdk';
|
|
4
|
+
import type { EligibilityEvaluation } from '../slashing/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* How a finalizer decides which candidates it will consider.
|
|
7
|
+
*
|
|
8
|
+
* Three postures, and moving between them is a configuration change rather than a different
|
|
9
|
+
* build. That constraint is deliberate: a network that had to be redeployed to step back from
|
|
10
|
+
* enforcement would, in the moment it most needed to step back, be unable to.
|
|
11
|
+
*
|
|
12
|
+
* - `allowlist` — only the named producers, which is how the chain runs today
|
|
13
|
+
* - `shadow` — the same gate, plus participation computed and published for every candidate
|
|
14
|
+
* - `enforce` — participation itself gates
|
|
15
|
+
*/
|
|
16
|
+
export declare const AdmissionModes: readonly ["allowlist", "shadow", "enforce"];
|
|
17
|
+
/** How a finalizer decides which candidates it will consider. */
|
|
18
|
+
export type AdmissionMode = typeof AdmissionModes[number];
|
|
19
|
+
/** Evaluates whether a candidate's producer had standing to produce it. */
|
|
20
|
+
export type ProducerEligibilityEvaluator = (candidate: SignedHydratedBlockWithHashMeta) => Promisable<EligibilityEvaluation>;
|
|
21
|
+
/** What both gates concluded about one candidate. */
|
|
22
|
+
export interface AdmissionAssessment {
|
|
23
|
+
/** Whether the allow-list admits it. */
|
|
24
|
+
admittedByAllowList: boolean;
|
|
25
|
+
/** The candidate's height. */
|
|
26
|
+
block: number;
|
|
27
|
+
/** The candidate's signed identity. */
|
|
28
|
+
dataHash: string;
|
|
29
|
+
/** What the participation predicate concluded. */
|
|
30
|
+
eligibility: EligibilityEvaluation;
|
|
31
|
+
/** The producer. */
|
|
32
|
+
producer: XyoAddress;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* What the two gates said about a round of candidates, and where they disagreed.
|
|
36
|
+
*
|
|
37
|
+
* Published rather than logged, because the whole purpose of the shadow posture is that anyone —
|
|
38
|
+
* not just the operator holding the terminal — can see what enforcement would have done before it
|
|
39
|
+
* does it. An operator convinced by their own logs has convinced nobody.
|
|
40
|
+
*/
|
|
41
|
+
export interface AdmissionShadowReport {
|
|
42
|
+
/** Every candidate considered this round. */
|
|
43
|
+
assessments: AdmissionAssessment[];
|
|
44
|
+
/** Only those where the two gates disagreed. */
|
|
45
|
+
divergent: AdmissionAssessment[];
|
|
46
|
+
/** The finalized height this round was selected against. */
|
|
47
|
+
head: number;
|
|
48
|
+
}
|
|
49
|
+
/** Moniker the admission shadow publisher resolves under. */
|
|
50
|
+
export declare const AdmissionShadowPublishRunnerMoniker = "AdmissionShadowPublishRunner";
|
|
51
|
+
/**
|
|
52
|
+
* Publishes what both admission gates concluded.
|
|
53
|
+
*
|
|
54
|
+
* An interface rather than a class here because the finalizer must not depend on the launcher
|
|
55
|
+
* that supplies the implementation — the actor states what it needs, and orchestration decides
|
|
56
|
+
* what satisfies it.
|
|
57
|
+
*/
|
|
58
|
+
export interface AdmissionShadowPublishRunner {
|
|
59
|
+
publish(report: AdmissionShadowReport): Promisable<void>;
|
|
60
|
+
}
|
|
61
|
+
/** Whether a resolved provider can actually publish shadow reports. */
|
|
62
|
+
export declare function isAdmissionShadowPublishRunner(value: unknown): value is AdmissionShadowPublishRunner;
|
|
63
|
+
/** Whether the two gates reached different conclusions about a candidate. */
|
|
64
|
+
export declare function isDivergent(assessment: AdmissionAssessment): boolean;
|
|
65
|
+
//# sourceMappingURL=admission.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admission.d.ts","sourceRoot":"","sources":["../../../../src/modules/analyze/admission.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sBAAsB,CAAA;AAE3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAEtD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,6CAA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C,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,6BAA6B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/analyze/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,6BAA6B,CAAA"}
|
|
@@ -20,6 +20,14 @@ export interface BuildNextBlockOptions extends BaseBuildBlockOptions {
|
|
|
20
20
|
previousBlockNumber: XL1BlockNumber;
|
|
21
21
|
previousStepHashes: Hash[];
|
|
22
22
|
stepRewardPoolBalance: AttoXL1;
|
|
23
|
+
/**
|
|
24
|
+
* Hash of this producer's own earlier candidate at the same height and parent, when re-proposing.
|
|
25
|
+
*
|
|
26
|
+
* Signed, so it cannot be added or dropped after the fact. Its whole job is to make honest
|
|
27
|
+
* re-proposal distinguishable from equivocation: two differing candidates at one height are
|
|
28
|
+
* indistinguishable from outside unless the later one says which one it replaces.
|
|
29
|
+
*/
|
|
30
|
+
supersedes?: Hash;
|
|
23
31
|
}
|
|
24
32
|
export declare const isBuildNextBlockOptions: (value: unknown) => value is BuildNextBlockOptions;
|
|
25
33
|
export type BuildBlockOptions = BuildGenesisBlockOptions | BuildNextBlockOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuildBlockOptions.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol/block/BuildBlockOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAKpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EACV,mBAAmB,EAAE,OAAO,EAAE,OAAO,EAAE,yBAAyB,EAChE,cAAc,EACf,MAAM,sBAAsB,CAAA;AAE7B,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,mBAAmB,EAAE,CAAA;IACpC,OAAO,EAAE,OAAO,CAAA;IAChB,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,mBAAmB,CAAC,EAAE,cAAc,CAAA;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,eAAe,EAAE,CAAA;IAC1B,GAAG,EAAE,yBAAyB,EAAE,CAAA;CACjC;AAED,eAAO,MAAM,uBAAuB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,qBASjE,CAAA;AAED,MAAM,WAAW,wBAAyB,SAAQ,qBAAqB;IACrE,iBAAiB,EAAE,IAAI,CAAA;CACxB;AAED,eAAO,MAAM,0BAA0B,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,wBAYpE,CAAA;AAED,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAClE,iBAAiB,EAAE,IAAI,CAAA;IACvB,mBAAmB,EAAE,cAAc,CAAA;IACnC,kBAAkB,EAAE,IAAI,EAAE,CAAA;IAC1B,qBAAqB,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"BuildBlockOptions.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol/block/BuildBlockOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAKpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EACV,mBAAmB,EAAE,OAAO,EAAE,OAAO,EAAE,yBAAyB,EAChE,cAAc,EACf,MAAM,sBAAsB,CAAA;AAE7B,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,mBAAmB,EAAE,CAAA;IACpC,OAAO,EAAE,OAAO,CAAA;IAChB,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,mBAAmB,CAAC,EAAE,cAAc,CAAA;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,eAAe,EAAE,CAAA;IAC1B,GAAG,EAAE,yBAAyB,EAAE,CAAA;CACjC;AAED,eAAO,MAAM,uBAAuB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,qBASjE,CAAA;AAED,MAAM,WAAW,wBAAyB,SAAQ,qBAAqB;IACrE,iBAAiB,EAAE,IAAI,CAAA;CACxB;AAED,eAAO,MAAM,0BAA0B,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,wBAYpE,CAAA;AAED,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAClE,iBAAiB,EAAE,IAAI,CAAA;IACvB,mBAAmB,EAAE,cAAc,CAAA;IACnC,kBAAkB,EAAE,IAAI,EAAE,CAAA;IAC1B,qBAAqB,EAAE,OAAO,CAAA;IAC9B;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,IAAI,CAAA;CAClB;AAED,eAAO,MAAM,uBAAuB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,qBAejE,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,wBAAwB,GAAG,qBAAqB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildBlock.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol/block/buildBlock.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACS,+BAA+B,EACnD,MAAM,sBAAsB,CAAA;AAY7B,OAAO,EACL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"buildBlock.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol/block/buildBlock.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACS,+BAA+B,EACnD,MAAM,sBAAsB,CAAA;AAY7B,OAAO,EACL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAA;AA6B/B,wBAAsB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAsErG"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Hash } from '@ariestools/sdk';
|
|
1
2
|
import type { AccountInstance, WithHashMeta } from '@xyo-network/sdk';
|
|
2
3
|
import type { AllowedBlockPayload, BlockBoundWitness, ChainId, SignedHydratedBlockWithHashMeta, SignedHydratedTransaction } from '@xyo-network/xl1-sdk';
|
|
3
4
|
import { AttoXL1 } from '@xyo-network/xl1-sdk';
|
|
@@ -5,5 +6,5 @@ export declare function buildNextBlock(previousBlock: WithHashMeta<BlockBoundWit
|
|
|
5
6
|
readonly __hex: true;
|
|
6
7
|
} & {
|
|
7
8
|
readonly __address: true;
|
|
8
|
-
}, stepRewardPoolBalance?: AttoXL1, protocol?: number, chainId?: ChainId): Promise<SignedHydratedBlockWithHashMeta>;
|
|
9
|
+
}, stepRewardPoolBalance?: AttoXL1, protocol?: number, chainId?: ChainId, supersedes?: Hash): Promise<SignedHydratedBlockWithHashMeta>;
|
|
9
10
|
//# sourceMappingURL=buildNextBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildNextBlock.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol/block/buildNextBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,KAAK,EACV,mBAAmB,EAAE,iBAAiB,EACtC,OAAO,EACP,+BAA+B,EAC/B,yBAAyB,EAC1B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACL,OAAO,EAER,MAAM,sBAAsB,CAAA;AAI7B,wBAAsB,cAAc,CAClC,aAAa,EAAE,YAAY,CAAC,iBAAiB,CAAC,EAC9C,GAAG,EAAE,yBAAyB,EAAE,EAChC,aAAa,EAAE,mBAAmB,EAAE,EACpC,OAAO,EAAE,eAAe,EAAE,EAC1B,sBAAsB;;;;CAA0B,EAChD,qBAAqB,GAAE,OAAqB,EAC5C,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,+BAA+B,CAAC,
|
|
1
|
+
{"version":3,"file":"buildNextBlock.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol/block/buildNextBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,KAAK,EACV,mBAAmB,EAAE,iBAAiB,EACtC,OAAO,EACP,+BAA+B,EAC/B,yBAAyB,EAC1B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACL,OAAO,EAER,MAAM,sBAAsB,CAAA;AAI7B,wBAAsB,cAAc,CAClC,aAAa,EAAE,YAAY,CAAC,iBAAiB,CAAC,EAC9C,GAAG,EAAE,yBAAyB,EAAE,EAChC,aAAa,EAAE,mBAAmB,EAAE,EACpC,OAAO,EAAE,eAAe,EAAE,EAC1B,sBAAsB;;;;CAA0B,EAChD,qBAAqB,GAAE,OAAqB,EAC5C,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,OAAO,EACjB,UAAU,CAAC,EAAE,IAAI,GAChB,OAAO,CAAC,+BAA+B,CAAC,CAc1C"}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import type { Address, Logger } from '@ariestools/sdk';
|
|
2
2
|
import type { AccountInstance } from '@xyo-network/sdk';
|
|
3
3
|
import type { BaseContext, BlockValidationViewer, BlockViewer, DeadLetterQueueRunner, FinalizationRunner, MempoolViewer } from '@xyo-network/xl1-sdk';
|
|
4
|
+
import type { AdmissionMode, AdmissionShadowReport, ProducerEligibilityEvaluator } from '../../analyze/index.js';
|
|
4
5
|
interface ProcessPendingBlocksParams {
|
|
6
|
+
/** How candidates are admitted; defaults to the allow-list the chain runs on today. */
|
|
7
|
+
admission?: AdmissionMode;
|
|
5
8
|
allowedProducers?: Address[];
|
|
6
9
|
backoffMs?: number;
|
|
7
10
|
blockValidationViewer: BlockValidationViewer;
|
|
8
11
|
blockViewer: BlockViewer;
|
|
9
12
|
context: BaseContext;
|
|
10
13
|
deadLetterQueueRunner?: DeadLetterQueueRunner;
|
|
14
|
+
/** Computes producer standing, for the shadow and enforce postures. */
|
|
15
|
+
eligibility?: ProducerEligibilityEvaluator;
|
|
11
16
|
finalizationRunner: FinalizationRunner;
|
|
12
17
|
logger?: Logger;
|
|
13
18
|
mempoolViewer: MempoolViewer;
|
|
@@ -17,8 +22,10 @@ interface ProcessPendingBlocksParams {
|
|
|
17
22
|
* carry its signature, which is what makes them attributable evidence rather than a local note.
|
|
18
23
|
*/
|
|
19
24
|
observer?: AccountInstance;
|
|
25
|
+
/** Where to publish what both admission gates concluded, in shadow posture. */
|
|
26
|
+
publishAdmissionShadow?: (report: AdmissionShadowReport) => Promise<void>;
|
|
20
27
|
}
|
|
21
|
-
export declare function processPendingBlocks({ blockValidationViewer, blockViewer, context, logger, mempoolViewer, finalizationRunner, allowedProducers, backoffMs, minCandidates, deadLetterQueueRunner, observer, }: ProcessPendingBlocksParams): Promise<[{
|
|
28
|
+
export declare function processPendingBlocks({ blockValidationViewer, blockViewer, context, logger, mempoolViewer, finalizationRunner, allowedProducers, backoffMs, minCandidates, deadLetterQueueRunner, observer, admission, eligibility, publishAdmissionShadow, }: ProcessPendingBlocksParams): Promise<[{
|
|
22
29
|
schema: "network.xyo.boundwitness" & {
|
|
23
30
|
readonly __schema: true;
|
|
24
31
|
};
|
|
@@ -45,6 +52,7 @@ export declare function processPendingBlocks({ blockValidationViewer, blockViewe
|
|
|
45
52
|
$sourceQuery?: import("@ariestools/sdk").BrandedHash | undefined;
|
|
46
53
|
protocol?: number | undefined;
|
|
47
54
|
step_hashes?: import("@ariestools/sdk").BrandedHash[] | undefined;
|
|
55
|
+
supersedes?: import("@ariestools/sdk").BrandedHash | undefined;
|
|
48
56
|
}, {
|
|
49
57
|
[x: string]: unknown;
|
|
50
58
|
schema: import("@xyo-network/sdk").BrandedSchema<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processPendingBlocks.d.ts","sourceRoot":"","sources":["../../../../../src/modules/services/implementation/processPendingBlocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAEtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EACV,WAAW,EAAE,qBAAqB,EAAE,WAAW,EAAE,qBAAqB,EAAE,kBAAkB,EAA6B,aAAa,EACrI,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"processPendingBlocks.d.ts","sourceRoot":"","sources":["../../../../../src/modules/services/implementation/processPendingBlocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAEtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EACV,WAAW,EAAE,qBAAqB,EAAE,WAAW,EAAE,qBAAqB,EAAE,kBAAkB,EAA6B,aAAa,EACrI,MAAM,sBAAsB,CAAA;AAK7B,OAAO,KAAK,EACV,aAAa,EAAE,qBAAqB,EAAE,4BAA4B,EACnE,MAAM,UAAU,CAAA;AAKjB,UAAU,0BAA0B;IAClC,uFAAuF;IACvF,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB,gBAAgB,CAAC,EAAE,OAAO,EAAE,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qBAAqB,EAAE,qBAAqB,CAAA;IAC5C,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,WAAW,CAAA;IACpB,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAC7C,uEAAuE;IACvE,WAAW,CAAC,EAAE,4BAA4B,CAAA;IAC1C,kBAAkB,EAAE,kBAAkB,CAAA;IACtC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,aAAa,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAA;IAC1B,+EAA+E;IAC/E,sBAAsB,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1E;AAgCD,wBAAsB,oBAAoB,CAAC,EACzC,qBAAqB,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,SAAS,EAAE,aAAa,EAAE,qBAAqB,EAAE,QAAQ,EACnK,SAAS,EAAE,WAAW,EAAE,sBAAsB,GAC/C,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA2E5B"}
|
|
@@ -37,7 +37,7 @@ export interface SimpleBlockRunnerParams extends CreatableProviderParams {
|
|
|
37
37
|
export declare class SimpleBlockRunner extends AbstractCreatableProvider<SimpleBlockRunnerParams> implements BlockRunner {
|
|
38
38
|
static readonly connectionTypes: readonly ["lmdb", "mongo", "memory"];
|
|
39
39
|
static readonly defaultMoniker: "BlockRunner";
|
|
40
|
-
static readonly dependencies: ("
|
|
40
|
+
static readonly dependencies: ("AccountBalanceViewer" | "MempoolViewer" | "BlockRewardViewer" | "BlockValidationViewer" | "FinalizationViewer" | "TimeSyncViewer")[];
|
|
41
41
|
static readonly monikers: "BlockRunner"[];
|
|
42
42
|
static readonly surface: "node";
|
|
43
43
|
moniker: "BlockRunner";
|
|
@@ -51,7 +51,10 @@ export declare class SimpleBlockRunner extends AbstractCreatableProvider<SimpleB
|
|
|
51
51
|
private _address?;
|
|
52
52
|
private _blockRewardViewer?;
|
|
53
53
|
private _blockValidationViewer?;
|
|
54
|
+
private _chainParamsViewer?;
|
|
54
55
|
private _finalizationViewer?;
|
|
56
|
+
/** Cache of the last candidate this runner signed; the mempool is the source of truth. */
|
|
57
|
+
private _lastSignedCandidate?;
|
|
55
58
|
private _mempoolViewer?;
|
|
56
59
|
private _rewardAddress?;
|
|
57
60
|
private _timeSyncViewer?;
|
|
@@ -127,6 +130,7 @@ export declare class SimpleBlockRunner extends AbstractCreatableProvider<SimpleB
|
|
|
127
130
|
$sourceQuery?: import("@ariestools/sdk").BrandedHash | undefined;
|
|
128
131
|
protocol?: number | undefined;
|
|
129
132
|
step_hashes?: import("@ariestools/sdk").BrandedHash[] | undefined;
|
|
133
|
+
supersedes?: import("@ariestools/sdk").BrandedHash | undefined;
|
|
130
134
|
}, {
|
|
131
135
|
[x: string]: unknown;
|
|
132
136
|
schema: import("@xyo-network/sdk").BrandedSchema<string>;
|
|
@@ -152,8 +156,37 @@ export declare class SimpleBlockRunner extends AbstractCreatableProvider<SimpleB
|
|
|
152
156
|
* @returns True if a heartbeat is required, false otherwise
|
|
153
157
|
*/
|
|
154
158
|
private heartbeatRequired;
|
|
159
|
+
/**
|
|
160
|
+
* The hash of this producer's own earlier candidate at the same height and parent, if any.
|
|
161
|
+
*
|
|
162
|
+
* The parent is part of the match on purpose. Two candidates at one height built on different
|
|
163
|
+
* parents are not a re-proposal, they are different branches, and linking across them would
|
|
164
|
+
* assert a supersession that never happened.
|
|
165
|
+
*
|
|
166
|
+
* Memory is only a cache. A restart wipes it while the pool still holds the prior candidate, so
|
|
167
|
+
* the pool is consulted whenever memory misses. Following the chain to its tip keeps a third
|
|
168
|
+
* proposal pointing at the second rather than back at the first.
|
|
169
|
+
* @param block The height being proposed
|
|
170
|
+
* @param previous The parent this proposal builds on
|
|
171
|
+
* @returns The prior candidate's signed data hash, or undefined when there is none
|
|
172
|
+
*/
|
|
173
|
+
private previousOwnCandidateHash;
|
|
155
174
|
private rejectExhaustedBlock;
|
|
156
175
|
private rejectWrongChainTransactions;
|
|
176
|
+
/**
|
|
177
|
+
* The candidate this proposal supersedes, or undefined when nothing should be stamped.
|
|
178
|
+
*
|
|
179
|
+
* Identity is the signed data hash rather than the storage hash, because that is what an
|
|
180
|
+
* observer recomputes when deciding whether two candidates are the same block — client meta
|
|
181
|
+
* such as `$epoch` must not be able to make one candidate look like two.
|
|
182
|
+
*
|
|
183
|
+
* With no register wired, or with the field unactivated, this never stamps. That is what keeps
|
|
184
|
+
* a producer running this build emission-identical to one running the release before it, which
|
|
185
|
+
* the rollout depends on: stamping before the fleet has upgraded would partition validation.
|
|
186
|
+
* @param head The block being built on
|
|
187
|
+
* @returns The superseded candidate's hash, or undefined
|
|
188
|
+
*/
|
|
189
|
+
private resolveSupersedes;
|
|
157
190
|
private runBuildValidateRetryLoop;
|
|
158
191
|
}
|
|
159
192
|
//# sourceMappingURL=SimpleBlockRunner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleBlockRunner.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/services/simple/block/runner/SimpleBlockRunner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAAQ,UAAU,EAC1B,MAAM,iBAAiB,CAAA;AAKxB,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAAE,YAAY,EAChC,MAAM,kBAAkB,CAAA;AAKzB,OAAO,KAAK,EACV,oBAAoB,EAAuB,iBAAiB,EACxC,iBAAiB,EAAE,WAAW,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"SimpleBlockRunner.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/services/simple/block/runner/SimpleBlockRunner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAAQ,UAAU,EAC1B,MAAM,iBAAiB,CAAA;AAKxB,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAAE,YAAY,EAChC,MAAM,kBAAkB,CAAA;AAKzB,OAAO,KAAK,EACV,oBAAoB,EAAuB,iBAAiB,EACxC,iBAAiB,EAAE,WAAW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I,EAAE,YAAY,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,+BAA+B,GAAG,SAAS,CAAC;IAgBjG,gBAAgB,CAAC,IAAI,EAAE,mCAAmC,EAAE,KAAK,EAAE,IAAI,GAAG,OAAO,CAAC,+BAA+B,CAAC;IAClH,gBAAgB,CAAC,IAAI,EAAE,mCAAmC,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,+BAA+B,GAAG,SAAS,CAAC;cAOtH,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAiB3E;;;;OAIG;IACH,SAAS,CAAC,wBAAwB,CAAC,IAAI,EAAE,YAAY,CAAC,iBAAiB,CAAC,GAAG,UAAU,CAAC,gBAAgB,GAAG,SAAS,CAAC;cAsBnG,qBAAqB,CAAC,IAAI,EAAE,YAAY,CAAC,iBAAiB,CAAC,EAAE,gBAAgB,CAAC,EAAE,OAAO,EAAE,KAAK,UAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsEtH;;;;;;;;OAQG;IACH,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,yBAAyB;YAiBnB,cAAc;YAsDd,mBAAmB;IAIjC;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAQzB;;;;;;;;;;;;;OAaG;YACW,wBAAwB;YAOxB,oBAAoB;YAkBpB,4BAA4B;IAiC1C;;;;;;;;;;;;OAYG;YACW,iBAAiB;YASjB,yBAAyB;CA4DxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/services/simple/block/runner/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/services/simple/block/runner/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Hash } from '@ariestools/sdk';
|
|
2
|
+
import type { WithHashMeta, XyoAddress } from '@xyo-network/sdk';
|
|
3
|
+
import type { BlockBoundWitness } from '@xyo-network/xl1-sdk';
|
|
4
|
+
/**
|
|
5
|
+
* Which of a producer's own pending candidates a new proposal at this height supersedes.
|
|
6
|
+
*
|
|
7
|
+
* Matching on the parent as well as the height is the guard that matters. Two candidates at one
|
|
8
|
+
* height built on different parents are not a re-proposal, they are competing branches, and
|
|
9
|
+
* stamping a link across them would assert a supersession that never happened — turning an
|
|
10
|
+
* honest producer's block into evidence against it.
|
|
11
|
+
*
|
|
12
|
+
* When several of its own candidates are already in the pool, the tip of the supersedes chain is
|
|
13
|
+
* the one to point at: the tip is the candidate nothing else has replaced, so a third proposal
|
|
14
|
+
* links to the second rather than reaching back past it and leaving the second orphaned.
|
|
15
|
+
* @param candidates Pending candidates visible to this producer
|
|
16
|
+
* @param address The producer's own signing address
|
|
17
|
+
* @param block The height being proposed
|
|
18
|
+
* @param previous The parent this proposal builds on
|
|
19
|
+
* @returns The signed data hash to supersede, or undefined when there is nothing to link
|
|
20
|
+
*/
|
|
21
|
+
export declare function selectSupersededCandidate(candidates: WithHashMeta<BlockBoundWitness>[], address: XyoAddress, block: number, previous: Hash): Hash | undefined;
|
|
22
|
+
//# sourceMappingURL=selectSupersededCandidate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectSupersededCandidate.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/services/simple/block/runner/selectSupersededCandidate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE7D;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,YAAY,CAAC,iBAAiB,CAAC,EAAE,EAC7C,OAAO,EAAE,UAAU,EACnB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,IAAI,GACb,IAAI,GAAG,SAAS,CAOlB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Payload } from '@xyo-network/sdk';
|
|
2
|
+
import type { OffenseCode } from '@xyo-network/xl1-sdk';
|
|
3
|
+
import type { OffenseKey } from '../model/offenseKey.js';
|
|
4
|
+
import type { OffenseVerdict } from '../model/VerificationOutcome.js';
|
|
5
|
+
/**
|
|
6
|
+
* Conduct a watcher found and then verified.
|
|
7
|
+
*
|
|
8
|
+
* Carries the verdict rather than a bare flag, because the transcript is what makes the detection
|
|
9
|
+
* worth anything: it is the same record an arbiter would publish, so an operator watching in
|
|
10
|
+
* telemetry mode can see exactly what a report would have said before any are ever filed.
|
|
11
|
+
*/
|
|
12
|
+
export interface DetectedOffense {
|
|
13
|
+
/**
|
|
14
|
+
* The artifacts the verdict rests on.
|
|
15
|
+
*
|
|
16
|
+
* Carried because a report has to supply them: a reporter that named hashes without producing
|
|
17
|
+
* the objects would be asking everyone else to take its word for it.
|
|
18
|
+
*/
|
|
19
|
+
artifacts: Payload[];
|
|
20
|
+
/** What the offense is filed under. */
|
|
21
|
+
key: OffenseKey;
|
|
22
|
+
/** Which class. */
|
|
23
|
+
offense: OffenseCode;
|
|
24
|
+
/** What verification concluded, with its transcript. */
|
|
25
|
+
verdict: OffenseVerdict;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=DetectedOffense.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetectedOffense.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/detect/DetectedOffense.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAEvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAErE;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,SAAS,EAAE,OAAO,EAAE,CAAA;IACpB,uCAAuC;IACvC,GAAG,EAAE,UAAU,CAAA;IACf,mBAAmB;IACnB,OAAO,EAAE,WAAW,CAAA;IACpB,wDAAwD;IACxD,OAAO,EAAE,cAAc,CAAA;CACxB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Hash } from '@ariestools/sdk';
|
|
2
|
+
import type { XyoAddress } from '@xyo-network/sdk';
|
|
3
|
+
/** One candidate a watcher saw a producer sign, reduced to what deciding equivocation needs. */
|
|
4
|
+
export interface CandidateSighting {
|
|
5
|
+
/** Height the candidate claims. */
|
|
6
|
+
block: number;
|
|
7
|
+
/** Recomputed signed identity — never the storage hash, which client meta can move. */
|
|
8
|
+
dataHash: Hash;
|
|
9
|
+
/** Parent the candidate builds on. */
|
|
10
|
+
previous: Hash | null;
|
|
11
|
+
/** Address that signed it. */
|
|
12
|
+
producer: XyoAddress;
|
|
13
|
+
/** The candidate this one declares it replaces, when it declares one. */
|
|
14
|
+
supersedes?: Hash;
|
|
15
|
+
}
|
|
16
|
+
/** Two candidates from one producer that compete for the same slot. */
|
|
17
|
+
export interface CandidatePair {
|
|
18
|
+
/** Height they compete at. */
|
|
19
|
+
block: number;
|
|
20
|
+
/** The earlier sighting. */
|
|
21
|
+
first: CandidateSighting;
|
|
22
|
+
/** Who signed both. */
|
|
23
|
+
producer: XyoAddress;
|
|
24
|
+
/** The later sighting. */
|
|
25
|
+
second: CandidateSighting;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Finds candidate pairs that look like equivocation among what a watcher has seen.
|
|
29
|
+
*
|
|
30
|
+
* This is detection, not judgment. It answers which pairs are worth verifying, and a pair reaching
|
|
31
|
+
* this list is not yet an accusation — the verification procedure decides that, and it re-derives
|
|
32
|
+
* everything from the artifacts rather than trusting anything here.
|
|
33
|
+
*
|
|
34
|
+
* A declared link clears the pair immediately, so an honest producer's re-proposal never enters
|
|
35
|
+
* the pipeline at all. Doing that here rather than later matters: a watcher that queued every
|
|
36
|
+
* re-proposal for verification would spend its budget on producers doing exactly what they should.
|
|
37
|
+
*
|
|
38
|
+
* Sightings are compared by recomputed identity, so a candidate seen twice through different paths
|
|
39
|
+
* collapses to one rather than becoming a pair with itself.
|
|
40
|
+
* @param sightings Candidates the watcher has observed
|
|
41
|
+
* @returns Pairs worth verifying, one per competing combination
|
|
42
|
+
*/
|
|
43
|
+
export declare function findCandidatePairs(sightings: readonly CandidateSighting[]): CandidatePair[];
|
|
44
|
+
//# sourceMappingURL=candidatePairs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"candidatePairs.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/detect/candidatePairs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,gGAAgG;AAChG,MAAM,WAAW,iBAAiB;IAChC,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAA;IACb,uFAAuF;IACvF,QAAQ,EAAE,IAAI,CAAA;IACd,sCAAsC;IACtC,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAA;IACrB,8BAA8B;IAC9B,QAAQ,EAAE,UAAU,CAAA;IACpB,yEAAyE;IACzE,UAAU,CAAC,EAAE,IAAI,CAAA;CAClB;AAED,uEAAuE;AACvE,MAAM,WAAW,aAAa;IAC5B,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,4BAA4B;IAC5B,KAAK,EAAE,iBAAiB,CAAA;IACxB,uBAAuB;IACvB,QAAQ,EAAE,UAAU,CAAA;IACpB,0BAA0B;IAC1B,MAAM,EAAE,iBAAiB,CAAA;CAC1B;AAaD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,SAAS,iBAAiB,EAAE,GAAG,aAAa,EAAE,CAqB3F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/detect/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ChainParams, OffenseCode } from '@xyo-network/xl1-sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Whether a watcher may treat conduct at a height as a reportable offense.
|
|
4
|
+
*
|
|
5
|
+
* Two gates, and the second one only applies to equivocation. A producer cannot declare that one
|
|
6
|
+
* candidate replaces another until the field that says so is active, so before that activation
|
|
7
|
+
* every honest re-proposal is indistinguishable from equivocation. Reporting the class then would
|
|
8
|
+
* accuse operators of an offense the protocol gave them no way to avoid.
|
|
9
|
+
*
|
|
10
|
+
* That conjunction is fixed here rather than left to configuration. An operator who could switch
|
|
11
|
+
* it off would be arming their node to file accusations the chain cannot sustain.
|
|
12
|
+
* @param params The register version covering the offense height
|
|
13
|
+
* @param offense The offense class being considered
|
|
14
|
+
* @param height The XL1 height the conduct occurred at
|
|
15
|
+
* @returns True when reports naming this class at this height may be recorded
|
|
16
|
+
*/
|
|
17
|
+
export declare function isOffenseWatchable(params: ChainParams, offense: OffenseCode, height: number): boolean;
|
|
18
|
+
//# sourceMappingURL=offenseGate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"offenseGate.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/detect/offenseGate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAGpE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAGrG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { OffenseKey } from '../model/offenseKey.js';
|
|
2
|
+
import type { SlashHistoryReader } from '../model/SlashHistoryReader.js';
|
|
3
|
+
/** Why a watcher should not file a report it would otherwise have filed. */
|
|
4
|
+
export type SuppressionReason = 'adjudicated' | 'already-reported';
|
|
5
|
+
/**
|
|
6
|
+
* Whether an offense a watcher has detected is already spoken for.
|
|
7
|
+
*
|
|
8
|
+
* Duplicate detection is normal — every validator watching the same chain sees the same
|
|
9
|
+
* misconduct — so the interesting question is not whether to detect it but whether to add another
|
|
10
|
+
* report of it.
|
|
11
|
+
*
|
|
12
|
+
* A settled offense is the stronger case. Filing against something already adjudicated is not
|
|
13
|
+
* merely redundant: an adjudicated offense cannot be re-litigated, so the new report is itself
|
|
14
|
+
* invalid and exposes its filer to a counter-slash. A watcher must never walk into that.
|
|
15
|
+
*
|
|
16
|
+
* An existing unsettled report is only redundant. Nothing is lost by staying quiet — the offense
|
|
17
|
+
* is already on the record and the bounty already claimed by whoever got there first.
|
|
18
|
+
* @param history Finalized slash traffic as this watcher can see it
|
|
19
|
+
* @param key The offense being considered
|
|
20
|
+
* @returns Why to stay quiet, or undefined when the report is worth filing
|
|
21
|
+
*/
|
|
22
|
+
export declare function suppressionFor(history: SlashHistoryReader, key: OffenseKey): Promise<SuppressionReason | undefined>;
|
|
23
|
+
//# sourceMappingURL=suppression.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppression.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/detect/suppression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AAExE,4EAA4E;AAC5E,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,kBAAkB,CAAA;AAElE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,kBAAkB,EAC3B,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAGxC"}
|