@xyo-network/chain-sdk 5.0.4 → 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 +11 -5
|
@@ -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":"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"}
|
|
@@ -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"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { Promisable } from '@ariestools/sdk';
|
|
2
|
+
import type { XyoAddress } from '@xyo-network/sdk';
|
|
3
|
+
import type { ChainParams, StakeSnapshotViewerMethods } from '@xyo-network/xl1-sdk';
|
|
4
|
+
/**
|
|
5
|
+
* Whether an address has a current declaration to produce, as of a height.
|
|
6
|
+
*
|
|
7
|
+
* `undefined` means the question could not be answered — no intent reader is wired — which is
|
|
8
|
+
* different from `false` (the reader looked and found nothing current). Collapsing the two would
|
|
9
|
+
* turn a missing reader into either a free pass or an accusation, depending on the direction.
|
|
10
|
+
*/
|
|
11
|
+
export type HasValidIntent = (address: XyoAddress, height: number) => Promisable<boolean | undefined>;
|
|
12
|
+
/** What the participation predicate needs about a candidate block. */
|
|
13
|
+
export interface EligibilityInput {
|
|
14
|
+
/** The producer being evaluated. */
|
|
15
|
+
accused: XyoAddress;
|
|
16
|
+
/** EVM anchor carried by the candidate itself. */
|
|
17
|
+
blockAnchor?: number;
|
|
18
|
+
/** The candidate's XL1 height, where intent windows are judged. */
|
|
19
|
+
height: number;
|
|
20
|
+
/** Whether the address has a current production declaration. */
|
|
21
|
+
intent: HasValidIntent;
|
|
22
|
+
/** The register version in force. */
|
|
23
|
+
params: ChainParams;
|
|
24
|
+
/** EVM anchor carried by the candidate's parent. */
|
|
25
|
+
parentAnchor?: number;
|
|
26
|
+
/** Stake as it stood at an EVM height. */
|
|
27
|
+
snapshot?: StakeSnapshotViewerMethods;
|
|
28
|
+
}
|
|
29
|
+
/** What evaluating participation concluded, including the numbers it concluded it from. */
|
|
30
|
+
export interface EligibilityEvaluation {
|
|
31
|
+
/** Seasoned active stake measured at the evaluation point. */
|
|
32
|
+
activeStake?: bigint;
|
|
33
|
+
/** The EVM height stake was measured at. */
|
|
34
|
+
eStar?: number;
|
|
35
|
+
/** Whether the address may produce, when that could be established. */
|
|
36
|
+
eligible?: boolean;
|
|
37
|
+
/** Whether the address has a current declaration. */
|
|
38
|
+
intentValid?: boolean;
|
|
39
|
+
/** Why not, when it is not. */
|
|
40
|
+
reason?: string;
|
|
41
|
+
/** False when the inputs to the predicate could not be resolved at all. */
|
|
42
|
+
resolvable: boolean;
|
|
43
|
+
/** The seasoned portion staked on itself. */
|
|
44
|
+
selfBond?: bigint;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The one place participation is decided.
|
|
48
|
+
*
|
|
49
|
+
* Admission and after-the-fact verification call this same function, and that is the point. If
|
|
50
|
+
* the finalizer's idea of who may produce and the offense procedure's idea ever diverged, a block
|
|
51
|
+
* could be admitted by the network and simultaneously constitute an offense by its producer — so
|
|
52
|
+
* there is exactly one implementation and both callers take it.
|
|
53
|
+
*
|
|
54
|
+
* The measurement point comes from the two blocks' own signed anchors rather than any live view,
|
|
55
|
+
* so the answer does not depend on when it is asked. A block admissible when it was produced must
|
|
56
|
+
* still evaluate as admissible a week later.
|
|
57
|
+
*
|
|
58
|
+
* Stake is counted seasoned: a position participates only once it has sat at risk for the
|
|
59
|
+
* register's minimum age, so production rights cannot be flash-acquired the block before the
|
|
60
|
+
* measurement point. The unaged total is measured beside it purely so the report can tell an
|
|
61
|
+
* entrant waiting out seasoning apart from an operator short of capital.
|
|
62
|
+
*
|
|
63
|
+
* The tri-state matters as much as the verdict. `resolvable: false` means the question could not
|
|
64
|
+
* be put — no snapshot, no anchors, no intent reader — which admission treats as "do not gate"
|
|
65
|
+
* and verification treats as inconclusive. Collapsing it into ineligible would turn a missing
|
|
66
|
+
* reader into an accusation.
|
|
67
|
+
* @param input The candidate, the register, and the readers to consult
|
|
68
|
+
* @returns The verdict with the measurements behind it
|
|
69
|
+
*/
|
|
70
|
+
export declare function evaluateProducerEligibility(input: EligibilityInput): Promise<EligibilityEvaluation>;
|
|
71
|
+
//# sourceMappingURL=evaluateProducerEligibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluateProducerEligibility.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/eligibility/evaluateProducerEligibility.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,WAAW,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAA;AAGnF;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC,CAAA;AAErG,sEAAsE;AACtE,MAAM,WAAW,gBAAgB;IAC/B,oCAAoC;IACpC,OAAO,EAAE,UAAU,CAAA;IACnB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAA;IACd,gEAAgE;IAChE,MAAM,EAAE,cAAc,CAAA;IACtB,qCAAqC;IACrC,MAAM,EAAE,WAAW,CAAA;IACnB,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,0BAA0B,CAAA;CACtC;AAED,2FAA2F;AAC3F,MAAM,WAAW,qBAAqB;IACpC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,uEAAuE;IACvE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qDAAqD;IACrD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,2EAA2E;IAC3E,UAAU,EAAE,OAAO,CAAA;IACnB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,2BAA2B,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA6CzG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/eligibility/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { JsonObject, Promisable } from '@ariestools/sdk';
|
|
2
|
+
/** Moniker the slash index's store resolves under. */
|
|
3
|
+
export declare const SlashIndexStoreMoniker = "SlashIndexStore";
|
|
4
|
+
/**
|
|
5
|
+
* The object store the slash index is written to.
|
|
6
|
+
*
|
|
7
|
+
* Named apart from any S3 base class on purpose: the pass that decides *what* to write is pure
|
|
8
|
+
* and tested on its own, and this is the whole of what it needs from the world. Keeping the two
|
|
9
|
+
* separate is what makes the crash-safety argument checkable — the part with the reasoning has no
|
|
10
|
+
* I/O, and the part with I/O has no reasoning.
|
|
11
|
+
*/
|
|
12
|
+
export interface SlashIndexStore {
|
|
13
|
+
/** Whether an object already exists, so immutable writes can be skipped. */
|
|
14
|
+
hasObject(path: string): Promisable<boolean>;
|
|
15
|
+
/** Reads a published object, or undefined when it is not there. */
|
|
16
|
+
readObject(path: string): Promisable<unknown>;
|
|
17
|
+
/** Writes an object. */
|
|
18
|
+
writeObject(path: string, value: JsonObject, immutable: boolean): Promisable<void>;
|
|
19
|
+
}
|
|
20
|
+
/** Whether a resolved provider can actually serve as the index store. */
|
|
21
|
+
export declare function isSlashIndexStore(value: unknown): value is SlashIndexStore;
|
|
22
|
+
//# sourceMappingURL=SlashIndexStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlashIndexStore.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/index/SlashIndexStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE7D,sDAAsD;AACtD,eAAO,MAAM,sBAAsB,oBAAoB,CAAA;AAEvD;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,4EAA4E;IAC5E,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IAC5C,mEAAmE;IACnE,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IAC7C,wBAAwB;IACxB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;CACnF;AAED,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAK1E"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Hash, JsonObject } from '@ariestools/sdk';
|
|
2
|
+
import type { SignedHydratedBlockWithHashMeta, SlashIndexKeyRecord } from '@xyo-network/xl1-sdk';
|
|
3
|
+
/** One object to write, and whether it may ever be rewritten. */
|
|
4
|
+
export interface SlashIndexWrite {
|
|
5
|
+
/** True when the object is content-addressed and must never change once written. */
|
|
6
|
+
immutable: boolean;
|
|
7
|
+
/** Where it goes. */
|
|
8
|
+
path: string;
|
|
9
|
+
/** What goes there. */
|
|
10
|
+
value: JsonObject;
|
|
11
|
+
}
|
|
12
|
+
/** Everything one batch of finalized blocks contributes to the index. */
|
|
13
|
+
export interface SlashIndexDelta {
|
|
14
|
+
/** Producer aggregates: path to the offense keys seen for that producer. */
|
|
15
|
+
accused: Map<string, string[]>;
|
|
16
|
+
/** Per-offense aggregates, keyed by their path. */
|
|
17
|
+
keys: Map<string, SlashIndexKeyRecord>;
|
|
18
|
+
/**
|
|
19
|
+
* Adjudications and challenges whose report was not in this batch.
|
|
20
|
+
*
|
|
21
|
+
* Their offense cannot be resolved from the blocks alone — the report that names it is further
|
|
22
|
+
* back — so the writing pass resolves them against the published request records.
|
|
23
|
+
*/
|
|
24
|
+
pending: {
|
|
25
|
+
hash: Hash;
|
|
26
|
+
kind: 'adjudication' | 'challenge';
|
|
27
|
+
request: Hash;
|
|
28
|
+
}[];
|
|
29
|
+
/** Content-addressed records, safe to skip when already present. */
|
|
30
|
+
records: SlashIndexWrite[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Folds finalized blocks into everything the index should gain from them.
|
|
34
|
+
*
|
|
35
|
+
* Pure, and deliberately so: the pass that writes has to be safe to re-run after a crash, and the
|
|
36
|
+
* cheapest way to be sure of that is for the decision of *what* to write to depend on nothing but
|
|
37
|
+
* the blocks. Run it twice over the same range and it produces the same delta.
|
|
38
|
+
*
|
|
39
|
+
* Aggregates are keyed by canonical offense identity, so several validators reporting the same
|
|
40
|
+
* misconduct converge on one record instead of accumulating as separate accusations.
|
|
41
|
+
* @param blocks Finalized blocks to fold, in ascending height order
|
|
42
|
+
* @returns The records and aggregate contributions from those blocks
|
|
43
|
+
*/
|
|
44
|
+
export declare function foldSlashIndex(blocks: SignedHydratedBlockWithHashMeta[]): SlashIndexDelta;
|
|
45
|
+
/**
|
|
46
|
+
* Merges an aggregate contribution into whatever is already published.
|
|
47
|
+
*
|
|
48
|
+
* Every field either appends or is set once. That is what lets a crashed pass simply rescan: a
|
|
49
|
+
* second fold over the same blocks adds nothing it did not already add, and a fold over new blocks
|
|
50
|
+
* never erases what an earlier one recorded.
|
|
51
|
+
* @param existing The published aggregate, when there is one
|
|
52
|
+
* @param next The contribution from this pass
|
|
53
|
+
* @returns The aggregate to publish
|
|
54
|
+
*/
|
|
55
|
+
export declare function mergeKeyRecord(existing: SlashIndexKeyRecord | undefined, next: SlashIndexKeyRecord): SlashIndexKeyRecord;
|
|
56
|
+
//# sourceMappingURL=foldSlashIndex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foldSlashIndex.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/index/foldSlashIndex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEvD,OAAO,KAAK,EAAE,+BAA+B,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAShG,iEAAiE;AACjE,MAAM,WAAW,eAAe;IAC9B,oFAAoF;IACpF,SAAS,EAAE,OAAO,CAAA;IAClB,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,uBAAuB;IACvB,KAAK,EAAE,UAAU,CAAA;CAClB;AAED,yEAAyE;AACzE,MAAM,WAAW,eAAe;IAC9B,4EAA4E;IAC5E,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;IAC9B,mDAAmD;IACnD,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAA;IACtC;;;;;OAKG;IACH,OAAO,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,cAAc,GAAG,WAAW,CAAC;QAAC,OAAO,EAAE,IAAI,CAAA;KAAE,EAAE,CAAA;IAC5E,oEAAoE;IACpE,OAAO,EAAE,eAAe,EAAE,CAAA;CAC3B;AAWD;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,+BAA+B,EAAE,GAAG,eAAe,CAOzF;AA+ED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,mBAAmB,GAAG,SAAS,EACzC,IAAI,EAAE,mBAAmB,GACxB,mBAAmB,CAYrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/index/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/slashing/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Hash } from '@ariestools/sdk';
|
|
2
|
+
import type { Payload } from '@xyo-network/sdk';
|
|
3
|
+
import type { SlashRequest } from '@xyo-network/xl1-sdk';
|
|
4
|
+
import type { OffenseVerificationContext } from './OffenseVerificationContext.js';
|
|
5
|
+
import type { OffenseVerdict } from './VerificationOutcome.js';
|
|
6
|
+
/** An artifact that survived re-hashing and signature checking. */
|
|
7
|
+
export interface VerifiedArtifact {
|
|
8
|
+
/** The recomputed data hash, which is the artifact's identity. */
|
|
9
|
+
dataHash: Hash;
|
|
10
|
+
/** The artifact itself. */
|
|
11
|
+
payload: Payload;
|
|
12
|
+
/**
|
|
13
|
+
* The recomputed meta-inclusive hash, when the preamble computed it.
|
|
14
|
+
*
|
|
15
|
+
* Signed references — a block's `previous`, a carrier's payload list — may point at either
|
|
16
|
+
* form, and both are recomputed from the artifact itself so a reference match never rests on
|
|
17
|
+
* a hash the supplier merely claimed.
|
|
18
|
+
*/
|
|
19
|
+
storageHash?: Hash;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* One offense class's verification procedure.
|
|
23
|
+
*
|
|
24
|
+
* Procedures receive artifacts already re-hashed and signature-checked, so each one reasons about
|
|
25
|
+
* what the evidence means rather than re-deriving whose it is.
|
|
26
|
+
*/
|
|
27
|
+
export type OffenseProcedure = (ctx: OffenseVerificationContext, request: SlashRequest, artifacts: ReadonlyMap<Hash, VerifiedArtifact>) => Promise<OffenseVerdict>;
|
|
28
|
+
//# sourceMappingURL=OffenseProcedure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OffenseProcedure.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/model/OffenseProcedure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,mEAAmE;AACnE,MAAM,WAAW,gBAAgB;IAC/B,kEAAkE;IAClE,QAAQ,EAAE,IAAI,CAAA;IACd,2BAA2B;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,IAAI,CAAA;CACnB;AAED;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAC7B,GAAG,EAAE,0BAA0B,EAC/B,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,WAAW,CAAC,IAAI,EAAE,gBAAgB,CAAC,KAC3C,OAAO,CAAC,cAAc,CAAC,CAAA"}
|