feat: canonical Sidetree v1 protocol-parameter table + CI (closes #30)#34
Merged
Conversation
Adds params.go with the verbatim Sidetree v1 protocol parameters from the reference implementation (decentralized-identity/sidetree v1.0.6 protocol-parameters.json + Operation.ts + spec), the single source of truth for reader enforcement and writer pre-flight: MaxOperationsPerBatch = 10000 (hard per-anchor ceiling) MaxNumberOfOperationsForNoValueTimeLock=100 (the consensus-critical no-lock cap) NormalizedFeeToPerOperationFeeMultiplier = 0.001 ValueTimeLockAmountMultiplier = 60000 MaxDeltaSizeInBytes=1000, MaxCASURILength=100, MaxEncodedRevealValueLength=50, MaxWriterLockIDInBytes=200 file caps: core 1MB / provisional 1MB / proof 2.5MB (shared) / chunk 10MB MaxMemoryDecompressionFactor=3 per-block: 300 transactions / 600000 operations SHA256MultihashCode=18 These were ignored entirely (no constants existed in this repo); subsequent PRs wire them into the reader (#28/#29 op-limit, #31/#32 caps) so our resolved DID state stops diverging from canonical ION on >100-op / oversized anchors. Also adds .github/workflows/ci.yml (gofmt + vet + build + race tests + coverage) — this repo had no CI. params_test.go pins the consensus-critical values so a change to them is deliberate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #30. Adds
params.go— the verbatim Sidetree v1 protocol parameters from the reference implementation (decentralized-identity/sidetreev1.0.6protocol-parameters.json+Operation.ts+ spec) as the single source of truth for reader enforcement and writer pre-flight. This repo previously had no constants at all, and the consensus-critical100no-lock op limit appeared nowhere.Key values (all pinned by
params_test.go):MaxOperationsPerBatch = 10000(hard per-anchor ceiling)MaxNumberOfOperationsForNoValueTimeLock = 100(the consensus-critical no-lock cap — ION mainnet runs lock-disabled, so every canonical anchor is ≤100 ops)NormalizedFeeToPerOperationFeeMultiplier = 0.001,ValueTimeLockAmountMultiplier = 60000MaxDeltaSizeInBytes=1000,MaxCASURILength=100,MaxEncodedRevealValueLength=50,MaxWriterLockIDInBytes=200MaxMemoryDecompressionFactor=3SHA256MultihashCode=18Subsequent PRs wire these into the reader (#28/#29 op-limit enforcement, #31/#32 size/field caps) so our resolved DID state stops diverging from canonical ION.
Also adds
.github/workflows/ci.yml(gofmt + vet + build +test -race+ coverage) — this repo had no CI, so this gates this and every following PR.Testing
params_test.gopins the consensus-critical values (a deliberate-change guard).go build/vet/test -racegreen; additive (no behavior change yet).Post-Deploy Monitoring & Validation
No additional operational monitoring required: pure constants + CI; no runtime behavior change until the enforcement PRs land.
🤖 Generated with Claude Code