Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with upstream #227

Merged
merged 33 commits into from
May 9, 2016
Merged

Sync with upstream #227

merged 33 commits into from
May 9, 2016

Conversation

jrick
Copy link
Member

@jrick jrick commented May 4, 2016

No description provided.

jcvernaleo and others added 22 commits March 31, 2016 11:43
This commit corrects various things found by the static checkers
(comments, unkeyed fields, return after some if/else).

Add generated files and legacy files to the whitelist to be ignored.

Catch .travis.yml up with btcd so goclean can be run.
This changes the wtxmgr.Store.UnminedTxs method to sort transactions,
using the Kahn topological sort algorithm, before returning
transactions to the caller.  This is possible because transactions
form a sort of directed acyclic graph (DAG) where transactions
reference other transactions to spend their outputs (multiple
referenced outputs from a single transaction spent by the same
transaction count as a single graph edge).

This prevents the possibility of orphan rejection errors when sending
unmined transactions to a full node at startup.  As these transactions
are sent using the sendrawtransaction RPC, which does not permit
orphans, this topological sort is required.

Fixes #156.
This fixes a deadlock where failed transactions due to the namespaces'
bucket being missing would cause deadlocks due to bolt's mmap rwmutex
still being read or write locked (and no way to unlock it, since the
underlying bolt tx was not returned on failure).
The vet tool moved to the Go tree as of go1.5 so it does not
need to be installed seperately.  With the x/tools repo now gone,
remove the install step for vet since it fails.
This tool creates on-chain transactions, one per used address in a
source account, to sweep all output value to new addresses in a
different destination account.
This file was accidentally removed when the gRPC server was introduced
and the legacy JSON-RPC server was moved to the legacyrpc package.
This removes an inconsistency with the datadir option from btcd, which
only set the directory containing the blockchain data and indexes.
Fixes build when using newer versions of the grpc packages.
Fix remaining issues discovered by vet.
Due to the way dust is calculated, if the transaction relay fee is
zero, then a zero output amount is not considered dust.  As the
transaction authoring code used this dust check to determine whether a
change output can be included or not, it could create unnecessary
change outputs which return no value back to the wallet.  Prevent this
by including an explicit check for zero values.
Replace all calls to getrawtransaction with gettxout.

As btcd no longer enables the transaction index by default,
getrawtransaction can no longer be depended on.  gettxout is safe to
use since it queries the utxo set.  This also means that it will
continue to work even when pruning is enabled.

This should be further improved in the future to not look up previous
output scripts over btcd rpc when they are already saved by the
wallet.

Fixes #410.
While here, also rename OpenSSL to BoringSSL since gRPC Core has
switched to that.

Fixes #429.
This change only removes optimizations for older Go releases that we
no longer support in the internal/zero package.  This package should
still continue to build on older releases.
This fixes home directory expansion on Windows and OS X.  Previously
on these platforms, a leading ~ would expand to %LOCALAPPDATA% on
Windows or ~/Library/Application Support/ on OS X.

While here, add support for ~otheruser expansion to expand to
otheruser's home directory.
This adds home directory and OS environment variable expansion for the
following configuration options: configfile, appdatadir, rpccert,
rpckey.
This modifies the default configuration file to be relative to the
application data directory (configuratble with --appdata).  If there
is no configuration file in this directory, then no additional
configuration options are applied (it does not fallback to
~/.btcwallet/btcwallet.conf).

Fixes #421.
Remove the addresses field from TransactionDetails.Output.  It is
assumed that the caller is able to deserialize the transaction and
encode the output scripts to addresses, so this is unnecessary server
overhead and conflicts with the current API philosophy of not
duplicating data already included in another field.

Since there is no additional data included for outputs not controlled
by the wallet, remove the `mine` specifier from the Output message and
replace it with an output index.  Only include messages for controlled
outputs, rather than creating messages for both controlled and
uncontrolled outputs.  Rename the repeated field from `outputs` to
`credits` to be consistent with the `debits` field.

Bump major API version as this is a breaking change.

Closes #408.
@jrick jrick force-pushed the sync branch 3 times, most recently from 149143f to 748d3a2 Compare May 4, 2016 15:47
Previously, this would always check a transaction output index against
the 0th credit's index.
When 29f3172 deprecated the datadir
option, replacing it with --appdata/-A, the short --datadir option was
unintentinally changed from -b to -D.  It was previously changed to -b
in fda2e14 for consistency with
btcd's --datadir short option.

This change reverts the unintentional switch back to -D.
This unexports every RPC handler function, as well as the
Server.PostClientRPC method which was only called by this package.

Fixes #435.
dajohi and others added 2 commits May 5, 2016 16:50
When an OS reboots or shuts down, it sends all processes SIGTERM before
sending SIGKILL.  This allows btcwallet to do a proper shutdown which
most importantly closes the databases.
The description had previously said that non-vendored packages were
not installed to $GOPATH/bin, but this is incorrect.  Remove this part
of the description so it includes all packages.
jrick added 3 commits May 6, 2016 09:55
Previously, the GO15VENDOREXPERIMENT environment variable was unset,
leaving travis to only use the vendored packages during builds for Go
1.6 which enabled the experiment by default.  Export the variable so
it also correctly tests under Go 1.5.
This will build all (non-vendored) packages recursively, even if they
are not used in any of the binaries (e.g. votingpool).  Additionally,
since a subshell is no longer used, the example commands can be run in
a Windows command prompt.  I don't encourage the use cmd.exe over
alternatives such as PowerShell, but there's no reason this command
could not be run there.
@jrick jrick force-pushed the sync branch 2 times, most recently from fefc120 to 07d3f12 Compare May 6, 2016 15:03
@cjepson
Copy link
Contributor

cjepson commented May 6, 2016

tACK on simnet. Nothing in the code jumped out at me.

jrick added 3 commits May 6, 2016 12:41
In btcsuite/btcwallet#419 (comment)
I mentioned that btcwallet should wait until btcd also switches back
to upstream package paths so that duplicate packages are not included
in and bloat the btcwallet binary.  Even while btcd has not yet
switched to the upstream flags package, this change can still be made
now since it is only used by btcd's main package, which is not
included in btcwallet.
@alexlyp
Copy link
Member

alexlyp commented May 9, 2016

tACK on testnet after running for 3+ days

@alexlyp alexlyp merged commit 47d16dc into master May 9, 2016
@jrick jrick deleted the sync branch May 9, 2016 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants