Skip to content

Commit

Permalink
Update neutrino (#13)
Browse files Browse the repository at this point in the history
* Add DeleteAccount & Fix CreateAccountResponse

* Drop account key and refer to account only by name

* Fix account index type

* Update balance type

* Fix field type of BlockDetails

* Add core domains

* Add core portable interfaces

* Add implementations of core ports

* Add reusable packages

* Add core application services

* Add app-config

* Add Service interface and its grpc impelmentation

* Updates protos

* Add oceand

* Add CLI

* Add config

* Go mod

* Add git ignore

* Add makefile

* Add util scripts

* Add CI

* Fix

* Fixes

* Add TODO and remove useless files

* Fixes to proto

* Rename CreateAccount method

* Make use of switch statement

* Fixes to neutrino scanner after review

* Add birthday block to wallet

* Add birthday block to domain.Wallet and optional one for its accounts

* Add starting block height to WatchForAccount && Add methods to retrieve block info

* Add bc scanner to wallet service to retrieve birthday block info

* Pass wallet account starting block down to scanner watch

* Proto updates

* Fix  bc scanner abstraction

* Fix comment

* Update neutrino-elements version

* Add sighash type to sign methods

* Use user-defiened sighash type instead of hardcoding SIGHASH_ALL

* Add expiration date to selected utxos response

* Return expiration date of selected utxos

* Update go-elements & fix creation of new utxos

* Update go-elements version

* Order utxos by value asc in coin selection strategy

* Update go-elements

* Add proofs to partial tx

* Non-blokcing write to channel

* Update go-elements version

* Update protos

* Add domain.UtxoKey.Hash() and blinders to domain.UtxoInfo

* Fixes

* Handle closing of grpc server-side streams

* Update neutrino-elements version && Add persistent watch

* Fix wallet root derivation path

* Fix blockchain scanner start

* Update neutrino-elements version

* Add build info

* Add release flow

* Merge gh actions into ci.yml

* Fix ci

* Fix ci

* Update utxo type

* Add spent/confirmation block info to utxo

* Fix tx estimation

* Add method to lock wallet

* Enable all interfaces at startup

* Fix tests

* Update .goreleaser.yml

* Update .github/workflows/release.yml

* Update deps

* Fix buf.yaml

* Fixes

* Move proto to v1

* Fix race condition cause

* Update go-elements dep

* Update neutrino-elements && Add badger impl of neutrino repos

* Start watching accounts after wallet is unlocked

Co-authored-by: Marco Argentieri <[email protected]>
  • Loading branch information
altafan and tiero authored Aug 24, 2022
1 parent d03d19d commit 0e0db85
Show file tree
Hide file tree
Showing 9 changed files with 1,628 additions and 88 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ run: clean
export OCEAN_NO_TLS=true; \
export OCEAN_STATS_INTERVAL=120; \
export OCEAN_ESPLORA_URL=http://localhost:3001; \
export OCEAN_NODE_PEERS="localhost:18886"; \
export OCEAN_NODE_PEERS=localhost:18886; \
export OCEAN_UTXO_EXPIRY_DURATION_IN_SECONDS=60; \
go run ./cmd/oceand

Expand Down
7 changes: 1 addition & 6 deletions cmd/oceand/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,8 @@ func main() {
defer profilerSvc.Stop()
}

net := network.Name
if net == "regtest" {
net = "nigiri"
}

bcScannerConfig := neutrino_scanner.NodeServiceArgs{
Network: net,
Network: network.Name,
FiltersDatadir: filtersDir,
BlockHeadersDatadir: blockHeadersDir,
Peers: nodePeers,
Expand Down
39 changes: 21 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/prometheus/client_golang v1.12.1
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v0.0.5
github.com/spf13/viper v1.10.1
github.com/spf13/cobra v1.1.3
github.com/spf13/viper v1.12.0
github.com/stretchr/testify v1.7.2
github.com/timshannon/badgerhold/v4 v4.0.2
github.com/vulpemventures/go-bip39 v1.0.2
github.com/vulpemventures/go-elements v0.4.0-rc.1
github.com/vulpemventures/neutrino-elements v0.1.2-rc.0
github.com/vulpemventures/neutrino-elements v0.1.2
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2
google.golang.org/grpc v1.43.0
google.golang.org/protobuf v1.27.1
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2
google.golang.org/grpc v1.46.2
google.golang.org/protobuf v1.28.0
)

require (
Expand All @@ -36,40 +36,43 @@ require (
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/dgraph-io/ristretto v0.1.0 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v0.0.0-20210429001901-424d2337a529 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/flatbuffers v2.0.0+incompatible // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23 // indirect
github.com/klauspost/compress v1.13.1 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.1.1 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/stretchr/objx v0.2.0 // indirect
github.com/subosito/gotenv v1.3.0 // indirect
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
github.com/vulpemventures/fastsha256 v0.0.0-20160815193821-637e65642941 // indirect
github.com/vulpemventures/go-secp256k1-zkp v1.1.5 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/sys v0.0.0-20220608164250-635b8c9b7f68 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 0e0db85

Please sign in to comment.