lbcwallet/waddrmgr
Conner Fromknecht 1d50b92bdc waddrmgr/multi: fix scoped mgr reentry deadlock
This commit resolves a deadlock observed when attempting
to generate addresses. There were a few cases, particularly
in chainAddressRowToManaged and loadAccountInfo, which accessed
the public IsLocked() method of the Manager, even though the
shared mutex had already been acquired.

The solution is to create an internal isLocked() method, which
can be safely called assuming the manager's mutex has already been
acquired. As the comments above both of the methods in question
specify, we can assume the Manager's mutex *is* already acquired.

This commit also reduces some unnecessary code duplication, since
the recent changes left both a Locked() and IsLocked() method that
perform the same functionality. IsLocked() was favored as it more
clearly indicates that the returned value is a boolean.
2018-05-23 19:38:56 -07:00
..
address.go waddrmgr/multi: fix scoped mgr reentry deadlock 2018-05-23 19:38:56 -07:00
common_test.go multi: switch all imports to roasbeef's forks 2018-05-23 19:38:56 -07:00
cov_report.sh Provide new wallet address manager package. 2014-10-13 16:19:09 -05:00
db.go waddrmgr: add database migration from version 4 to 5 2018-05-23 19:38:56 -07:00
doc.go Use LICENSE file and short license headers. 2016-02-28 22:22:34 -05:00
error.go waddrmgr: update existing tests to be aware of new key scopes 2018-05-23 19:38:56 -07:00
error_test.go multi: switch all imports to roasbeef's forks 2018-05-23 19:38:56 -07:00
internal_test.go waddrmgr: update existing tests to be aware of new key scopes 2018-05-23 19:38:56 -07:00
manager.go waddrmgr/multi: fix scoped mgr reentry deadlock 2018-05-23 19:38:56 -07:00
manager_test.go waddrmgr: update test to ensure timestamp is set 2018-05-23 19:38:56 -07:00
README.md multi: switch all imports to roasbeef's forks 2018-05-23 19:38:56 -07:00
scoped_manager.go waddrmgr/multi: fix scoped mgr reentry deadlock 2018-05-23 19:38:56 -07:00
sync.go waddrmgr: create new ScopedKeyManager to manage BIP43 purposes 2018-05-23 19:38:56 -07:00
test_coverage.txt Provide new wallet address manager package. 2014-10-13 16:19:09 -05:00

waddrmgr

[Build Status] (https://travis-ci.org/roasbeef/btcwallet)

Package waddrmgr provides a secure hierarchical deterministic wallet address manager.

A suite of tests is provided to ensure proper functionality. See test_coverage.txt for the gocov coverage report. Alternatively, if you are running a POSIX OS, you can run the cov_report.sh script for a real-time report. Package waddrmgr is licensed under the liberal ISC license.

Feature Overview

  • BIP0032 hierarchical deterministic keys
  • BIP0043/BIP0044 multi-account hierarchy
  • Strong focus on security:
    • Fully encrypted database including public information such as addresses as well as private information such as private keys and scripts needed to redeem pay-to-script-hash transactions
    • Hardened against memory scraping through the use of actively clearing private material from memory when locked
    • Different crypto keys used for public, private, and script data
    • Ability for different passphrases for public and private data
    • Scrypt-based key derivation
    • NaCl-based secretbox cryptography (XSalsa20 and Poly1305)
  • Scalable design:
    • Multi-tier key design to allow instant password changes regardless of the number of addresses stored
    • Import WIF keys
    • Import pay-to-script-hash scripts for things such as multi-signature transactions
    • Ability to export a watching-only version which does not contain any private key material
    • Programmatically detectable errors, including encapsulation of errors from packages it relies on
    • Address synchronization capabilities
  • Comprehensive test coverage

Documentation

[GoDoc] (http://godoc.org/github.com/roasbeef/btcwallet/waddrmgr)

Full go doc style documentation for the project can be viewed online without installing this package by using the GoDoc site here: http://godoc.org/github.com/roasbeef/btcwallet/waddrmgr

You can also view the documentation locally once the package is installed with the godoc tool by running godoc -http=":6060" and pointing your browser to http://localhost:6060/pkg/github.com/roasbeef/btcwallet/waddrmgr

Installation

$ go get github.com/roasbeef/btcwallet/waddrmgr

Package waddrmgr is licensed under the copyfree ISC License.