Skip to content

Commit

Permalink
Merge pull request #76 from usbarmory/follow_serverless
Browse files Browse the repository at this point in the history
Follow serverless
  • Loading branch information
andrejro authored Oct 11, 2023
2 parents caefad2 + 51a283e commit 3d6806e
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 1,259 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golang_lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.48
version: v1.54.2
2 changes: 1 addition & 1 deletion .github/workflows/leaves_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

- name: Leaf validator step
id: leaf_validator
uses: google/trillian-examples/serverless/deploy/github/log/leaf_validator@master
uses: transparency-dev/serverless-log/deploy/github/log/leaf_validator@main
with:
log_dir: './log'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push_to_master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v2
- name: Sequence and integrate step
id: sequence_and_integrate
uses: google/trillian-examples/serverless/deploy/github/log/sequence_and_integrate@master
uses: transparency-dev/serverless-log/deploy/github/log/sequence_and_integrate@main
with:
log_dir: './log'
origin: 'Armory Drive Prod 2'
Expand Down
4 changes: 2 additions & 2 deletions cmd/create_proofbundle/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import (
"time"

"github.com/golang/glog"
"github.com/google/trillian-examples/serverless/client"
"github.com/transparency-dev/merkle/proof"
"github.com/transparency-dev/merkle/rfc6962"
"github.com/transparency-dev/serverless-log/client"
"github.com/usbarmory/armory-drive-log/api"
"golang.org/x/mod/sumdb/note"
)
Expand Down Expand Up @@ -122,7 +122,7 @@ func createBundle(ctx context.Context, logURL string, release []byte, lSigV note
return nil, ctx.Err()
}

if err := st.Update(ctx); err != nil {
if _, _, _, err := st.Update(ctx); err != nil {
return nil, fmt.Errorf("failed to update LogState: %v", err)
}
cp := st.LatestConsistent
Expand Down
7 changes: 4 additions & 3 deletions cmd/monitor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ import (
"time"

"github.com/golang/glog"
"github.com/google/trillian-examples/serverless/client"
"github.com/transparency-dev/merkle/proof"
"github.com/transparency-dev/merkle/rfc6962"
"github.com/transparency-dev/serverless-log/client"
"github.com/usbarmory/armory-drive-log/api"
"github.com/usbarmory/armory-drive-log/keys"
"golang.org/x/mod/sumdb/note"
Expand Down Expand Up @@ -91,7 +92,7 @@ func main() {
defer ticker.Stop()
for {
lastHead := st.LatestConsistent.Size
if err := st.Update(ctx); err != nil {
if _, _, _, err := st.Update(ctx); err != nil {
glog.Exitf("Failed to update checkpoint: %q", err)
}
if st.LatestConsistent.Size > lastHead {
Expand Down Expand Up @@ -140,7 +141,7 @@ func (m *Monitor) From(ctx context.Context, start uint64) error {
return fmt.Errorf("failed to get inclusion proof for index %d: %v", i, err)
}

if err := m.st.Verifier.VerifyInclusionProof(int64(i), int64(fromCP.Size), ip, fromCP.Hash, hash); err != nil {
if err := proof.VerifyInclusion(m.st.Hasher, i, fromCP.Size, hash, ip, fromCP.Hash); err != nil {
return fmt.Errorf("VerifyInclusionProof() %d: %v", i, err)
}

Expand Down
10 changes: 4 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ go 1.16

require (
github.com/golang/glog v0.0.0-20210429001901-424d2337a529
github.com/google/go-cmp v0.5.6
github.com/google/trillian v1.3.14-0.20210902135231-6ff130e23e0c // indirect
github.com/google/trillian-examples v0.0.0-20210909165703-c62749b7931e
github.com/transparency-dev/merkle v0.0.1
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
golang.org/x/mod v0.5.0
github.com/google/go-cmp v0.5.9
github.com/transparency-dev/merkle v0.0.2
github.com/transparency-dev/serverless-log v0.0.0-20230928095427-7971d931e8f5
golang.org/x/mod v0.12.0
)
1,268 changes: 23 additions & 1,245 deletions go.sum

Large diffs are not rendered by default.

0 comments on commit 3d6806e

Please sign in to comment.