-
Notifications
You must be signed in to change notification settings - Fork 7
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
Merge upstream changes from bcoin:master
#10
Conversation
matches expected outputs from hsd
bcoin browser mode can not use DNS to discover seeds, so they are hard-coded. see: https://github.com/bcoin-org/bdns/blob/master/lib/dns-browser.js#L23 There's already plenty in `/lib/net/seeds/main.js` so this is just to get browser-nodes running on testnet. Seeds were pulled from my own `hosts.json` file on a live testnet bcoin node
Currently coinview does not account for spent coins in the mempool, This does not create problems because we have additional checks in right places which detect double spends, but technically coinview should help you detect double spent in the mempool as well. This way it will be compatible with chain.getCoinView. getSpentView will still return all outputs that are available in the mempool. (This could also return spentView from indexers if available, this method is used by `signrawtransaction`.)
Addresses confusion similar to bcoin-org/bcoin-docker#8
pkg: add lockfile
docs/Configuration: SPV is command-line only
To match behavior in `node` (fullnode) if a user wants to use `bmultisig` instead of the built-in wallet.
update link to bcoin docs
Too big to decently review the whole kit and kaboodle. The change is mostly a merge from bcoin-1.02, so we can blame them for any defects. @OstlerDev , would you mind describing the testing you did so we can have good feels about the result of the massive PR? |
This commit basically disables the fee estimation logic. Currently this is not needed as tx traffic on FLO is relatively minor
Here is the full changelog provided by the Bcoin release notes & changelogv2.0.0-devHow to upgradeThe way that block data is stored has changed for greater performance,
To upgrade to the new disk layout it's necessary to move block data To do this you can run:
The migration will take 1-3 hours, depending on hardware. The block data Alternatively, you can also sync the chain again, however the above For those with Wallet API changesHTTP
RPC
Node API changesHTTPSeveral CPU and memory exhaustion issues have been resolved with some
Network changes
Logging changes
Configuration changes
Script changes
Testing changes
Chain changes
Other changes
v1.0.0MigrationThe latest bcoin release contains almost a total rewrite of the wallet. A Bcoin has also been modularized quite a bit. Users installing globally from npm $ npm update -g bcoin For users who cloned the respository themselves, it might be wise to simply $ cd bcoin/
$ git pull origin master
$ rm -rf node_modules/
$ npm install
$ npm test Once upgrading is complete, a migration script must be executed. The migration A bcoin prefix directory must be passed as the first argument. Example: $ ./migrate/latest ~/.bcoin What this does:
The chain migration should be minor, and only taxing if you have If you have a testnet, regtest, or simnet directory, the migration must also be $ ./migrate/latest ~/.bcoin/testnet Also note that the Configuration changesWallet and Node are now separated and use different persistent configuration files. All configuration options in Wallet-specific settings such as Example using wallet.conf:
Example using CLI options: Example using ENV: Bcoin client changesThe Wallet API changesThe main wallet API changes have to do with changes in the structure of the
The default account object is no longer present on the wallet. To retrieve it, For socket.io events, all The Notable changes
|
To test this Pull Request I have performed the following tests
|
@cchrysostom @orpheus @bitspill All of the changes for this upgrade are complete and this PR is ready to be merged once one of you gives approval 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lot of work =O
It was a lot of work, but totally worth it to get all the enhancements the bcoin team have been making :) I am excited for all the possibilities that an updated fcoin can enable! |
In order to fix a large quantity of bugs that lived in
fcoin
, I have gone ahead and merged the upstream work frombcoin-org/bcoin:master
and tested the changes.All changes seem to be performing admirably and
fcoin
seems to run faster, with a lower memory footprint, and is able to gracefully shut down. I have collected the notable changes that have been made by thebcoin
team into the changelog below.Notable Changes
FLO transaction signing has been fixed
Block difficulty retargeting has been fixed
bcoin - The main
bcoin
module has been rewritten in terms of what it exposes and how. Conventions have changed (Address
instead ofaddress
). Due to the use of class syntax, something likebcoin.Address(str)
is no longer possible. Please take a look atlib/bcoin.js
to get a better idea of what has changed.bcoin - Bcoin has been rewritten using class syntax. Objects will not be inheritable with legacy prototypal inheritance.
db - The way that block data is stored has changed for greater performance, efficiency, reliability and portability.
mempool - The mempool has had a bug fixed that caused transactions to be loaded ordered by hash order upon a restart instead of ancestory dependency order
wallet/http - A
conflict
event will be correctly emitted for all double spends.wallet/http - Account balances are now indexed and will appear on account objects via the API.
pkg - Bcoin is once again buildable with browserify.
pkg - Numerous modules have been moved out to separate dependencies. For example, the
lib/crypto
module has been moved to thebcrypto
package (and also heavily optimized even further).net - Support for BIP151 and BIP150 has been dropped.
SIGINT
handling will close the full node, spvnode and wallet.Block and undo block data has been moved from LevelDB into flat files.
The transaction and address indexes have been moved into separate LevelDB databases.
The transaction has been de-duplicated, and will reduce disk usage by half for those running with
txindex
enabled.The
txindex
andaddrindex
can now be enabled after the initial block download.The
addrindex
has been sorted to support querying for large sets of results, and will no longer cause CPU and memory exhaustion issues.Several CPU and memory exhaustion issues have been resolved with some additional arguments for querying multiple sets of results for addresses that have many transactions.
GET /tx/address/:address
has several new arguments:after
,reverse
and
limit
. Theafter
argument is a txid, for querying additional resultsafter a previous result. The
reverse
argument will change the order thatresults are returned, the default order is oldest to latest. The
limit
argument can be used to give results back in smaller sets if necessary.
Configuration changes
The option for
coin-cache
has been removed, this setting was causing issues during the sync with out-of-memory errors and was making performance worse instead of better.Wallet and Node are now separated and use different persistent configuration files. Some configuration options have moved to
wallet.conf
, which is stored in the prefix directory next to the existingfcoin.conf
.All configuration options in
wallet.conf
will have thewallet-
prefix added implicitly. The prefix is still needed when using CLI/ENV configuration methods. The wallet now has it's own HTTP server, so options such aswallet-http-host
must also be specified along withhttp-host
if you require this setting (required for Docker networking).Wallet-specific settings such as
api-key
andwallet-auth
have moved towallet.conf
. If using CLI/ENV options, these are prefixed withwallet-
. Various configuration method examples are shown below.Example using wallet.conf:
Example using CLI options:
./bin/node --network=testnet --http-host=0.0.0.0 --wallet-http-host=0.0.0.0 --wallet-api-key=hunter2 --wallet-wallet-auth=true
Wallet API changes
The main wallet API changes have to do with changes in the structure of the HTTP server itself. The bcoin wallet HTTP server will now always listen on it's own port. Standard ports are: