Commit graph

3614 commits

Author SHA1 Message Date
Roy Lee
a0ff51b84a claimtrie: allows '*' in claim name 2022-11-23 08:50:17 -08:00
Roy Lee
4c39a9842c rpcclient: update rescanblockchain support 2022-10-31 00:23:46 -07:00
Roy Lee
f513fca6a7 lbcdblocknotify: reorganize the code with a few updates
1. Fixed a bug, which reads certs even TLS is disabled

2. Persists Stratum TCP connection with auto-reconnect.
   (retry backoff increases from 1s to 60s maximum)

3. Stratum update jobs on previous notifications are canceled
   when a new notification arrives.

   Usually, the jobs are so short and completed immediately.
   However, if the Stratum connection is broken, this prevents
   the bridge from accumulating stale jobs.
2022-10-17 00:03:13 -07:00
Alex Grintsvayg
6728bf4b08 error properly when lbcd fails to connect in HTTP POST mode
in the case where you're e.g. trying to connect to an
invalid address, the err vars in handleSendPostMessage()
were being shadowed inside the for loop. if c.httpClient.Do()
returned an error, that error never got returned upstream.
then ioutil.ReadAll(httpResponse.Body) would get a nil pointer
dereference. this fixes that case.
2022-10-14 11:40:46 -07:00
Roy Lee
979d643594 [lbry] claimtrie: created node cache 2022-09-29 16:45:42 -07:00
Roy Lee
cbc4d489e8 lbcctl: support --timed, --quiet options 2022-09-29 16:45:42 -07:00
Roy Lee
987a533423 rpc: update rpc cmd requests to support multi-account
Most of the updates add optional arguments with default
values.
2022-09-26 11:08:19 -07:00
Roy Lee
6bc9a2b4dd mining: always returns .coinbasevalue in getblocktemplate
Although the BIPs specify that coinbasetxn and coinbasevalue are
mutually exclusive, both the latest bitcoind (22.0.0) and lbrycrd
(0.17.3) return .coinbasevalue regardeless if 'coinbasetxn' is
specified in the capabilities.

We'll make lbcd behave the same for compatibility.
2022-09-25 18:48:59 -07:00
Roy Lee
9bcd3d0591 cotrib: add a helper script to show miner of a bkock 2022-09-23 17:49:01 -07:00
Roy Lee
2adfcd211d rpcclient: add -quiet option to the lbcdblocknotify example 2022-09-23 17:48:05 -07:00
Roy Lee
81ec217899 rpcserver: fix up getblockstats 2022-09-20 23:59:57 -07:00
Guilherme de Paula
5acfa4c81b rpcserver: add GetBlockStats 2022-09-20 23:59:57 -07:00
Roy Lee
c5193e74ac rpc: support hex data output for createrawtransaction 2022-09-14 18:41:04 -07:00
Roy Lee
8a80f0683a [lbry] policy: relax dust thrashold to 1000 dewies/kB
An output is considered dust if the cost to the network to spend the
coins is more than 1/3 of the minimum free transaction relay fee, which
has a default rate of 1000 satoshis/kb

bitcoind refactored dust threshold calculation, which removed the
multiply factor of 3 from the code, but increased the DUST_RELAY_TX_FEE
from 1000 to 3000 (satoshi/kb).

lbrycrd adopted the refactored code but also kept the rate to
1000 dewies/kB, which means:

    An output is considered dust if the cost to the network to spend the
    coins is more than the minimum free transaction relay fee.
2022-09-01 15:28:07 -07:00
Roy Lee
5d7a219e35 rpc: make getblock return orphan blocks with confirmation=-1 2022-08-31 18:32:49 -07:00
Roy Lee
2d04d31894 rpc: implement rescanblockchain rpcclient 2022-08-31 18:32:49 -07:00
Roy Lee
ce37025d5a txscript: validate claimscript size 2022-08-30 15:30:07 -07:00
Roy Lee
98e5771989 rpc: implement setban, lisnbanned, clearbanned RPCs 2022-08-14 21:26:27 -07:00
Roy Lee
ff324e0fdb doc: update snapshot related instructions 2022-08-14 14:17:41 -07:00
Roy Lee
be0d7de8da mining: accomodate pre-BIP0141 coinbase structure
Some popular pool software, yiimp for example, constructs coinbase
in pre-BIP0141 style, which results in rejection of submitblock.
2022-08-12 10:39:26 -07:00
Roy Lee
fcfb2af76f netsync: revert base/segwit encoding hack 2022-08-12 10:39:26 -07:00
Roy Lee
78bed14956 go mod: bump lbcutil to v1.0.202 2022-08-12 10:39:26 -07:00
Roy Lee
fdedbf86f8 mining: include 'segwit' rule when no segwit txns in GBT
According to the BIP0009, all active softfork deployment should
be included in the rules.

