Skip to content

Commit 35015e9

Browse files
louisingeraltafan
andauthored
Blind outputs with blinders (#152)
* export Blinder * Blind with blinders * MakeFile * blindreissuance test does not pass * WIP - blind outputs * disable caching in make test * random generator inside outputs loop * use BlindingData struct instead of pointers * log * add ci.yml * name in blinder.go * does not crawl all outputs when set the commitments/nonce * use make test in travis.yml * Sort ouput indexes before blinding * blinder factory using outputs to pub key map * add test case 1 conf output + 1 unconf output * export Blinder struct * drop NewBlinderByIndex * NewBlinderByIndex = NewBlinder Co-authored-by: altafan <pietro@vulpem.com>
1 parent 9656b2c commit 35015e9

8 files changed

Lines changed: 773 additions & 160 deletions

File tree

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Go
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
integration:
11+
name: Integration Tests
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Set up Go 1.14.x
15+
uses: actions/setup-go@v2
16+
with:
17+
go-version: ^1.14
18+
id: go
19+
20+
- name: Check out code into the Go module directory
21+
uses: actions/checkout@v2
22+
23+
- name: Install Nigiri
24+
run: |
25+
mkdir ~/.nigiri; cd ~/.nigiri
26+
curl https://travis.nigiri.network | bash; cd
27+
docker-compose -f ~/.nigiri/docker-compose.yml up -d
28+
29+
- name: Get dependencies
30+
run: go get -v -t -d ./...
31+
32+
- name: Test
33+
run: make test

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ env:
1717

1818
script:
1919
- if [ -n "$(gofmt -l .)" ]; then echo "Go code is not formatted"; exit 1; fi
20-
- go test -count=1 -race ./... -v
20+
- make test
2121

2222
after_script:
2323
- docker-compose -f tmp/docker-compose.yml down && rm -rf tmp

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## help: prints this help message
2+
help:
3+
@echo "Usage: \n"
4+
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
5+
6+
test:
7+
export API_URL=http://localhost:3001; \
8+
go test -count=1 -v ./...

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ $ go get -t -v ./...
7474

7575
```
7676
$ nigiri start --liquid
77-
$ export API_URL=http://localhost:3001
78-
$ go test ./... -v
77+
$ make test
7978
```
8079

8180
* More detailed documentation

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ module github.com/vulpemventures/go-elements
33
go 1.14
44

55
require (
6-
github.com/btcsuite/btcd v0.20.1-beta
6+
github.com/btcsuite/btcd v0.21.0-beta
77
github.com/btcsuite/btcutil v1.0.2
88
github.com/btcsuite/btcutil/psbt v1.0.2
9-
github.com/stretchr/testify v1.5.1
9+
github.com/stretchr/testify v1.7.0
1010
github.com/vulpemventures/fastsha256 v0.0.0-20160815193821-637e65642941
1111
github.com/vulpemventures/go-secp256k1-zkp v1.1.0
12-
golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d
12+
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
1313
)

go.sum

Lines changed: 392 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)