Commit graph

386 commits

Author SHA1 Message Date
Christopher Jeffrey
b80cd1fb1f
rpc: disable airdrops on testnet. 2020-02-01 22:18:44 -08:00
Christopher Jeffrey
4cb36cbe40
net: fix port selection elsewhere. 2020-02-01 15:12:40 -08:00
Christopher Jeffrey
bf2a654175
pkg: drop some old deps. 2020-01-31 02:42:12 -08:00
Christopher Jeffrey
f3334af7dc
node: expose dns seeder. 2020-01-31 02:03:05 -08:00
Christopher Jeffrey
77dbe2987c
node/rpc: do not activate softforks with getwork. 2020-01-29 05:44:51 -08:00
Christopher Jeffrey
b02c6049cf
node: add simple dns seed server. 2020-01-29 03:55:21 -08:00
Christopher Jeffrey
a72bab62a0
dns: implement new resource serialization. 2020-01-29 02:16:13 -08:00
Christopher Jeffrey
a333a24d40
net: use plaintext by default. various improvements. 2020-01-29 02:01:32 -08:00
Christopher Jeffrey
0623f4df05
Revert "Merge pull request #331 from tynes/p2p-brontide-safety"
This reverts commit 340952867a, reversing
changes made to e2039e8954.
2020-01-29 01:58:18 -08:00
Boyma
8252c97e89
Merge pull request #334 from tuxcanfly/getproof-sliding-window
getproof - dos prevention using sliding window counter
2020-01-26 17:33:48 -08:00
Boyma
2a13e12c45
Merge pull request #327 from tynes/rpc-warning-fix
node/rpc: fix logger statement
2020-01-26 17:32:31 -08:00
Javed Khan
010d5d2b98
peer: add a slidingwindow rate limit for getproof 2020-01-26 21:37:22 +05:30
Christopher Jeffrey (JJ)
6bb2220a88
Merge pull request #305 from tynes/disable-goosig
chain: disable goosig after 1 year + 1 month
2020-01-25 23:43:51 -08:00
Mark Tyneway
f0225319c1
node/rpc: fix logger statement 2020-01-25 20:13:01 -08:00
Mark Tyneway
d5cfb7887b
p2p: standard and brontide peering
Separate the brontide and plaintext servers
so that peers can network over either.
2020-01-25 20:00:00 -08:00
Mark Tyneway
9c092c097e
consensus: disable goosig after 1 year + 1 month 2020-01-24 18:32:45 -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