Skip to content

Commit

Permalink
Blind outputs with blinders (#152)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
louisinger and altafan authored Feb 12, 2021
1 parent 9656b2c commit 35015e9
Show file tree
Hide file tree
Showing 8 changed files with 773 additions and 160 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Go

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
integration:
name: Integration Tests
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.14.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Install Nigiri
run: |
mkdir ~/.nigiri; cd ~/.nigiri
curl https://travis.nigiri.network | bash; cd
docker-compose -f ~/.nigiri/docker-compose.yml up -d
- name: Get dependencies
run: go get -v -t -d ./...

- name: Test
run: make test
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:

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

after_script:
- docker-compose -f tmp/docker-compose.yml down && rm -rf tmp
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## help: prints this help message
help:
@echo "Usage: \n"
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'

test:
export API_URL=http://localhost:3001; \
go test -count=1 -v ./...
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ $ go get -t -v ./...

```
$ nigiri start --liquid
$ export API_URL=http://localhost:3001
$ go test ./... -v
$ make test
```

* More detailed documentation
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ module github.com/vulpemventures/go-elements
go 1.14

require (
github.com/btcsuite/btcd v0.20.1-beta
github.com/btcsuite/btcd v0.21.0-beta
github.com/btcsuite/btcutil v1.0.2
github.com/btcsuite/btcutil/psbt v1.0.2
github.com/stretchr/testify v1.5.1
github.com/stretchr/testify v1.7.0
github.com/vulpemventures/fastsha256 v0.0.0-20160815193821-637e65642941
github.com/vulpemventures/go-secp256k1-zkp v1.1.0
golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
)
392 changes: 392 additions & 0 deletions go.sum

Large diffs are not rendered by default.

Loading

0 comments on commit 35015e9

Please sign in to comment.