Commit graph

3375 commits

Author SHA1 Message Date
Brannon King
5e216ad456 [lbry] print out memory usage periodically 2021-10-19 21:19:42 -07:00
Brannon King
4b3fcd30e5 [lbry] blockchain: Consider a block with timestamp less 6 hours 'current' 2021-10-19 21:19:42 -07:00
Brannon King
f57398bf36 [lbry] rpc: update defaultMaxFeeRate from 0.1 LBC to 0.5 LBC 2021-10-19 21:19:42 -07:00
Brannon King
d7d5fde249 [lbry] rpc: output segwit rule 2021-10-19 21:19:42 -07:00
Brannon King
9263ffb1b5 [lbry] rpc: add ClaimTrie root hash to GetBlockTemplate() 2021-10-19 21:19:42 -07:00
Brannon King
a734ac0ee9 [lbry] rpc: support claim related methods 2021-10-19 21:19:42 -07:00
Mark Beamer Jr
37400696ad [lbry] rpcclient: allow any chain params not specified in repo already. 2021-10-19 01:16:15 -07:00
Roy Lee
0dbbbaaeeb [lbry] config: support 'clmtimpl' and 'clmtheight' flags 2021-10-19 01:16:15 -07:00
Roy Lee
5ff5739b47 [lbry] go module: update go modules
go mod init github.com/lbryio/chain
go mod edit --replace github.com/btcsuite/btcd=./
go mod edit --replace github.com/btcsuite/btcutil=github.com/lbryio/lbcutil@f93c78a8bc21
go mod tidy
2021-10-19 01:16:15 -07:00
Roy Lee
236cb44eee [lbry] claimtrie: import current snapshot
Sync to tip

Co-authored-by: Brannon King <countprimes@gmail.com>
2021-10-19 01:16:15 -07:00
Roy Lee
46c237dbcf [lbry] blockchain: connect to ClaimTrie
Co-authored-by: Brannon King <countprimes@gmail.com>
2021-10-19 01:16:15 -07:00
Brannon King
b166f562be [lbry] log: support claimtrie entries 2021-10-18 16:36:42 -07:00
Roy Lee
3ad06bdcbb [lbry] misc: change RPC port from 8334 to 9245 2021-10-18 16:36:42 -07:00
Roy Lee
7f5b9ae2fd [lbry] txscript: recognize LBRY claim script OPCODES 2021-10-18 16:36:42 -07:00
Roy Lee
b85b395b39 [lbry] txscript: initial porting of claim script
Co-authored-by: Brannon King <countprimes@gmail.com>
2021-10-18 16:36:42 -07:00
Roy Lee
db6550cc38 [lbry] txscript: change MaxScriptSize from 10,000 to 20,005 2021-10-18 16:36:42 -07:00
Roy Lee
57ba3201b1 [lbry] server: update client version to /btcwire:0.5.0/LBRY.GO:0.12.2/
TODO: double check if lbryd bumps the version.
2021-10-18 16:36:42 -07:00
Brannon King
059aa2ef4f [lbry] blockchain: support force active fork deployment 2021-10-18 16:36:42 -07:00
Roy Lee
7854bff5b2 [lbry] blockchain, mempool: validate txscripts
Co-authored-by: Brannon King <countprimes@gmail.com>
2021-10-18 16:36:42 -07:00
Roy Lee
fcc31b5935 [lbry] blockchain: change Block Subsidy algorithm 2021-10-18 16:36:42 -07:00
Roy Lee
4cccf98786 [lbry] blockchain: change the difficulty adjustment algorithm.
adjusted := target + (actual - target) / 8

  max := target + (target / 2)
  min := target - (target / 8)

  if adjusted > max {
    adjusted = max
  } else if adj < min {
    adjusted = min
  }

  diffculty := lastDifficulty * adjusted / target
