@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,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
|
package/dist/browser/modules/validation/elevatedPayload/lib/validateSlashPayloadInBlock.d.ts.map
ADDED
|
@@ -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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { InBlockPayloadValidationFunction } from '@xyo-network/xl1-sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a slash adjudication carried in a block.
|
|
4
|
+
*
|
|
5
|
+
* Only the arbiter named by the register may close a report, and that binding survives well past
|
|
6
|
+
* the point where reporting itself opens up — an adjudication from anyone else is not a minority
|
|
7
|
+
* opinion, it is a forged verdict.
|
|
8
|
+
*
|
|
9
|
+
* Whether a confirmed adjudication names its claimant is an arbiter duty checked when the
|
|
10
|
+
* adjudication is recomputed, not a question of block validity. A block carrying a sloppy but
|
|
11
|
+
* genuine verdict is still a valid block.
|
|
12
|
+
*/
|
|
13
|
+
export declare const validateSlashAdjudicationInBlock: InBlockPayloadValidationFunction;
|
|
14
|
+
//# sourceMappingURL=validateSlashAdjudicationInBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateSlashAdjudicationInBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/payloads/validateSlashAdjudicationInBlock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA;AAK5E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gCAAgC,EAAE,gCAyB9C,CAAA"}
|
package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashChallengeInBlock.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { InBlockPayloadValidationFunction } from '@xyo-network/xl1-sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a slash challenge carried in a block.
|
|
4
|
+
*
|
|
5
|
+
* Anyone may challenge and no bond is required, because a challenge can only exculpate. A
|
|
6
|
+
* frivolous one fails to change the verdict and costs its filer the fee; there is no version of it
|
|
7
|
+
* that harms the accused, so there is nothing here to deter.
|
|
8
|
+
*/
|
|
9
|
+
export declare const validateSlashChallengeInBlock: InBlockPayloadValidationFunction;
|
|
10
|
+
//# sourceMappingURL=validateSlashChallengeInBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateSlashChallengeInBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/payloads/validateSlashChallengeInBlock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA;AAK5E;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,EAAE,gCAqB3C,CAAA"}
|
package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashCommitInBlock.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { InBlockPayloadValidationFunction } from '@xyo-network/xl1-sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a slash commitment carried in a block.
|
|
4
|
+
*
|
|
5
|
+
* A commitment reserves a report before its evidence is public, which is what stops a reporter's
|
|
6
|
+
* work from being lifted from the mempool and re-filed under someone else's name. The commitment
|
|
7
|
+
* itself is opaque here by design — checking what it hides is the reveal's job.
|
|
8
|
+
*/
|
|
9
|
+
export declare const validateSlashCommitInBlock: InBlockPayloadValidationFunction;
|
|
10
|
+
//# sourceMappingURL=validateSlashCommitInBlock.d.ts.map
|
package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashCommitInBlock.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateSlashCommitInBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/payloads/validateSlashCommitInBlock.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gCAAgC,EAEjC,MAAM,sBAAsB,CAAA;AAsC7B;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,EAAE,gCAwCxC,CAAA"}
|
package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashEvidenceInBlock.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { InBlockPayloadValidationFunction } from '@xyo-network/xl1-sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a slash evidence carried in a block.
|
|
4
|
+
*
|
|
5
|
+
* A container carries artifacts and asserts nothing about them, so past the activation gate and
|
|
6
|
+
* signer binding there is nothing left to check. No size ceiling is imposed: character storage is
|
|
7
|
+
* already priced by gas, so an oversized container costs its sender what it costs the chain.
|
|
8
|
+
*/
|
|
9
|
+
export declare const validateSlashEvidenceInBlock: InBlockPayloadValidationFunction;
|
|
10
|
+
//# sourceMappingURL=validateSlashEvidenceInBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateSlashEvidenceInBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/payloads/validateSlashEvidenceInBlock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA;AAK5E;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,EAAE,gCAqB1C,CAAA"}
|
package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashRequestInBlock.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { InBlockPayloadValidationFunction } from '@xyo-network/xl1-sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a slash request carried in a block.
|
|
4
|
+
*
|
|
5
|
+
* A request is a recordable transaction, not a verdict, so this checks that it is well-formed and
|
|
6
|
+
* that its evidence exists — never whether the accusation is true. An unverifiable request is
|
|
7
|
+
* still a valid request; deciding it is the arbiter's job.
|
|
8
|
+
*
|
|
9
|
+
* The reportable gate is asked of the height the offense happened at, not the height the report
|
|
10
|
+
* lands at. Comparing against the carrying height would make a rule retroactive and turn conduct
|
|
11
|
+
* that was legal when it occurred into an offense.
|
|
12
|
+
*/
|
|
13
|
+
export declare const validateSlashRequestInBlock: InBlockPayloadValidationFunction;
|
|
14
|
+
//# sourceMappingURL=validateSlashRequestInBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateSlashRequestInBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/payloads/validateSlashRequestInBlock.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gCAAgC,EAEjC,MAAM,sBAAsB,CAAA;AA8D7B;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2BAA2B,EAAE,gCAqCzC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validatePayloadInBlock.d.ts","sourceRoot":"","sources":["../../../../../src/modules/validation/elevatedPayload/validatePayloadInBlock.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"validatePayloadInBlock.d.ts","sourceRoot":"","sources":["../../../../../src/modules/validation/elevatedPayload/validatePayloadInBlock.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA;AAiC5E,eAAO,MAAM,sBAAsB,EAAE,gCAwBpC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slashing.d.ts","sourceRoot":"","sources":["../../src/slashing.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAA"}
|
package/dist/neutral/analyze.mjs
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
// src/modules/analyze/admission.ts
|
|
2
|
+
var AdmissionModes = ["allowlist", "shadow", "enforce"];
|
|
3
|
+
var AdmissionShadowPublishRunnerMoniker = "AdmissionShadowPublishRunner";
|
|
4
|
+
function isAdmissionShadowPublishRunner(value) {
|
|
5
|
+
return typeof value?.publish === "function";
|
|
6
|
+
}
|
|
7
|
+
function isDivergent(assessment) {
|
|
8
|
+
if (!assessment.eligibility.resolvable) return false;
|
|
9
|
+
return assessment.admittedByAllowList !== (assessment.eligibility.eligible === true);
|
|
10
|
+
}
|
|
11
|
+
|
|
1
12
|
// src/modules/analyze/analyzeChain.ts
|
|
2
13
|
import {
|
|
3
14
|
assertEx,
|
|
@@ -165,12 +176,14 @@ import {
|
|
|
165
176
|
getWindowedChain
|
|
166
177
|
} from "@xyo-network/xl1-sdk";
|
|
167
178
|
var ChainHeadSelector = class extends ChainFinalizer {
|
|
179
|
+
admission;
|
|
168
180
|
allowedProducers;
|
|
169
181
|
backoffMs;
|
|
170
182
|
minCandidates;
|
|
171
183
|
_timeSinceLastUncle = Date.now();
|
|
172
184
|
constructor(params) {
|
|
173
185
|
super(params);
|
|
186
|
+
this.admission = params.admission ?? "allowlist";
|
|
174
187
|
this.allowedProducers = params.allowedProducers;
|
|
175
188
|
this.backoffMs = params.backoffMs;
|
|
176
189
|
this.minCandidates = params.minCandidates;
|
|
@@ -184,13 +197,78 @@ var ChainHeadSelector = class extends ChainFinalizer {
|
|
|
184
197
|
async findBestHead() {
|
|
185
198
|
return await spanRootAsync2("findBestHead", async () => {
|
|
186
199
|
const allProposedBlocks = await this.mempoolViewer.pendingBlocks();
|
|
187
|
-
const
|
|
188
|
-
const proposedBlocks =
|
|
200
|
+
const allowed = allProposedBlocks.filter((pb) => this.isAllowed(pb));
|
|
201
|
+
const proposedBlocks = await this.admit(allProposedBlocks, allowed);
|
|
189
202
|
this.windowedFinalizedChain = await getWindowedChain(this.context, this.blockViewer, this.maxWindowSize, this.windowedFinalizedChain);
|
|
190
203
|
const uncles = findUncles(this.context, this.windowedFinalizedChain, proposedBlocks);
|
|
191
204
|
return findBestUncle(this.windowedFinalizedChain, uncles, { backoffMs: this.backoffMs, minCandidates: this.minCandidates }) ?? this.windowedFinalizedChain;
|
|
192
205
|
}, this.context);
|
|
193
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* Applies the configured admission posture.
|
|
209
|
+
*
|
|
210
|
+
* In `shadow` the allow-list still decides — participation is computed and published beside it,
|
|
211
|
+
* and changes nothing. That is the entire value of the posture: the network keeps behaving
|
|
212
|
+
* exactly as it did while everyone gets to see what the new rule would have done.
|
|
213
|
+
*
|
|
214
|
+
* In `enforce` participation gates, but only when it reached a conclusion. A candidate whose
|
|
215
|
+
* standing cannot be established is admitted, not rejected — otherwise a finalizer that lost
|
|
216
|
+
* its stake reader would quietly stop accepting anyone's blocks and stall the chain.
|
|
217
|
+
*
|
|
218
|
+
* Assessments publish in both postures. The audit trail must not disappear at the moment
|
|
219
|
+
* admission starts gating — enforce is when it matters most.
|
|
220
|
+
*/
|
|
221
|
+
async admit(all, allowed) {
|
|
222
|
+
if (this.admission === "allowlist" || this.params.eligibility === void 0) return allowed;
|
|
223
|
+
const assessments = await this.assess(all);
|
|
224
|
+
await this.publishShadow(assessments);
|
|
225
|
+
if (this.admission === "shadow") return allowed;
|
|
226
|
+
const ineligible = new Set(assessments.filter((assessment) => assessment.eligibility.resolvable && assessment.eligibility.eligible !== true).map((assessment) => assessment.dataHash));
|
|
227
|
+
return allowed.filter((candidate) => !ineligible.has(candidate[0]._dataHash));
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Runs both gates over every candidate.
|
|
231
|
+
*
|
|
232
|
+
* An evaluator that throws yields an unresolvable assessment rather than an exception: this
|
|
233
|
+
* sits on the head-selection path, and a flaky stake reader must never be able to stop the
|
|
234
|
+
* chain from finalizing.
|
|
235
|
+
*/
|
|
236
|
+
async assess(all) {
|
|
237
|
+
const evaluate = this.params.eligibility;
|
|
238
|
+
if (evaluate === void 0) return [];
|
|
239
|
+
const evaluateSafely = async (candidate) => {
|
|
240
|
+
try {
|
|
241
|
+
return await evaluate(candidate);
|
|
242
|
+
} catch {
|
|
243
|
+
return { resolvable: false };
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
return await Promise.all(all.map(async (candidate) => ({
|
|
247
|
+
admittedByAllowList: this.isAllowed(candidate),
|
|
248
|
+
block: candidate[0].block,
|
|
249
|
+
dataHash: candidate[0]._dataHash,
|
|
250
|
+
eligibility: await evaluateSafely(candidate),
|
|
251
|
+
producer: candidate[0].addresses[0]
|
|
252
|
+
})));
|
|
253
|
+
}
|
|
254
|
+
/** Whether the configured allow-list admits a candidate. An empty list admits everyone. */
|
|
255
|
+
isAllowed(candidate) {
|
|
256
|
+
const allowedProducers = this.allowedProducers;
|
|
257
|
+
return isDefined2(allowedProducers) && allowedProducers.length > 0 ? allowedProducers.includes(toAddress2(candidate[0].addresses[0])) : true;
|
|
258
|
+
}
|
|
259
|
+
/** Publishes what the two gates concluded, swallowing failures. */
|
|
260
|
+
async publishShadow(assessments) {
|
|
261
|
+
const publish = this.params.publishAdmissionShadow;
|
|
262
|
+
if (publish === void 0 || assessments.length === 0) return;
|
|
263
|
+
try {
|
|
264
|
+
await publish({
|
|
265
|
+
assessments,
|
|
266
|
+
divergent: assessments.filter((assessment) => isDivergent(assessment)),
|
|
267
|
+
head: this.windowedFinalizedChain[0]?.[0]?.block ?? 0
|
|
268
|
+
});
|
|
269
|
+
} catch {
|
|
270
|
+
}
|
|
271
|
+
}
|
|
194
272
|
};
|
|
195
273
|
|
|
196
274
|
// src/modules/analyze/producer/ChainProducersAnalyzer.ts
|
|
@@ -364,6 +442,8 @@ var TransferAnalyzer = class {
|
|
|
364
442
|
}
|
|
365
443
|
};
|
|
366
444
|
export {
|
|
445
|
+
AdmissionModes,
|
|
446
|
+
AdmissionShadowPublishRunnerMoniker,
|
|
367
447
|
BalanceAnalyzer,
|
|
368
448
|
ChainFinalizer,
|
|
369
449
|
ChainHeadSelector,
|
|
@@ -375,9 +455,11 @@ export {
|
|
|
375
455
|
ChainSummaryTransfersSchema,
|
|
376
456
|
TransferAnalyzer,
|
|
377
457
|
analyzeChain,
|
|
458
|
+
isAdmissionShadowPublishRunner,
|
|
378
459
|
isChainSummaryBalances,
|
|
379
460
|
isChainSummaryProducers,
|
|
380
461
|
isChainSummaryStakeIntent,
|
|
381
|
-
isChainSummaryTransfers
|
|
462
|
+
isChainSummaryTransfers,
|
|
463
|
+
isDivergent
|
|
382
464
|
};
|
|
383
465
|
//# sourceMappingURL=analyze.mjs.map
|