Commit Graph

5783 Commits

Author SHA1 Message Date
bestmike007
6b2a562d90 feat: puppet mode mocknet 2022-09-01 17:02:01 +00:00
Jude Nelson
1a34c11508 feat: release 2.05.0.3.0 2022-08-31 13:41:12 -04:00
Jude Nelson
74771773c2 Merge branch 'develop' into feat/drop-problematic-transactions 2022-08-03 00:55:05 +00:00
Jude Nelson
c21870f33a refactor: make PeerNetwork::with_inv_state() take a closure that returns R instead of Result<R, net_error> 2022-08-02 11:22:15 -04:00
Jude Nelson
155e0a5809 fix: make the network state-machine processing steps (in particular, mempool sync) infallible -- make them absorb all errors and simply retry their execution instead of propagating them to the caller of PeerNetwork::run() 2022-07-31 09:29:19 -04:00
Jude Nelson
2545a64437 fix: make process_new_sockets() infallible -- it doesn't need to return Err(..) if the http server isn't initialized 2022-07-31 09:28:53 -04:00
Jude Nelson
960cdf82e4 fix: make top-level inv sync state machine infallible -- it absorbs all errors that could happen 2022-07-31 09:28:23 -04:00
Jude Nelson
dc2d1e06a1 fix: make attachment enqueuing fail specifically due to DB errors, since that's the only way it can fail 2022-07-31 09:27:55 -04:00
Jude Nelson
5ead5882d2 Merge branch 'develop' into feat/drop-problematic-transactions 2022-07-29 19:47:31 +00:00
Jude Nelson
3fbbf192b4 Merge branch 'develop' into feat/set-local-peer-privkey 2022-07-26 21:46:14 -04:00
Jude Nelson
71abb88b6c Merge branch 'develop' into feat/drop-problematic-transactions 2022-07-27 01:30:25 +00:00
Jude Nelson
913b0f9dde fix: test coverage for blacklist size shrinkage due to being too big 2022-07-25 14:57:41 -04:00
Jude Nelson
0e241ab32e fix: limit the size of the blacklist by deleting random txids if we go over. 2022-07-25 14:57:03 -04:00
Jude Nelson
b364c213b5 fix: store the private key to local_peer if given to PeerDB::connect() 2022-07-25 14:28:07 -04:00
Jude Nelson
606640f80b feat: unit test to verify that blacklisted transactions never get relayed 2022-07-22 12:43:50 -04:00
Jude Nelson
95f0fbc4ca feat: unit test for dropping and blacklisting transactions 2022-07-22 12:43:35 -04:00
Jude Nelson
0181134ff7 feat: add a blacklisted txid table (bumping the schema version), which contains all txids of transactions the miner found to be problematic (i.e. can't be mined, and shouldn't ever be relayed again). Add an API to drop and blacklist transactions. 2022-07-22 12:42:46 -04:00
Jude Nelson
2a965385db feat: ProblematicTransaction error variant 2022-07-22 12:42:30 -04:00
Jude Nelson
441e1d0e6b feat: identify transactions that fail at *runtime* due to an analysis-time error. This ideally should never happen, but there are a few cases where it does (and, it means that miners spend non-trivial compute time on transactions they can't claim tx fees for). Identify these transactions as "problematic" transactions, and drop them from the mempool and blacklist them so they can't keep circulating in the network. 2022-07-22 12:41:27 -04:00
Jude Nelson
3a9d10d85b refactor: expose handle_clarity_runtime_error() 2022-07-22 12:41:05 -04:00
Jude Nelson
c3611ec336 feat: TemporarilyBlacklisted error variant for mempool rejection 2022-07-22 12:40:46 -04:00
Jude Nelson
d11e77b7f2 chore: remove compile-time test warning 2022-07-22 12:40:26 -04:00
Aaron Blankstein
2ed263671e Merge branch 'develop' into chore/master-to-develop 2022-07-22 09:55:31 -05:00
Aaron Blankstein
1468e6404d fix type error in monitoring_prom build 2022-07-21 18:04:09 -05:00
Aaron Blankstein
c3651079cc Merge branch 'master' into chore/master-to-develop 2022-07-18 14:57:06 -05:00
Greg Coppola
4d2b296ad3 fix: build 2022-07-06 09:53:23 -05:00
Greg Coppola
f0b4e71402 review: use IntGauge for LAST_BLOCK_TRANSACTION_COUNT 2022-07-05 20:59:26 -05:00
Greg Coppola
08b0516ae8 feat: add tx/block to prometheus outputs 2022-07-01 10:58:11 -05:00
Greg Coppola
2b2d926fd4 Merge branch 'develop' into fix/log-all-tx 2022-06-27 17:12:18 -05:00
Greg Coppola
eebcaeb241 don't push Skipped events to the observer 2022-06-27 15:07:32 -05:00
Greg Coppola
55719e0202 fixed comment 2022-06-27 12:59:34 -05:00
Hank Stoever
ff6ec405fc fix: cargo fmt 2022-06-10 09:31:25 -07:00
Hank Stoever
4bb2a47450 chore: comment cleanup 2022-06-08 07:43:06 -07:00
Hank Stoever
beedf34775 fix: cleanup saving coverage into function 2022-06-08 07:42:33 -07:00
Hank Stoever
8bf9fcd6f1 feat: add coverage flags to clarity-cli 2022-06-07 09:06:37 -07:00
Jude Nelson
5b326f9d35 chore: cargo fmt 2022-05-28 22:45:44 -04:00
Jude Nelson
e1319a9e81 fix: compile-time error 2022-05-28 22:45:19 -04:00
Jude Nelson
9f510fd594 fix: use .saturating_sub() when determining the header range to copy over to the .reorg DB, and use K/V logging. Also, add multi-word test vectors to hex codec for uint256 2022-05-28 22:21:03 -04:00
Jude Nelson
1cc98b552f fix: prime the .reorg DB with the parent of the first header we expect to download (off-by-one error) 2022-05-26 21:35:12 -04:00
Jude Nelson
debf40c35c refactor: better name 2022-05-26 15:44:34 -04:00
Jude Nelson
437381e339 fix: test that the SPV chain tip is within 2 hours of now 2022-05-26 15:43:56 -04:00
Jude Nelson
6c9221aa7a fix: update sync_with_indexer() to assume that find_chain_reorg() does the bookkeeping on the SPV DB, so it doesn't have to 2022-05-26 13:57:39 -04:00
Jude Nelson
4721f67078 fix: use the correct chainwork calculation by summing over individual headers 2022-05-26 13:57:14 -04:00
Jude Nelson
fcbc660608 chore: s/InvalidDifficulty/InvalidChainWork/g 2022-05-26 13:56:55 -04:00
Jude Nelson
c6ac355f34 feat: have find_bitcoin_reorg() actually merge the reorg headers and chainwork into the original SPV database, instead of re-downloading the same headers and hoping for the best. Also, update the mainnet unit test to compare chainwork against known chainwork from bitcoind 2022-05-26 13:55:54 -04:00
Jude Nelson
11f6d7ee16 chore: unused mut 2022-05-26 00:13:11 -04:00
Jude Nelson
998b9b73d8 feat: update the SPV client to track the total chain work over time. BUT, right now the work calculation for a difficulty adjustment interval is getting the wrong answers and I don't know why. 2022-05-26 00:12:39 -04:00
Jude Nelson
04d2275aa0 chore: add InvalidDifficulty variant 2022-05-26 00:12:26 -04:00
Jude Nelson
74cc416952 chore: convert immunefi bug report into test vectors and update the indexer's find_bitcoin_reorg() method to check the original and reorg chain's total work in order to decide whether to move forward with reorg processing. 2022-05-26 00:11:32 -04:00
Greg Coppola
dd2c17ad54 fix Some(None) bug, and reformat messages 2022-05-25 15:44:20 -05:00