Skip to content

Commit d214f3f

Browse files
robinbryceRobin Brycehonourfish
authored
Dev/robin/8241 accumulator prove and verify (#22)
COSE Receipt MMRIVER draft alignment changes The primary change here is to make our consistency proofs and inclusion proofs work in terms of the accumulator defined in the paper referenced by the COSE Receipts MMRIVER [draft](https://www.ietf.org/archive/id/draft-bryce-cose-merkle-mountain-range-proofs-00.html). And generaly include full support for [COSE Recieipts](https://cose-wg.github.io/draft-ietf-cose-merkle-tree-proofs/draft-ietf-cose-merkle-tree-proofs.html) It also cleans up various algorithm implementations and checks that the draft algorithm implmentations and our go lang immplementation both meet the test vectors published by the draft. Because it remains useful to be able to do so, I have retained the original variants of algorithms that worked with mmr "bagged" peaks. Some algorithm implementations I think we can remove altogether, but in this pr have not been deleted. Instead they are used in tests which show the "old" versions match the "new" versions So in summary * <file>bagged.go means a file that has things only relevant for MMR bagged peaks * <file>old.go means a file that has things that are retained for compatibility testing but which are now "depricated" * <func>Bagged() means the function is only relevant for working with MMR bagged peaks * <func>Old() means the function is depricated, retained for compatibility testing * clean up proof generation and align with likely rfc alog destription * verification from generic accumulator proof, helpers and tests * simplification for AddHashedLeaf * test: add various tests showing alignment with the mmr draft * fix: log base 2 32 bit variant off by one * Pre-signed receipts attached as seal headers * Add guard to IndexProof where the requested index is greater than the MMRSize limit * mmrIndex vs mmrSize bug in BuildReceipt --------- Signed-off-by: robinbryce <[email protected]> Co-authored-by: Robin Bryce <[email protected]> Co-authored-by: Joe Gough <[email protected]>
1 parent ca5d457 commit d214f3f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+4002
-1630
lines changed

massifs/go.mod

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,71 +2,63 @@ module github.com/datatrails/go-datatrails-merklelog/massifs
22

33
go 1.22
44

5+
replace github.com/datatrails/go-datatrails-merklelog/mmr => ../mmr
6+
57
require (
68
github.com/datatrails/go-datatrails-merklelog/mmr v0.0.2
79
github.com/datatrails/go-datatrails-merklelog/mmrtesting v0.1.0
810
)
911

1012
require (
1113
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1
12-
github.com/datatrails/go-datatrails-common v0.15.1
14+
github.com/datatrails/go-datatrails-common v0.18.0
1315
github.com/google/uuid v1.6.0
1416
github.com/stretchr/testify v1.9.0
1517
github.com/veraison/go-cose v1.1.0
1618
)
1719

1820
require (
1921
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect
20-
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 // indirect
21-
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 // indirect
22-
github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.4.0 // indirect
23-
github.com/Azure/go-amqp v1.0.0 // indirect
22+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 // indirect
23+
github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0 // indirect
24+
github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.7.1 // indirect
25+
github.com/Azure/go-amqp v1.0.5 // indirect
2426
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
2527
github.com/Azure/go-autorest/autorest v0.11.29 // indirect
26-
github.com/Azure/go-autorest/autorest/adal v0.9.22 // indirect
27-
github.com/Azure/go-autorest/autorest/azure/auth v0.5.12 // indirect
28-
github.com/Azure/go-autorest/autorest/azure/cli v0.4.5 // indirect
28+
github.com/Azure/go-autorest/autorest/adal v0.9.24 // indirect
29+
github.com/Azure/go-autorest/autorest/azure/auth v0.5.13 // indirect
30+
github.com/Azure/go-autorest/autorest/azure/cli v0.4.6 // indirect
2931
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
3032
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
3133
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
3234
github.com/Azure/go-autorest/logger v0.2.1 // indirect
3335
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
34-
github.com/KimMachineGun/automemlimit v0.3.0 // indirect
35-
github.com/cilium/ebpf v0.12.3 // indirect
36-
github.com/containerd/cgroups/v3 v3.0.2 // indirect
37-
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
3836
github.com/davecgh/go-spew v1.1.1 // indirect
3937
github.com/dimchansky/utfbom v1.1.1 // indirect
40-
github.com/docker/go-units v0.5.0 // indirect
41-
github.com/fxamacker/cbor/v2 v2.5.0 // indirect
42-
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
43-
github.com/godbus/dbus/v5 v5.1.0 // indirect
38+
github.com/fxamacker/cbor v1.5.1
39+
github.com/fxamacker/cbor/v2 v2.6.0 // indirect
40+
github.com/gabriel-vasile/mimetype v1.4.4 // indirect
4441
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
45-
github.com/golang/protobuf v1.5.3 // indirect
46-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect
42+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
4743
github.com/ldclabs/cose/go v0.0.0-20221214142927-d22c1cfc2154 // indirect
4844
github.com/mitchellh/go-homedir v1.1.0 // indirect
49-
github.com/opencontainers/runtime-spec v1.1.0 // indirect
5045
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 // indirect
5146
github.com/opentracing-contrib/go-stdlib v1.0.0 // indirect
5247
github.com/opentracing/opentracing-go v1.2.0 // indirect
5348
github.com/openzipkin-contrib/zipkin-go-opentracing v0.5.0 // indirect
54-
github.com/openzipkin/zipkin-go v0.4.2 // indirect
49+
github.com/openzipkin/zipkin-go v0.4.3 // indirect
5550
github.com/pmezard/go-difflib v1.0.0 // indirect
56-
github.com/sirupsen/logrus v1.9.3 // indirect
5751
github.com/stretchr/objx v0.5.2 // indirect
5852
github.com/x448/float16 v0.8.4 // indirect
59-
go.uber.org/automaxprocs v1.5.3 // indirect
6053
go.uber.org/multierr v1.11.0 // indirect
61-
go.uber.org/zap v1.26.0 // indirect
62-
golang.org/x/crypto v0.21.0 // indirect
63-
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
64-
golang.org/x/net v0.21.0 // indirect
65-
golang.org/x/sys v0.18.0 // indirect
66-
golang.org/x/text v0.14.0 // indirect
67-
google.golang.org/genproto/googleapis/api v0.0.0-20231127180814-3a041ad873d4 // indirect
68-
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
69-
google.golang.org/grpc v1.59.0 // indirect
70-
google.golang.org/protobuf v1.31.0 // indirect
54+
go.uber.org/zap v1.27.0 // indirect
55+
golang.org/x/crypto v0.25.0 // indirect
56+
golang.org/x/net v0.27.0 // indirect
57+
golang.org/x/sys v0.22.0 // indirect
58+
golang.org/x/text v0.16.0 // indirect
59+
google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect
60+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect
61+
google.golang.org/grpc v1.65.0 // indirect
62+
google.golang.org/protobuf v1.34.2 // indirect
7163
gopkg.in/yaml.v3 v3.0.1 // indirect
7264
)

0 commit comments

Comments
 (0)