Initial implementation of the DateKeys Protocol v0.8.1
Reference implementation in Go, built from the implementation plan
(milestones M0 to M5): datekey, profile, provider, codec, agewrap,
extension, capsule, accesskey, the datekeys CLI, official vectors and
fixtures, the mutation corpus, fuzz targets, interop and live tests,
CI workflows, traceability and policy documents.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 weeks ago
|
|
|
//go:build integration
|
|
|
|
|
|
|
|
|
|
package drand_test
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"bytes"
|
|
|
|
|
"context"
|
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
|
|
"g.activething.com/go/DateKeys/internal/testkit"
|
|
|
|
|
"g.activething.com/go/DateKeys/profile"
|
|
|
|
|
"g.activething.com/go/DateKeys/provider"
|
|
|
|
|
"g.activething.com/go/DateKeys/provider/drand"
|
Initial implementation of the DateKeys Protocol v0.8.1
Reference implementation in Go, built from the implementation plan
(milestones M0 to M5): datekey, profile, provider, codec, agewrap,
extension, capsule, accesskey, the datekeys CLI, official vectors and
fixtures, the mutation corpus, fuzz targets, interop and live tests,
CI workflows, traceability and policy documents.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 weeks ago
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Every default relay serves the same, locally verified release.
|
|
|
|
|
func TestLiveRelays(t *testing.T) {
|
|
|
|
|
p := profile.Quicknet()
|
|
|
|
|
for _, relay := range drand.DefaultRelays() {
|
|
|
|
|
for _, round := range testkit.Rounds {
|
|
|
|
|
rel, err := drand.New(relay).Fetch(context.Background(), p, provider.Condition{Round: round})
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("%s round %d: %v", relay, round, err)
|
|
|
|
|
}
|
|
|
|
|
if !bytes.Equal(rel.Signature, testkit.Release(round).Signature) {
|
|
|
|
|
t.Fatalf("%s round %d: unexpected signature", relay, round)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|