Commit graph

371 commits

Author SHA1 Message Date
Mark Tyneway
f0225319c1
node/rpc: fix logger statement 2020-01-25 20:13:01 -08:00
Christopher Jeffrey
e68b77b8c8
block: cleanup new pow/header serialization. 2019-11-04 03:57:19 -08:00
Christopher Jeffrey
5a34dd6633
chain/block/mining: implement a more foolproof pow (WIP). 2019-11-04 03:57:19 -08:00
Boyma
86eb05328c
Merge pull request #258 from tynes/no-unbound-option
dns/server: allow configurable use of unbound
2019-10-27 19:10:32 -04:00
Mark Tyneway
beedc3e6c5
node: parse rs-no-unbound and pass to rs constructor 2019-10-25 10:06:53 -07:00
Mark Tyneway
2c2d6711ac
rpc: return name 2019-10-09 13:59:35 -07:00
Christopher Jeffrey (JJ)
cc1ef7ab8d
Merge pull request #186 from tynes/rpc-expose-identity-key
rpc and http expose identity key
2019-06-21 06:09:17 -07:00
Christopher Jeffrey (JJ)
6486eb9aa2
Merge pull request #189 from tynes/mempool-reject-api
mempool: expose mempool rejection filter to api
2019-06-21 06:04:50 -07:00
Mark Tyneway
e5df1aa1ac
node/http: add claims, airdrops, orphans
Add additional fields to the response of node
HTTP `GET /`. The new fields can be found at
.mempool.{claims,airdrops,orphans}.
2019-05-30 10:53:40 -07:00
Mark Tyneway
571ba4ff5c
mempool: expose mempool rejection filter to api 2019-05-27 12:27:48 -07:00
Mark Tyneway
6cf947f017
node/rpc: getnetworkinfo identity key
Return a new value in the response of
the node RPC `getnetworkinfo` that
contains the local identity key
serialized in base32.
2019-05-24 18:00:47 -07:00
Mark Tyneway
b4368e109b
node/http: return base32 encoded identitykey
Add the identity key to the response of `GET /`
at .pool.identitykey.
2019-05-24 17:59:11 -07:00
Boyma
4db8f9c6f0
Merge pull request #156 from kilpatty/node-http-reset-enforce
http: add check for height being below tip
2019-05-19 09:20:22 -07:00
Mark Tyneway
5be3eec33b
node/http: add db state info to response
Add an object for the db state at `.chain.state`
that has the fields `tx`, `coin`, `value`, `burned`.
These values are pulled from the `chain.db.state`.
2019-05-13 17:20:25 -07:00
Christopher Jeffrey (JJ)
b0c30f83f7
Merge pull request #170 from tynes/getblockchaininfo-treeroot
node/rpc: add treeRoot to getblockchaininfo
2019-05-12 22:20:51 -07:00
Mark Tyneway
2ec26c1605
node/rpc: add treeRoot to getblockchaininfo 2019-05-03 22:05:39 -07:00
Mark Tyneway
7697b073fc
node/http: expose treeRoot of tip
`GET /` will now return the chain tip's
`treeRoot` property at `.chain.treeRoot`.
2019-05-03 22:01:17 -07:00
kilpatty
2a5933fdec
node-http: add check for height being below tip
This commit simply adds an enforce line to check that the height being
requested to reset to is below the chain tip. This way we return a bad
request error rather than a internal server error.
2019-04-30 18:28:14 -05:00
kilpatty
9d33191cc0
txmeta: return hex string for block for json
This commit adds the toString('hex') function to the following places:
- primitives -> txmeta -> getJSON()
- primitives -> tx -> format()
- node -> rpc -> getblockhash
In addition it adds a small test to txmeta-test to ensure that the getJSON function is working accordingly.
2019-04-25 11:33:35 -05:00
Mark Tyneway
62b4de584c rpc: update node rpc validateaddress
This PR updates the node rpc validateaddress to
better seperate the wallet and the node. The rpc
was returning ismine and iswatch only. These values
were moved to the wallet rpc method getaddressinfo.
This corresponds to a change in bitcoind and bcoin.

The updated validateaddress rpc returns the values:

- isvalid
- address
- ismine
- iswatchonly
- isscript
- isspendable
- witness_version
- witness_program

See PR in bcoin: https://github.com/bcoin-org/bcoin/pull/731
See PR in bitcoind: https://github.com/bitcoin/bitcoin/pull/10583
2019-04-08 17:33:30 -07:00
Christopher Jeffrey
9762b29922
covenants: implement mass name revocation safeguards. see #103.
This commit accomplishes a few things:

- The emergency soft-fork safe guards and on-chain mitigations described in
  #103 are implemented.
- Claimed names no longer expire within the reservation window, but are still
  revokable.