2021-10-18 16:36:42 -07:00
Roy Lee
c48856b510 [lbry] blockchain: make UTXO in Genesis block spendable 2021-10-18 16:36:42 -07:00
Roy Lee
eba47240c1 [lbry] blockchain, txscript: change maxScriptElementSize from 520 t0 20,000 bytes 2021-10-18 16:36:42 -07:00
Roy Lee
e42ee8a123 [lbry] blockchain, wire: verify blockheaders using LBRY PoW 2021-10-18 16:36:42 -07:00
Roy Lee
b8ac55a63c [lbry] blockchain: change max block size to 2,000,000 2021-10-18 16:36:42 -07:00
Roy Lee
559cdd6c0d [lbry] wire: update protocol NetIDs 2021-10-18 16:36:42 -07:00
Roy Lee
7507550503 [lbry] chaincfg: update chainparams for LBRY chain
Co-authored-by: Brannon King <countprimes@gmail.com>
Co-authored-by: Alex Grintsvayg <grin@lbry.com>
2021-10-18 16:36:42 -07:00
Roy Lee
876a9c08f3 [lbry] chaincfg: setup genisis blocks 2021-10-18 16:36:42 -07:00
Roy Lee
e90dc4231f [lbry] chaincfg: implement LBRY PoW Hash 2021-10-18 16:36:42 -07:00
Roy Lee
e6fb242e93 [lbry] add ClaimTrie to Block Header 2021-10-18 16:36:42 -07:00
Brannon King
605eae2b8b profile: support fgprof (flame graph) 2021-10-18 16:36:42 -07:00
Brannon King
682019d156 wire: optimize binaryFreeList handling 2021-10-18 16:36:42 -07:00
Roy Lee
900cee56a7 gitignore: ignore IDE stuff 2021-10-18 16:36:42 -07:00
Roy Lee
49c4b0f119 ci: Update Go toolchain to 1.16 2021-10-18 16:36:42 -07:00
Anirudha Bose
98fb089a21 Update release date for v0.22.0-beta in CHANGES file 2021-10-18 16:36:42 -07:00
John C. Vernaleo
97d1d114dc btcd: bump version to v0.22.0-beta 2021-10-18 16:36:42 -07:00
Anirudha Bose
34b571304f Update CHANGES file for 0.22.0 release 2021-10-18 16:36:42 -07:00
Olaoluwa Osuntokun
352e6e25bb mempool: add additional test case for inherited RBF replacement
In this commit, we add an additional test case for inherited RBF
replacement. This test case asserts that if a parent is marked as being
replaceable, but the child isn't, then the child can still be replaced
as according to BIP 125 it shoudl _inhreit_ the replaceability of its
parent.

The addition of this test case was prompted by the recently discovered
Bitcoin Core "CVE" [1]. It turns out that bitcoind doesn't properly
implement BIP 125. Namely it fails to allow a child to "inherit"
replaceability if its parent is also replaceable. Our implementation
makes this trait rather explicit due to its recursive implementation.
Kudos to the original implementer @wpaulino for getting this correct.

[1]: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-May/018893.html.
2021-10-18 16:36:42 -07:00
Oliver Gugger
8e94e9154e chaincfg: fix deployment bit numbers
On signet all previous soft forks and also taproot are always activated,
meaning the version is always 0x20000000 for all blocks. To make sure
they activate properly in `btcd` we therefore need to use the correct
bit to mask the version.
This means that on any custom signet there would need to be 2016 blocks
mined before SegWit or Taproot can be used.
2021-10-18 16:36:41 -07:00
John C. Vernaleo
75c5193db9 Don't reference the readme that we don't produce 2021-10-18 16:36:41 -07:00
Johan T. Halseth
f780a6086f rpctest: add witness commitment when calling CreateBlock
If we tried to include transactions having witnesses, the block would be
invalid since the witness commitment was not added.
2021-10-18 16:36:41 -07:00
Johan T. Halseth
1d9815573a mining: extract witness commitment add into method 2021-10-18 16:36:41 -07:00
Oliver Gugger
a76afa1e98 btcctl: add signet param
This commit adds the --signet command line flag to the btcctl utility.
2021-10-18 16:36:41 -07:00
Oliver Gugger
d069d16fc7 rpcserver: add taproot deployment to getblockchaininfo 2021-10-18 16:36:41 -07:00
Oliver Gugger
a0a92386e6 config+params: add signet config option
This commit adds the --signet command line flag (or signet config
option) for starting btcd in signet mode.
2021-10-18 16:36:41 -07:00
Oliver Gugger
d17e62ae3e wire+chaincfg: add signet params
This commit adds all necessary chain parameters for connecting to the
public signet network.
Reference: https://github.com/bitcoin/bitcoin/pull/18267
2021-10-18 16:36:41 -07:00
Aurèle Oulès
e04fea4c23 btcjson: Updated TxRawResult.Version from int32 to uint32 2021-10-18 16:36:41 -07:00
Jake Sylvestre
5f18190000 rpcclient: fix documentation typo 2021-10-18 16:36:41 -07:00
Wilmer Paulino
46c53fa346 build: update btcutil dependency 2021-10-18 16:36:41 -07:00
Gustavo Chain
8dc0b54ebf addrmgr: Use RLock/RUnlock when possible 2021-10-18 16:36:41 -07:00