Skip to content

Commit

Permalink
fixup readme and task runes
Browse files Browse the repository at this point in the history
  • Loading branch information
jgough committed May 30, 2024
1 parent 8e28942 commit 3b63c63
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 3 deletions.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,42 @@ If you want to run the demo directly with golang from the root of the repo:
```
cd integrity
go run .
```

## Completeness Demo

The completenesss demo will verify the integrity of a list of datatrails events.

This is achieved by checking that ONLY the events in the list exist on the log within a range
starting from the first event ending at the last event in the list.

Every event in the list then has an inclusion proof generated.

If all the inclusion proofs are verified successfully, we can say that the list of
datatrails events is complete and all are included on the merkle log.

### Docker Demo
To run the completeness demo with docker:

```
docker run -v ./completeness:/usr/src/myapp -w /usr/src/myapp golang:1.22-alpine go run .
```

Where the docker command is run from the root of the repo.

### Task Demo

To run the demo with a task (https://taskfile.dev/installation/) rune:

```
task demos:completeness
```

### Go Demo

If you want to run the demo directly with golang from the root of the repo:

```
cd completeness
go run .
```
2 changes: 1 addition & 1 deletion completeness/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.22

require (
github.com/datatrails/go-datatrails-common v0.16.1
github.com/datatrails/go-datatrails-demos/logverification v0.0.3-0.20240530102756-109763df17b4
github.com/datatrails/go-datatrails-demos/logverification v0.0.3-0.20240530114926-8e28942cc526
github.com/stretchr/testify v1.9.0
)

Expand Down
4 changes: 2 additions & 2 deletions completeness/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ github.com/datatrails/go-datatrails-common v0.16.1 h1:kaNOwyu8EmBbIR44daWDiUZxBt
github.com/datatrails/go-datatrails-common v0.16.1/go.mod h1:IEcuwUaFl+bI1tt30r+Ov2+nvpcAZH/kXmAPGFjkwT4=
github.com/datatrails/go-datatrails-common-api-gen v0.4.8 h1:IzrhGHi9TyEASjk06QjsayjtpXYCKuDt78+ffLuOCNM=
github.com/datatrails/go-datatrails-common-api-gen v0.4.8/go.mod h1:zlwFPJXYAK7yqgLtxKUgkF5gw9ddxoqWS+Ruhf+Ksw0=
github.com/datatrails/go-datatrails-demos/logverification v0.0.3-0.20240530102756-109763df17b4 h1:f8c13P302U0EA54FOQKMijUv7j8HuUMb5ohXByaSQIs=
github.com/datatrails/go-datatrails-demos/logverification v0.0.3-0.20240530102756-109763df17b4/go.mod h1:5uMSYrfH8l3RNtiu934BXhwym9TorhSp375O188MJrM=
github.com/datatrails/go-datatrails-demos/logverification v0.0.3-0.20240530114926-8e28942cc526 h1:S3/QdoZZsf+Q0fFGTPw+AL6ezHry0tsoL1ce+Mmbq8w=
github.com/datatrails/go-datatrails-demos/logverification v0.0.3-0.20240530114926-8e28942cc526/go.mod h1:5uMSYrfH8l3RNtiu934BXhwym9TorhSp375O188MJrM=
github.com/datatrails/go-datatrails-merklelog/massifs v0.0.5 h1:HfOvtpydHxFeBs3CMLVn4tliHrxfusI5cX8n/y23lYI=
github.com/datatrails/go-datatrails-merklelog/massifs v0.0.5/go.mod h1:9gVKGJXWmQru2TlWF7Ho+jVCQRJTZKoT2L7Lda1batI=
github.com/datatrails/go-datatrails-merklelog/mmr v0.0.1 h1:XggMVejsJ72cAL/msjPhQUSQNeElSh/O1zZcvX4d4JU=
Expand Down
8 changes: 8 additions & 0 deletions taskfiles/Taskfile_demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ tasks:
integrity:
desc: "run the intgrity demo"
dir: ../integrity
cmds:
- cmd: |
go run .
completeness:
desc: "run the completeness demo"
dir: ../completeness
cmds:
- cmd: |
Expand Down

0 comments on commit 3b63c63

Please sign in to comment.