We add the '!' to indicate the enforcement if the template has
any segwit transactions in it. Otherwise, plain `segwit` is fine.
2022-08-08 00:49:16 -07:00
Roy Lee
a9351b3e3a lbcdblocknotify: support --run to execute custom command 2022-08-07 23:55:10 -07:00
Roy Lee
e323751218 ci: gofmt with go 1.19
Go 1.19 introduces various updates to gofmt.
2022-08-07 23:40:53 -07:00
Roy Lee
66c8567a27 ci: bump to Go 1.19 2022-08-07 23:40:17 -07:00
Roy Lee
6b0e7592c6 btcjson: remove WebsocketOnly for wallet extension RPCs 2022-07-29 12:10:53 -07:00
Roy Lee
05f52c11a1 docs: update README.md 2022-07-28 17:23:39 -07:00
Roy Lee
ea63a44c7b [lbry] rpcclient: fix stratum update_block format for blocknotify 2022-07-28 08:32:09 -07:00
Jonathan Moody
daa3137dc4 [rpc blockchain] Add support for mediantime, chainwork to RPC getblock. 2022-07-27 10:41:24 -07:00
Roy Lee
b147fe2a5b Revert "[lbry] claimtrie: created node cache"
This reverts commit 8f95946b17.
2022-07-27 10:18:35 -07:00
Jonathan Moody
7f9fe4b970 [rpc mempool] More tweaks to dynamicMemUsage(). Add toggleable assertions for max depth and switch completness. Toggle them when running in mempool_test.go. Drop support for reflect.Map, as it's not needed at this time. 2022-07-18 17:17:56 -07:00
Jonathan Moody
eefb1260eb [rpc mempool] Correct comment BTC -> LBC. 2022-07-18 17:17:56 -07:00
Jonathan Moody
a8a44aa988 [rpc mempool] Hide debugging functionality of dynamicMemUsage(). 2022-07-18 17:17:56 -07:00
Jonathan Moody
abb1b8b388 [rpc mempool] Add support for unbroadcastcount to RPC getmempoolinfo. 2022-07-18 17:17:56 -07:00
Jonathan Moody
13e31d033a [rpc mempool] Add support for usage, total_fee, mempoolminfee, minrelaytxfee to RPC getmempoolinfo. 2022-07-18 17:17:56 -07:00
Roy Lee
5499a2c1b3 [lbry] claimtrie: more verbose error message in ResetHeight 2022-07-17 11:32:33 -07:00
Roy Lee
fae4063046 rpc: remove deprecated and unimplemented 'move' 2022-07-14 15:45:06 -07:00
Roy Lee
8d1005706b rpc: remove deprecated and unimplemented 'setaccount' 2022-07-14 15:43:35 -07:00
Roy Lee
bb93a49349 [lbry] config: allow non-localhost connections with TLS disabled 2022-07-11 16:52:38 -07:00
Roy Lee
d5922cd725 [lbry] version: fix version string handling 2022-07-06 20:44:22 -07:00
Roy Lee
3a179a0eee [lbry] rpc: un-embedded attributes in getaddressinfo result
lbcwallet failed to re-generate RPC help message.

The help message generator doesn't handle embedded fields properly.
2022-07-05 20:12:27 -07:00
Jonathan Moody
ca9b4e5529 Rename nameProgressLogger -> claimProgressLogger and tweak log message. 2022-06-14 11:27:58 -07:00
Jonathan Moody
2b7f065855 Adjust and rename blockProgressLogger -> nameProgressLogger. Use it in makeNameHashNext() to track progress. 2022-06-14 11:27:58 -07:00
Jonathan Moody
b859832907 Copy netsync/blocklogger.go to claimtrie/logger.go. 2022-06-14 11:27:58 -07:00
Jonathan Moody
70852905e0 Allow environment var GOMAXPROCS=<N> to override NumCPU(). 2022-06-14 11:03:27 -07:00
Jonathan Moody
5f7b1f1b4f Copy value received by MergeOlder/MergeNewer so caller can't trash the merge result by modifying the contents. 2022-06-06 14:12:30 -07:00
Jonathan Moody
0241e18f42 Harden Marshal/Unmarshal logic for Change.SpentChildren. 2022-06-06 14:12:30 -07:00
Brannon King
b06df3d750 added buffer pool for pebble merge string 2022-06-06 14:12:30 -07:00
Jonathan Moody
15191b7ede
[lbry] runtime: Add --memprofile option
* Add --memprofile option. Add memprofile to sample config.
* Add --memprofile to doc.go.
2022-06-03 12:08:09 -07:00