@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
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { Hash, Hex, JsonObject, Promisable } from '@ariestools/sdk';
|
|
2
|
+
import type { AccountBalanceViewer, ChainParams, SignedHydratedBlockWithHashMeta, StakeSnapshotViewerMethods, XL1BlockNumber } from '@xyo-network/xl1-sdk';
|
|
3
|
+
import type { SlashHistoryReader } from './SlashHistoryReader.js';
|
|
4
|
+
/**
|
|
5
|
+
* The verifier's own view of finalized history.
|
|
6
|
+
*
|
|
7
|
+
* Every method may answer `undefined`, and that answer always means the same thing: this verifier
|
|
8
|
+
* cannot see far enough to judge. Callers map it to `indeterminate` rather than guessing, because
|
|
9
|
+
* a verifier that treats "I cannot see it" as "it did not happen" convicts people for its own
|
|
10
|
+
* pruning policy.
|
|
11
|
+
*/
|
|
12
|
+
export interface CanonicalChainReader {
|
|
13
|
+
/** The finalized block at a height, or undefined when it is not resolvable. */
|
|
14
|
+
blockAtHeight(height: XL1BlockNumber): Promisable<SignedHydratedBlockWithHashMeta | undefined>;
|
|
15
|
+
/** A finalized block by hash, or undefined when it is not resolvable. */
|
|
16
|
+
blockByHash(hash: Hash): Promisable<SignedHydratedBlockWithHashMeta | undefined>;
|
|
17
|
+
/** The current finalized head, or undefined when it is not resolvable. */
|
|
18
|
+
finalizedHead(): Promisable<SignedHydratedBlockWithHashMeta | undefined>;
|
|
19
|
+
/**
|
|
20
|
+
* The EVM anchor in force at an XL1 height, taken from the nearest ancestor that carries one.
|
|
21
|
+
*
|
|
22
|
+
* Blocks are not required to carry an anchor below the anchor rules, so the nearest ancestor is
|
|
23
|
+
* the only reading that gives the same answer on every conforming node.
|
|
24
|
+
*/
|
|
25
|
+
validatedAnchorAt(height: XL1BlockNumber): Promisable<number | undefined>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A read-only view of the backing EVM chain.
|
|
29
|
+
*
|
|
30
|
+
* `head()` is deliberately narrow in what it may decide. It answers whether a fact has had time to
|
|
31
|
+
* settle — never what the fact is. A verdict that turned on an unanchored local head would differ
|
|
32
|
+
* between nodes purely by who asked when.
|
|
33
|
+
*/
|
|
34
|
+
export interface EvmView {
|
|
35
|
+
/** The canonical hash at an EVM height, or undefined when it is not resolvable. */
|
|
36
|
+
canonicalHashAt(evmBlock: number): Promisable<Hex | undefined>;
|
|
37
|
+
/** The current EVM head, used only to decide whether something has matured. */
|
|
38
|
+
head(): Promisable<number | undefined>;
|
|
39
|
+
}
|
|
40
|
+
/** Where the report under verification entered the chain. */
|
|
41
|
+
export interface SubmissionContext {
|
|
42
|
+
/** Height of the block carrying the commitment, when the report was committed first. */
|
|
43
|
+
commitCarryingHeight?: XL1BlockNumber;
|
|
44
|
+
/** Height of the block carrying the request. */
|
|
45
|
+
requestCarryingHeight: XL1BlockNumber;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Everything a verification procedure is allowed to consult.
|
|
49
|
+
*
|
|
50
|
+
* This interface is the purity boundary. A procedure gets narrow readers and nothing else — no
|
|
51
|
+
* wall clock, no ambient network, no node-local state — so that two honest verifiers holding the
|
|
52
|
+
* same finalized history reach the same verdict. Slashing is only safe if that holds; a procedure
|
|
53
|
+
* that could read anything ambient would let two nodes convict different people from the same
|
|
54
|
+
* evidence.
|
|
55
|
+
*/
|
|
56
|
+
export interface OffenseVerificationContext {
|
|
57
|
+
/** The artifacts the report cited, keyed by their recomputed data hash. */
|
|
58
|
+
artifacts: ReadonlyMap<Hash, JsonObject>;
|
|
59
|
+
/**
|
|
60
|
+
* Balances as this verifier's canonical history has them, absent when it cannot read them.
|
|
61
|
+
*
|
|
62
|
+
* Only ever consulted against canonical history. Replaying a balance rule over state the
|
|
63
|
+
* reporter supplied would let a report carry its own proof.
|
|
64
|
+
*/
|
|
65
|
+
balances?: AccountBalanceViewer;
|
|
66
|
+
/**
|
|
67
|
+
* The block reward the staking contract allowed at an EVM height, when the register sources
|
|
68
|
+
* rewards from the contract and this verifier can read it.
|
|
69
|
+
*
|
|
70
|
+
* Evaluated at an anchor rather than at a local head, so the answer is the same for everyone.
|
|
71
|
+
*/
|
|
72
|
+
blockRewardAt?: (evmBlock: number) => Promisable<bigint | undefined>;
|
|
73
|
+
/** Offense catalog version the report was filed under. */
|
|
74
|
+
catalogVersion: number;
|
|
75
|
+
/** The verifier's canonical finalized chain. */
|
|
76
|
+
chain: CanonicalChainReader;
|
|
77
|
+
/** The backing EVM chain, absent when this verifier has no EVM view. */
|
|
78
|
+
evm?: EvmView;
|
|
79
|
+
/** Finalized slash traffic, for duplicate and re-litigation checks. */
|
|
80
|
+
history: SlashHistoryReader;
|
|
81
|
+
/** The register version covering the offense height. */
|
|
82
|
+
params: ChainParams;
|
|
83
|
+
/** Stake as measured at an EVM height, absent when unavailable. */
|
|
84
|
+
snapshot?: StakeSnapshotViewerMethods;
|
|
85
|
+
/** Where the report entered the chain. */
|
|
86
|
+
submission: SubmissionContext;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=OffenseVerificationContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OffenseVerificationContext.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/model/OffenseVerificationContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,UAAU,EAClC,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EACV,oBAAoB,EAAE,WAAW,EAAE,+BAA+B,EAClE,0BAA0B,EAAE,cAAc,EAC3C,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC,+EAA+E;IAC/E,aAAa,CAAC,MAAM,EAAE,cAAc,GAAG,UAAU,CAAC,+BAA+B,GAAG,SAAS,CAAC,CAAA;IAC9F,yEAAyE;IACzE,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU,CAAC,+BAA+B,GAAG,SAAS,CAAC,CAAA;IAChF,0EAA0E;IAC1E,aAAa,IAAI,UAAU,CAAC,+BAA+B,GAAG,SAAS,CAAC,CAAA;IACxE;;;;;OAKG;IACH,iBAAiB,CAAC,MAAM,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CAC1E;AAED;;;;;;GAMG;AACH,MAAM,WAAW,OAAO;IACtB,mFAAmF;IACnF,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,GAAG,GAAG,SAAS,CAAC,CAAA;IAC9D,+EAA+E;IAC/E,IAAI,IAAI,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CACvC;AAED,6DAA6D;AAC7D,MAAM,WAAW,iBAAiB;IAChC,wFAAwF;IACxF,oBAAoB,CAAC,EAAE,cAAc,CAAA;IACrC,gDAAgD;IAChD,qBAAqB,EAAE,cAAc,CAAA;CACtC;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,0BAA0B;IACzC,2EAA2E;IAC3E,SAAS,EAAE,WAAW,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IACxC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAA;IAC/B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACpE,0DAA0D;IAC1D,cAAc,EAAE,MAAM,CAAA;IACtB,gDAAgD;IAChD,KAAK,EAAE,oBAAoB,CAAA;IAC3B,wEAAwE;IACxE,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,uEAAuE;IACvE,OAAO,EAAE,kBAAkB,CAAA;IAC3B,wDAAwD;IACxD,MAAM,EAAE,WAAW,CAAA;IACnB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,0BAA0B,CAAA;IACrC,0CAA0C;IAC1C,UAAU,EAAE,iBAAiB,CAAA;CAC9B"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Hash, Promisable } from '@ariestools/sdk';
|
|
2
|
+
import type { SlashAdjudication, SlashChallenge, SlashCommit, SlashRequest, XL1BlockNumber } from '@xyo-network/xl1-sdk';
|
|
3
|
+
import type { OffenseKey } from './offenseKey.js';
|
|
4
|
+
/** A slash payload as it was actually recorded, with where it landed. */
|
|
5
|
+
export interface Finalized<T> {
|
|
6
|
+
/** EVM anchor in force at the carrying block. */
|
|
7
|
+
anchor?: number;
|
|
8
|
+
/** Height of the block that carried it. */
|
|
9
|
+
carryingHeight: XL1BlockNumber;
|
|
10
|
+
/** Hash of the payload itself. */
|
|
11
|
+
hash: Hash;
|
|
12
|
+
/** Position within the carrying block, which breaks ties between same-block entries. */
|
|
13
|
+
index: number;
|
|
14
|
+
/** The recorded payload. */
|
|
15
|
+
payload: T;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Finalized slash traffic, as one verifier can see it.
|
|
19
|
+
*
|
|
20
|
+
* Reads answer from finalized history only. A verifier that counted pending traffic could reach a
|
|
21
|
+
* verdict its peers cannot reproduce, and the whole point of these procedures is that two honest
|
|
22
|
+
* nodes agree.
|
|
23
|
+
*/
|
|
24
|
+
export interface SlashHistoryReader {
|
|
25
|
+
/** The adjudication closing an offense, when one is finalized. */
|
|
26
|
+
adjudicationByKey(key: OffenseKey): Promisable<Finalized<SlashAdjudication> | undefined>;
|
|
27
|
+
/** Challenges filed against a request. */
|
|
28
|
+
challengesForRequest(requestHash: Hash): Promisable<Finalized<SlashChallenge>[]>;
|
|
29
|
+
/** Commitments naming a given report hash. */
|
|
30
|
+
commitsMatching(commitment: Hash): Promisable<Finalized<SlashCommit>[]>;
|
|
31
|
+
/** Requests already recorded for an offense, earliest first. */
|
|
32
|
+
requestsByKey(key: OffenseKey): Promisable<Finalized<SlashRequest>[]>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=SlashHistoryReader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlashHistoryReader.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/model/SlashHistoryReader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,KAAK,EACV,iBAAiB,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAC7E,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,yEAAyE;AACzE,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,2CAA2C;IAC3C,cAAc,EAAE,cAAc,CAAA;IAC9B,kCAAkC;IAClC,IAAI,EAAE,IAAI,CAAA;IACV,wFAAwF;IACxF,KAAK,EAAE,MAAM,CAAA;IACb,4BAA4B;IAC5B,OAAO,EAAE,CAAC,CAAA;CACX;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,kEAAkE;IAClE,iBAAiB,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,CAAC,SAAS,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAC,CAAA;IACxF,0CAA0C;IAC1C,oBAAoB,CAAC,WAAW,EAAE,IAAI,GAAG,UAAU,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,CAAC,CAAA;IAChF,8CAA8C;IAC9C,eAAe,CAAC,UAAU,EAAE,IAAI,GAAG,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;IACvE,gEAAgE;IAChE,aAAa,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;CACtE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { JsonObject } from '@ariestools/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* What verifying a report concluded.
|
|
4
|
+
*
|
|
5
|
+
* Three outcomes rather than two, and the middle one carries the design. `indeterminate` means the
|
|
6
|
+
* check could not be completed from what was available — a reader was unreachable, history had
|
|
7
|
+
* aged out, an anchor had not matured. Collapsing it into `provably-invalid` would punish an
|
|
8
|
+
* honest reporter for a gap in someone else's data, which is the fastest way to make reporting
|
|
9
|
+
* something nobody sane volunteers for.
|
|
10
|
+
*/
|
|
11
|
+
export declare const VerificationOutcomes: readonly ["verified", "indeterminate", "provably-invalid"];
|
|
12
|
+
/** The conclusion of a verification procedure. */
|
|
13
|
+
export type VerificationOutcome = typeof VerificationOutcomes[number];
|
|
14
|
+
/**
|
|
15
|
+
* The result of verifying one report.
|
|
16
|
+
*
|
|
17
|
+
* The transcript is not decoration. Every procedure is required to be reproducible by anyone
|
|
18
|
+
* holding the same inputs, so it records what was consulted and what was recomputed — that record
|
|
19
|
+
* is what an arbiter publishes, and what lets two nodes that disagree find out which of them is
|
|
20
|
+
* reading different data rather than arguing about conclusions.
|
|
21
|
+
*/
|
|
22
|
+
export interface OffenseVerdict {
|
|
23
|
+
/** The conclusion. */
|
|
24
|
+
outcome: VerificationOutcome;
|
|
25
|
+
/**
|
|
26
|
+
* Set when the verdict rests on absence rather than evidence.
|
|
27
|
+
*
|
|
28
|
+
* A conclusion drawn from not finding something can be overturned by someone who has it, so the
|
|
29
|
+
* adjudication side has to know the difference before it acts.
|
|
30
|
+
*/
|
|
31
|
+
provisional?: boolean;
|
|
32
|
+
/** Why the procedure concluded what it did. */
|
|
33
|
+
reason: string;
|
|
34
|
+
/** Step-by-step record of inputs consulted and values recomputed. */
|
|
35
|
+
transcript: JsonObject;
|
|
36
|
+
}
|
|
37
|
+
/** Builds a verdict, keeping the transcript shape uniform across procedures. */
|
|
38
|
+
export declare function verdict(outcome: VerificationOutcome, reason: string, transcript?: JsonObject, provisional?: boolean): OffenseVerdict;
|
|
39
|
+
//# sourceMappingURL=VerificationOutcome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VerificationOutcome.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/model/VerificationOutcome.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,4DAA6D,CAAA;AAE9F,kDAAkD;AAClD,MAAM,MAAM,mBAAmB,GAAG,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAA;AAErE;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,sBAAsB;IACtB,OAAO,EAAE,mBAAmB,CAAA;IAC5B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAA;IACd,qEAAqE;IACrE,UAAU,EAAE,UAAU,CAAA;CACvB;AAED,gFAAgF;AAChF,wBAAgB,OAAO,CACrB,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,MAAM,EACd,UAAU,GAAE,UAAe,EAC3B,WAAW,CAAC,EAAE,OAAO,GACpB,cAAc,CAQhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/model/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { XyoAddress } from '@xyo-network/sdk';
|
|
2
|
+
import type { ChainId, OffenseCode, SlashRequest, XL1BlockNumber } from '@xyo-network/xl1-sdk';
|
|
3
|
+
/**
|
|
4
|
+
* What makes two reports be about the same offense.
|
|
5
|
+
*
|
|
6
|
+
* Duplicate reports are expected — several validators watching the same chain will see the same
|
|
7
|
+
* misconduct — so the system has to recognise them as one thing. Without a canonical key, the same
|
|
8
|
+
* offense could be adjudicated twice and slashed twice.
|
|
9
|
+
*/
|
|
10
|
+
export interface OffenseKey {
|
|
11
|
+
/** Who is accused. */
|
|
12
|
+
accused: XyoAddress;
|
|
13
|
+
/** The canonical height the offense is located at. */
|
|
14
|
+
block: XL1BlockNumber;
|
|
15
|
+
/** The chain it happened on. */
|
|
16
|
+
chain: ChainId;
|
|
17
|
+
/** Which offense class. */
|
|
18
|
+
offense: OffenseCode;
|
|
19
|
+
}
|
|
20
|
+
/** The key a request is filed under. */
|
|
21
|
+
export declare function offenseKeyOf(request: SlashRequest): OffenseKey;
|
|
22
|
+
/**
|
|
23
|
+
* A stable string for the key, for use as a map key.
|
|
24
|
+
*
|
|
25
|
+
* Field order is fixed rather than derived from object iteration, so the same offense produces the
|
|
26
|
+
* same string on every node regardless of how the object was built.
|
|
27
|
+
*/
|
|
28
|
+
export declare function offenseKeyString(key: OffenseKey): string;
|
|
29
|
+
/**
|
|
30
|
+
* Where an offense is located on the chain, which is not always where it was reported.
|
|
31
|
+
*
|
|
32
|
+
* Each class has one canonical height, and it is the height the report's `block` field must carry.
|
|
33
|
+
* Fixing it per class is what stops the same misconduct being filed under several different
|
|
34
|
+
* heights and slashed once for each.
|
|
35
|
+
*
|
|
36
|
+
* - equivocation — the height the two candidates compete at
|
|
37
|
+
* - invalid-block, reward-overmint, false-anchor, ineligible-production — the offending block
|
|
38
|
+
* - invalid-slash-request — the height carrying the request being complained about
|
|
39
|
+
* - false-attestation — the height carrying the attestation
|
|
40
|
+
*/
|
|
41
|
+
export declare function canonicalOffenseHeight(request: SlashRequest): XL1BlockNumber;
|
|
42
|
+
//# sourceMappingURL=offenseKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"offenseKey.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/model/offenseKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EACV,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EACnD,MAAM,sBAAsB,CAAA;AAE7B;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,sBAAsB;IACtB,OAAO,EAAE,UAAU,CAAA;IACnB,sDAAsD;IACtD,KAAK,EAAE,cAAc,CAAA;IACrB,gCAAgC;IAChC,KAAK,EAAE,OAAO,CAAA;IACd,2BAA2B;IAC3B,OAAO,EAAE,WAAW,CAAA;CACrB;AAED,wCAAwC;AACxC,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,UAAU,CAO9D;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,CAExD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,YAAY,GAAG,cAAc,CAE5E"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './preamble.js';
|
|
2
|
+
export * from './verifyEquivocation.js';
|
|
3
|
+
export * from './verifyFalseAnchor.js';
|
|
4
|
+
export * from './verifyFalseAttestation.js';
|
|
5
|
+
export * from './verifyIneligibleProduction.js';
|
|
6
|
+
export * from './verifyInvalidBlock.js';
|
|
7
|
+
export * from './verifyInvalidSlashRequest.js';
|
|
8
|
+
export * from './verifyOffense.js';
|
|
9
|
+
export * from './verifyRewardOvermint.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/verify/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yBAAyB,CAAA;AACvC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oBAAoB,CAAA;AAClC,cAAc,2BAA2B,CAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Hash, JsonObject } from '@ariestools/sdk';
|
|
2
|
+
import type { SlashRequest } from '@xyo-network/xl1-sdk';
|
|
3
|
+
import type { VerifiedArtifact } from '../model/OffenseProcedure.js';
|
|
4
|
+
import type { OffenseVerificationContext } from '../model/OffenseVerificationContext.js';
|
|
5
|
+
import type { OffenseVerdict } from '../model/VerificationOutcome.js';
|
|
6
|
+
/** What re-checking a report's cited artifacts concluded. */
|
|
7
|
+
export type ArtifactCheck = {
|
|
8
|
+
byHash: Map<Hash, VerifiedArtifact>;
|
|
9
|
+
ok: true;
|
|
10
|
+
} | {
|
|
11
|
+
missing?: boolean;
|
|
12
|
+
ok: false;
|
|
13
|
+
reason: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Re-derives every cited artifact's identity and checks its signatures.
|
|
17
|
+
*
|
|
18
|
+
* Identity is recomputed, never taken from the report. A reporter naming a hash it did not supply
|
|
19
|
+
* is asserting something no one can check, and accepting that claim is how a fabricated report
|
|
20
|
+
* would pass — the artifact has to hash to the thing it was cited as.
|
|
21
|
+
*
|
|
22
|
+
* Signature failures are provably invalid rather than indeterminate: nothing about a bad signature
|
|
23
|
+
* depends on what this verifier can see, so every honest verifier reaches the same conclusion. An
|
|
24
|
+
* artifact this verifier simply cannot see is the opposite case — `missing` marks it, and callers
|
|
25
|
+
* map it to indeterminate, because what a verifier failed to retain says nothing about a reporter.
|
|
26
|
+
* @param artifacts The artifacts supplied with the report, keyed by claimed hash
|
|
27
|
+
* @param referenced The hashes the report cited
|
|
28
|
+
* @returns The artifacts by recomputed hash, or why the citation failed
|
|
29
|
+
*/
|
|
30
|
+
export declare function verifyArtifacts(artifacts: ReadonlyMap<Hash, JsonObject>, referenced: readonly Hash[]): Promise<ArtifactCheck>;
|
|
31
|
+
/**
|
|
32
|
+
* Whether a signed reference points at this artifact.
|
|
33
|
+
*
|
|
34
|
+
* Signed documents reference each other by hash, but which form — data or meta-inclusive —
|
|
35
|
+
* depends on who wrote the reference. Both are recomputed from the artifact itself, so a match
|
|
36
|
+
* never rests on a hash the supplier merely claimed.
|
|
37
|
+
*/
|
|
38
|
+
export declare function referencesArtifact(reference: Hash | null | undefined, artifact: VerifiedArtifact): Promise<boolean>;
|
|
39
|
+
/** How the freshness gate resolved, and the anchors it measured between. */
|
|
40
|
+
export interface FreshnessResult {
|
|
41
|
+
/** EVM anchor at the offense. */
|
|
42
|
+
eOff?: number;
|
|
43
|
+
/** EVM anchor at submission. */
|
|
44
|
+
eSub?: number;
|
|
45
|
+
/** Why it concluded what it did. */
|
|
46
|
+
reason: string;
|
|
47
|
+
/** Set when the report cannot proceed. */
|
|
48
|
+
verdict?: OffenseVerdict;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Whether a report was filed while its offense was still fresh.
|
|
52
|
+
*
|
|
53
|
+
* Both ends are measured on the EVM clock rather than the chain's own, because the chain's clock
|
|
54
|
+
* is exactly what a misbehaving producer controls. Anchors are what a reporter cannot forge.
|
|
55
|
+
*
|
|
56
|
+
* An unresolvable anchor is indeterminate, not stale: a verifier that has pruned the history is
|
|
57
|
+
* making a statement about itself, not about the reporter.
|
|
58
|
+
* @param ctx What the verifier may consult
|
|
59
|
+
* @param request The report being checked
|
|
60
|
+
* @returns The measured anchors, and a verdict when the report cannot proceed
|
|
61
|
+
*/
|
|
62
|
+
export declare function freshnessGate(ctx: OffenseVerificationContext, request: SlashRequest): Promise<FreshnessResult>;
|
|
63
|
+
//# sourceMappingURL=preamble.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preamble.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/verify/preamble.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAGvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAA;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAGrE,6DAA6D;AAC7D,MAAM,MAAM,aAAa,GACnB;IAAE,MAAM,EAAE,GAAG,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;IAAC,EAAE,EAAE,IAAI,CAAA;CAAE,GACjD;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,WAAW,CAAC,IAAI,EAAE,UAAU,CAAC,EACxC,UAAU,EAAE,SAAS,IAAI,EAAE,GAC1B,OAAO,CAAC,aAAa,CAAC,CA0BxB;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,SAAS,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,EAAE,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,CAKzH;AAED,4EAA4E;AAC5E,MAAM,WAAW,eAAe;IAC9B,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,gCAAgC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAA;IACd,0CAA0C;IAC1C,OAAO,CAAC,EAAE,cAAc,CAAA;CACzB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,0BAA0B,EAC/B,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC,eAAe,CAAC,CAgC1B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { OffenseProcedure } from '../model/OffenseProcedure.js';
|
|
2
|
+
/**
|
|
3
|
+
* O1 — equivocation: signing two competing candidates for the same slot.
|
|
4
|
+
*
|
|
5
|
+
* Producing two blocks is not by itself misconduct. A producer whose candidate goes stale is
|
|
6
|
+
* expected to re-propose, and the honest way to do that is to say which candidate the new one
|
|
7
|
+
* replaces. What this procedure looks for is two candidates that compete without any such
|
|
8
|
+
* statement.
|
|
9
|
+
*
|
|
10
|
+
* It is deliberately self-contained: everything it needs is in the two artifacts, so it never
|
|
11
|
+
* returns indeterminate. Two verifiers holding the same pair always agree, which matters because
|
|
12
|
+
* this is the offense most likely to be reported by someone with a partial view of the chain.
|
|
13
|
+
*
|
|
14
|
+
* The accused's own defense — producing the missing link later — is not evaluated here. That
|
|
15
|
+
* arrives during the challenge window and is an adjudication-level `refuted`, not a reason for
|
|
16
|
+
* this procedure to withhold a verdict.
|
|
17
|
+
*/
|
|
18
|
+
export declare const verifyEquivocation: OffenseProcedure;
|
|
19
|
+
//# sourceMappingURL=verifyEquivocation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyEquivocation.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/verify/verifyEquivocation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAoB,MAAM,8BAA8B,CAAA;AActF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,kBAAkB,EAAE,gBAmDhC,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { OffenseProcedure } from '../model/OffenseProcedure.js';
|
|
2
|
+
/**
|
|
3
|
+
* O4 — false anchor: pointing a block at an EVM block that is not where it says it is.
|
|
4
|
+
*
|
|
5
|
+
* Two shapes, and they differ in what they cost to prove. An anchor that moves backwards is
|
|
6
|
+
* settled by the two blocks alone: the chain's anchor is required to be monotonic, so a child
|
|
7
|
+
* claiming an earlier height than its parent contradicts itself, and no external view is needed.
|
|
8
|
+
*
|
|
9
|
+
* The other shape — an anchor naming a hash the EVM never had at that height — needs the EVM
|
|
10
|
+
* itself, and it needs to have settled. Judging before the maturity depth has passed would let a
|
|
11
|
+
* reorg convict an honest producer for a block that was canonical when it anchored. Until then the
|
|
12
|
+
* answer is that it is too early to say, which is not the same as saying nothing happened.
|
|
13
|
+
*/
|
|
14
|
+
export declare const verifyFalseAnchor: OffenseProcedure;
|
|
15
|
+
//# sourceMappingURL=verifyFalseAnchor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyFalseAnchor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/verify/verifyFalseAnchor.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAoB,MAAM,8BAA8B,CAAA;AAmDtF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,EAAE,gBAmD/B,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { OffenseProcedure } from '../model/OffenseProcedure.js';
|
|
2
|
+
/**
|
|
3
|
+
* O7 — false attestation: signing an attestation for a step that says something else.
|
|
4
|
+
*
|
|
5
|
+
* Two branches, and the second one is weaker than the first on purpose.
|
|
6
|
+
*
|
|
7
|
+
* When the attested block is supplied, the question is closed: the block states its own step
|
|
8
|
+
* hashes, so an attestation naming a different one at the attested level contradicts a signed
|
|
9
|
+
* document and nothing external is needed. Self-contained claims are judged before any retention
|
|
10
|
+
* arithmetic — a contradiction between two supplied documents does not age out.
|
|
11
|
+
*
|
|
12
|
+
* When no block is supplied, the claim is that the attested block never existed. That is a claim
|
|
13
|
+
* about absence, and absence is exactly what a verifier with an incomplete view would also see.
|
|
14
|
+
* A verdict here is therefore marked provisional: it is enough to open the question, not to close
|
|
15
|
+
* it, and whoever adjudicates has to let the accused produce the block before acting.
|
|
16
|
+
*
|
|
17
|
+
* Past the retention window the absence claim is indeterminate rather than provisional. Once the
|
|
18
|
+
* chain no longer requires anyone to hold the block, absence stops being evidence of anything at
|
|
19
|
+
* all — treating it as proof would turn the retention policy into a conviction engine.
|
|
20
|
+
*/
|
|
21
|
+
export declare const verifyFalseAttestation: OffenseProcedure;
|
|
22
|
+
//# sourceMappingURL=verifyFalseAttestation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyFalseAttestation.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/verify/verifyFalseAttestation.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAoB,MAAM,8BAA8B,CAAA;AAqCtF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,sBAAsB,EAAE,gBA4DpC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { OffenseProcedure } from '../model/OffenseProcedure.js';
|
|
2
|
+
/**
|
|
3
|
+
* O5 — ineligible production: producing a block without the standing to produce it.
|
|
4
|
+
*
|
|
5
|
+
* The measurement point is recomputed from the two blocks' own signed anchors rather than taken
|
|
6
|
+
* from the report or from a live EVM head. That is what makes admission and after-the-fact
|
|
7
|
+
* verification ask the same question: a block that was admissible when it was produced must not
|
|
8
|
+
* become an offense later because stake moved in the meantime.
|
|
9
|
+
*
|
|
10
|
+
* Both halves of the predicate matter. Stake alone says an address *could* participate; the intent
|
|
11
|
+
* declaration is how it says it *is*. Seasoning is what stops standing being rented for a block.
|
|
12
|
+
*
|
|
13
|
+
* Everything here depends on external state — stake as it stood at an EVM height — so an
|
|
14
|
+
* unreadable snapshot is indeterminate. A verifier without that history has no opinion, and
|
|
15
|
+
* pretending otherwise would convict on the basis of not having looked.
|
|
16
|
+
*/
|
|
17
|
+
export declare const verifyIneligibleProduction: OffenseProcedure;
|
|
18
|
+
//# sourceMappingURL=verifyIneligibleProduction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyIneligibleProduction.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/verify/verifyIneligibleProduction.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAoB,MAAM,8BAA8B,CAAA;AAwCtF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,0BAA0B,EAAE,gBA+CxC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { OffenseProcedure } from '../model/OffenseProcedure.js';
|
|
2
|
+
/**
|
|
3
|
+
* O2 — invalid block: finalizing a block that breaks the rules in force at its height.
|
|
4
|
+
*
|
|
5
|
+
* Only rules that reproduce identically on every node are replayed. Admission gates are excluded
|
|
6
|
+
* by construction: whether a candidate was admitted depends on what a particular node had in its
|
|
7
|
+
* pool at a particular moment, so re-running one later would convict a producer for someone
|
|
8
|
+
* else's timing.
|
|
9
|
+
*
|
|
10
|
+
* Nothing the reporter supplied is trusted as state. The parent and the balances come from this
|
|
11
|
+
* verifier's own canonical history, because a report that carried its own version of history
|
|
12
|
+
* could prove anything it liked.
|
|
13
|
+
*
|
|
14
|
+
* An unresolvable parent is indeterminate rather than a finding. A verifier that has pruned past
|
|
15
|
+
* the offense knows nothing about the block — that is a fact about the verifier.
|
|
16
|
+
*/
|
|
17
|
+
export declare const verifyInvalidBlock: OffenseProcedure;
|
|
18
|
+
//# sourceMappingURL=verifyInvalidBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyInvalidBlock.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/verify/verifyInvalidBlock.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAoB,MAAM,8BAA8B,CAAA;AAgDtF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,EAAE,gBA0ChC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { OffenseCode } from '@xyo-network/xl1-sdk';
|
|
2
|
+
import type { OffenseProcedure } from '../model/OffenseProcedure.js';
|
|
3
|
+
/**
|
|
4
|
+
* Builds the invalid-slash-request procedure over a registry it resolves at call time.
|
|
5
|
+
*
|
|
6
|
+
* The registry is passed as a thunk rather than imported, because this procedure lives inside the
|
|
7
|
+
* same registry it needs. Deferring the lookup keeps that self-reference within one module instead
|
|
8
|
+
* of turning it into an import cycle between two.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createVerifyInvalidSlashRequest(resolve: () => Partial<Record<OffenseCode, OffenseProcedure>>): OffenseProcedure;
|
|
11
|
+
//# sourceMappingURL=verifyInvalidSlashRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyInvalidSlashRequest.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/verify/verifyInvalidSlashRequest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,sBAAsB,CAAA;AAIrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAYpE;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,GAC5D,gBAAgB,CAkFlB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { OffenseCode, SlashRequest } from '@xyo-network/xl1-sdk';
|
|
2
|
+
import type { OffenseProcedure } from '../model/OffenseProcedure.js';
|
|
3
|
+
import type { OffenseVerificationContext } from '../model/OffenseVerificationContext.js';
|
|
4
|
+
import type { OffenseVerdict } from '../model/VerificationOutcome.js';
|
|
5
|
+
/**
|
|
6
|
+
* The procedure for each offense class.
|
|
7
|
+
*
|
|
8
|
+
* Exported as a map so a class can be verified in isolation by conformance tests, and so the
|
|
9
|
+
* invalid-slash-request procedure can recurse back through it to re-run the report it is
|
|
10
|
+
* complaining about.
|
|
11
|
+
*/
|
|
12
|
+
export declare const offenseProcedures: Partial<Record<OffenseCode, OffenseProcedure>>;
|
|
13
|
+
/**
|
|
14
|
+
* Verifies one report, end to end.
|
|
15
|
+
*
|
|
16
|
+
* The shared preamble runs first for every class: cited artifacts are re-hashed and their
|
|
17
|
+
* signatures checked, then the offense is measured against the freshness window. Both are
|
|
18
|
+
* conditions no class can waive, so running them once here keeps a procedure from quietly
|
|
19
|
+
* skipping one.
|
|
20
|
+
*
|
|
21
|
+
* A class with no registered procedure is indeterminate rather than invalid. The register can
|
|
22
|
+
* activate a class this build does not implement, and refusing to conclude is the honest answer —
|
|
23
|
+
* concluding "not an offense" would let the gap read as an acquittal.
|
|
24
|
+
* @param ctx What the verifier may consult
|
|
25
|
+
* @param request The report being verified
|
|
26
|
+
* @returns The verdict, with its transcript
|
|
27
|
+
*/
|
|
28
|
+
export declare function verifyOffense(ctx: OffenseVerificationContext, request: SlashRequest): Promise<OffenseVerdict>;
|
|
29
|
+
//# sourceMappingURL=verifyOffense.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyOffense.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/verify/verifyOffense.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAErE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAA;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAWrE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAQ5E,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,0BAA0B,EAC/B,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC,cAAc,CAAC,CAwBzB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { OffenseProcedure } from '../model/OffenseProcedure.js';
|
|
2
|
+
/**
|
|
3
|
+
* O3 — reward overmint: paying yourself more than the rules allowed.
|
|
4
|
+
*
|
|
5
|
+
* The allowance is recomputed from the register rather than read from the block, since a block
|
|
6
|
+
* that could state its own allowance could authorise anything. Where the allowance comes from
|
|
7
|
+
* depends on how the chain is configured — a fixed schedule, or the staking contract — and when
|
|
8
|
+
* it comes from the contract it is read at the parent's anchor rather than at a live head, so
|
|
9
|
+
* every verifier asks the contract the same question.
|
|
10
|
+
*
|
|
11
|
+
* Minting is counted only from the zero address. A producer moving its own balance around is
|
|
12
|
+
* spending money that already existed, which is nobody's business but its own.
|
|
13
|
+
*
|
|
14
|
+
* Under-minting is not an offense here. A producer that pays itself less than it could has taken
|
|
15
|
+
* nothing from anyone, and treating generosity as misconduct would be absurd.
|
|
16
|
+
*
|
|
17
|
+
* Only the zero-address mint clause is implemented. The specification's fee-rule and step-transfer
|
|
18
|
+
* clauses wait on the deterministic fee replay and the step-boundary reader; until they land,
|
|
19
|
+
* reports alleging those shapes resolve on the mint clause alone — never as a conviction the
|
|
20
|
+
* missing clauses would have had to establish.
|
|
21
|
+
*/
|
|
22
|
+
export declare const verifyRewardOvermint: OffenseProcedure;
|
|
23
|
+
//# sourceMappingURL=verifyRewardOvermint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyRewardOvermint.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/verify/verifyRewardOvermint.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AA6BpE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,oBAAoB,EAAE,gBAuClC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Payload, WithHashMeta } from '@xyo-network/sdk';
|
|
2
|
+
import type { HydratedBlockWithHashMeta, TransactionBoundWitnessWithHashMeta } from '@xyo-network/xl1-sdk';
|
|
3
|
+
/**
|
|
4
|
+
* The transaction in this block that elevated the payload, when one did.
|
|
5
|
+
*
|
|
6
|
+
* A payload can also ride directly in the block, elevated by the block signer rather than by a
|
|
7
|
+
* transaction. Callers that need a signer to bind against must be able to tell the two apart,
|
|
8
|
+
* because those two paths attribute the payload to entirely different addresses.
|
|
9
|
+
* @param payload The payload being validated
|
|
10
|
+
* @param block The hydrated block carrying it
|
|
11
|
+
* @returns The elevating transaction, or undefined when the payload rode directly
|
|
12
|
+
*/
|
|
13
|
+
export declare function findElevatingTransaction(payload: WithHashMeta<Payload>, [, payloads]: HydratedBlockWithHashMeta): TransactionBoundWitnessWithHashMeta | undefined;
|
|
14
|
+
//# sourceMappingURL=findElevatingTransaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findElevatingTransaction.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/lib/findElevatingTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC7D,OAAO,KAAK,EAAE,yBAAyB,EAAE,mCAAmC,EAAE,MAAM,sBAAsB,CAAA;AAG1G;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,EAC9B,CAAC,EAAE,QAAQ,CAAC,EAAE,yBAAyB,GACtC,mCAAmC,GAAG,SAAS,CAIjD"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
export * from './findElevatingTransaction.js';
|
|
1
2
|
export * from './isElevatedFromBlock.js';
|
|
2
3
|
export * from './validateElevatedFromBlock.js';
|
|
3
4
|
export * from './validateElevatedFromTransaction.js';
|
|
4
5
|
export * from './validateIncludedInBlock.js';
|
|
6
|
+
export * from './validateSlashPayloadInBlock.js';
|
|
5
7
|
export * from './validateTransactionInBlock.js';
|
|
6
8
|
export * from './validateTypedPayloadInBlock.js';
|
|
7
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,sCAAsC,CAAA;AACpD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kCAAkC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,sCAAsC,CAAA;AACpD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kCAAkC,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { IdentityFunction } from '@ariestools/sdk';
|
|
2
|
+
import type { Payload, XyoAddress } from '@xyo-network/sdk';
|
|
3
|
+
import type { HydratedBlockWithHashMeta, InBlockPayloadValidationFunctionContext, InBlockRuleParams, TransactionBoundWitnessWithHashMeta } from '@xyo-network/xl1-sdk';
|
|
4
|
+
/** What the shared slash-payload checks concluded, plus the rules the caller still needs. */
|
|
5
|
+
export interface SlashPayloadGateResult {
|
|
6
|
+
/** Reasons the payload is not admissible; empty when the shared checks passed. */
|
|
7
|
+
errors: Error[];
|
|
8
|
+
/** The rules in force at the carrying height, when they resolved. */
|
|
9
|
+
params?: InBlockRuleParams;
|
|
10
|
+
/** The transaction that elevated the payload, once binding has confirmed it. */
|
|
11
|
+
transaction?: TransactionBoundWitnessWithHashMeta;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The checks every slash payload shares: the activation gate, then signer binding.
|
|
15
|
+
*
|
|
16
|
+
* Every slash payload is transaction-elevation-only. A payload riding directly in the block would
|
|
17
|
+
* bind to the block signer instead of a transaction sender, and nothing in the design says what
|
|
18
|
+
* that would mean — so that path is refused rather than guessed at. Binding `from` to the
|
|
19
|
+
* elevating transaction's sender gets self-signing discipline transitively, since the transaction
|
|
20
|
+
* validator has already tied `tx.from` to a verified bound-witness signer.
|
|
21
|
+
*
|
|
22
|
+
* The resolved rules come back so a caller can ask its own questions of them without resolving
|
|
23
|
+
* the register a second time, and so the gate stays the only place that decides admissibility.
|
|
24
|
+
* @param context The validation context, which may carry no register at all
|
|
25
|
+
* @param payload The payload being validated
|
|
26
|
+
* @param block The hydrated block carrying it
|
|
27
|
+
* @param identityFunction Guard establishing the payload is the type expected
|
|
28
|
+
* @param fromOf Reads the address the payload claims to be from
|
|
29
|
+
* @param subject What is being gated, named for the error message
|
|
30
|
+
* @returns The shared verdict and the rules in force
|
|
31
|
+
*/
|
|
32
|
+
export declare function validateSlashPayloadInBlock<T extends Payload>(context: InBlockPayloadValidationFunctionContext, payload: Payload, block: HydratedBlockWithHashMeta, identityFunction: IdentityFunction<T>, fromOf: (payload: T) => XyoAddress, subject: string): Promise<SlashPayloadGateResult>;
|
|
33
|
+
//# sourceMappingURL=validateSlashPayloadInBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateSlashPayloadInBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/lib/validateSlashPayloadInBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE3D,OAAO,KAAK,EACV,yBAAyB,EAAE,uCAAuC,EAAE,iBAAiB,EACrF,mCAAmC,EACpC,MAAM,sBAAsB,CAAA;AAK7B,6FAA6F;AAC7F,MAAM,WAAW,sBAAsB;IACrC,kFAAkF;IAClF,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,qEAAqE;IACrE,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,gFAAgF;IAChF,WAAW,CAAC,EAAE,mCAAmC,CAAA;CAClD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,2BAA2B,CAAC,CAAC,SAAS,OAAO,EACjE,OAAO,EAAE,uCAAuC,EAChD,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,yBAAyB,EAChC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACrC,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,UAAU,EAClC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,sBAAsB,CAAC,CAqBjC"}
|
|
@@ -4,6 +4,11 @@ export * from './validateBridgeSourceObservationInBlock.js';
|
|
|
4
4
|
export * from './validateChainStakeIntentInBlock.js';
|
|
5
5
|
export * from './validateHashInBlock.js';
|
|
6
6
|
export * from './validateSchemaInBlock.js';
|
|
7
|
+
export * from './validateSlashAdjudicationInBlock.js';
|
|
8
|
+
export * from './validateSlashChallengeInBlock.js';
|
|
9
|
+
export * from './validateSlashCommitInBlock.js';
|
|
10
|
+
export * from './validateSlashEvidenceInBlock.js';
|
|
11
|
+
export * from './validateSlashRequestInBlock.js';
|
|
7
12
|
export * from './validateTimeInBlock.js';
|
|
8
13
|
export * from './validateTransferInBlock.js';
|
|
9
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/payloads/index.ts"],"names":[],"mappings":"AAAA,cAAc,kDAAkD,CAAA;AAChE,cAAc,kCAAkC,CAAA;AAChD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,sCAAsC,CAAA;AACpD,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/payloads/index.ts"],"names":[],"mappings":"AAAA,cAAc,kDAAkD,CAAA;AAChE,cAAc,kCAAkC,CAAA;AAChD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,sCAAsC,CAAA;AACpD,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uCAAuC,CAAA;AACrD,cAAc,oCAAoC,CAAA;AAClD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,mCAAmC,CAAA;AACjD,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA"}
|