- We now track the registered and expired state of a name.
- In addition to the above, we track the total number of renewals.
- We no longer clear name data on expiration.
2019-04-01 06:25:40 -07:00
Mark Tyneway
c6a11eb1ca
blockchain: remove coin-cache
This PR removes the coin-cache from the blockchain.
It was determined that using the coin-cache actually
slows down the initial block download and can be
easily configured in such a way that it crashes Node.js.
This is a port of work done by braydonf on bcoin.

See relevant comment from jj: https://github.com/bcoin-org/bcoin/issues/626#issuecomment-442059074
See PR on bcoin here: https://github.com/bcoin-org/bcoin/pull/736
2019-03-29 14:32:51 -07:00
Matthew Zipkin
990493256a
http: identify node/wallet in log 2019-02-05 10:34:50 -08:00
Christopher Jeffrey
13ae3f1d0f
rpc: expose airdrops for block templates. 2019-01-21 22:06:26 -08:00
Christopher Jeffrey
40157aa468
hsd: several hard-forks.
- Change PoW to KMAC+BLAKE2b-256, remove Cuckoo Cycle.
- Change to a 10 minute block time (updates other constants,
                                    including the halving interval).
- Add `filterRoot` to block header.
- Add a separate witnessRoot.

The last change fixes our original misdesigned segwit, which made syncing a
non-witness chain more difficult than it needed to be. The previous design
merkelized the transaction itself and there was only one merkle root, which was
essentially a witness root. This required "witness data hashes" to be requested
for each block in a non-witness sync. Using a separate tree is just a better
design in the end.
2019-01-21 22:06:25 -08:00
Christopher Jeffrey
daf38ea4dd
airdrop: first attempt at airdrop proofs. 2018-12-02 15:56:50 -08:00
Christopher Jeffrey
ee20997321
deps: upgrade to modern bns and bcrypto. 2018-09-29 14:51:22 -07:00
Boyma Fahnbulleh
a89938a270 http: include warning of deprecation 2018-09-26 17:43:29 -07:00
Boyma Fahnbulleh
370833fac8
http: account for network when creating Address 2018-09-21 13:18:41 -07:00
lanford
36dcacdbda node/http: fix address type in http api 2018-09-17 16:43:56 +08:00
lanford
261ec36c55 fix: address type in http api /coin/address and /tx/address 2018-08-08 18:42:20 +08:00
Anthony Liu
3cae6a773b Use an address object in the coin address endpoint. 2018-08-08 02:16:33 -07:00
Christopher Jeffrey
9cd21308b3
chain/net: fix initial block sync. 2018-08-07 22:22:15 -07:00
Christopher Jeffrey
a77ed0b46b
rpc: stop using for-await. 2018-08-07 13:48:57 -07:00
Christopher Jeffrey
999a1c2f54
node/wallet: improve name rpc calls. 2018-08-04 14:33:39 -07:00
Christopher Jeffrey
771c8d42aa
pkg: rename btc->ui. 2018-08-01 20:34:21 -07:00
Christopher Jeffrey
a03fcd1a23
pkg: rename to hsd. 2018-08-01 20:00:09 -07:00
Christopher Jeffrey
f8db47e87a
covenants: rename some stuff. 2018-07-31 20:05:38 -07:00
Christopher Jeffrey
33e9140ab2
namestate: cleanup. 2018-07-31 19:58:47 -07:00
Christopher Jeffrey
b8fb76e813
covenants: rename auction to namestate. 2018-07-31 19:54:40 -07:00
Christopher Jeffrey
13d2197b76
covenants: store all name state in the urkel tree. 2018-07-31 19:04:06 -07:00
Christopher Jeffrey
b4372556cd
spv/pool: implement spv resolution. 2018-07-24 23:55:53 -07:00
Christopher Jeffrey
169da98147
pkg: update deps. remove build. 2018-07-19 05:40:48 -07:00
Christopher Jeffrey
afb98b6fcb
hskd: switch to %x argument in logger. 2018-07-15 10:47:14 -07:00
Christopher Jeffrey
d4782e0cc1
hskd: switch to buffer maps and structs. 2018-07-15 06:22:25 -07:00
Christopher Jeffrey
29e629cfae
covenants: better managing of reserved names. 2018-07-12 06:50:02 -07:00
Christopher Jeffrey
8ce798dda9
covenants: commit auction state to tree. add OPEN covenant. 2018-07-11 23:35:09 -07:00
Christopher Jeffrey
9a0cc84a59
hskd: backport various bcoin fixes. 2018-07-10 19:16:08 -07:00
Christopher Jeffrey
5b68bc0059
miner: enforce weight limit for claims. 2018-07-10 18:53:05 -07:00
Christopher Jeffrey
ddd06adbb7
wallet/db: improvements to auction state handling. 2018-07-10 16:23:52 -07:00