fanquake
8a373a5c7f
Merge bitcoin/bitcoin#27191 : blockstorage: Adjust fastprune limit if block exceeds blockfile size
...
8f14fc8622 test: cover fastprune with excessive block size (Matthew Zipkin)
271c23e87f blockstorage: Adjust fastprune limit if block exceeds blockfile size (Martin Zumsande)
Pull request description:
The debug-only `-fastprune` option used in several tests is not always safe to use:
If a `-fastprune` node receives a block larger than the maximum blockfile size of `64kb` bad things happen: The while loop in `BlockManager::FindBlockPos` never terminates, and the node runs oom because memory for `m_blockfile_info` is allocated in each iteration of the loop.
The same would happen if a naive user used `-fastprune` on anything other than regtest (so this can be tested by syncing on signet for example, the first block that crashes the node is at height 2232).
Change the approach by raising the blockfile size to the size of the block, if that block otherwise wouldn't fit (idea by TheCharlatan).
ACKs for top commit:
ryanofsky:
Code review ACK 8f14fc8622 . Added new assert, test, and comment since last review
TheCharlatan:
ACK 8f14fc8622
pinheadmz:
ACK 8f14fc8622
Tree-SHA512: df2fea30613ef9d40ebbc2416eacb574f6d7d96847db5c33dda22a29a2c61a8db831aa9552734ea4477e097f253dbcb6dcb1395d43d2a090cc0588c9ce66eac3
2023-05-02 10:04:34 +01:00
..
2023-04-21 11:19:08 +01:00
2023-04-19 10:48:30 +02:00
2023-04-03 14:44:48 +01:00
2023-02-06 13:56:51 -05:00
2022-08-13 13:55:38 +01:00
2023-02-15 14:58:47 +00:00
2023-04-19 10:48:30 +02:00
2023-04-19 10:48:30 +02:00
2023-04-11 15:55:31 -04:00
2023-03-23 12:55:18 +01:00
2023-04-18 11:57:29 +01:00
2022-09-29 16:43:30 +01:00
2023-01-31 18:48:50 +01:00
2022-10-23 15:03:04 +01:00
2023-05-02 10:04:34 +01:00
2023-04-19 10:48:30 +02:00
2022-12-24 23:49:50 +00:00
2023-04-21 11:19:08 +01:00
2023-05-01 09:10:11 -04:00
2023-04-19 10:48:30 +02:00
2023-04-14 10:35:51 -04:00
2023-03-23 19:38:38 +01:00
2023-04-26 11:18:09 +01:00
2023-03-03 15:23:43 +01:00
2023-04-19 10:48:30 +02:00
2023-05-01 08:38:50 -04:00
2023-04-19 10:48:30 +02:00
2022-04-26 10:43:33 +01:00
2023-03-26 20:18:13 +01:00
2023-04-19 10:48:30 +02:00
2023-03-23 12:55:18 +01:00
2023-03-17 17:59:02 -07:00
2023-03-17 17:59:02 -07:00
2023-03-17 18:02:40 -07:00
2022-12-24 23:49:50 +00:00
2023-02-01 11:33:35 +01:00
2023-04-19 10:48:30 +02:00
2023-03-23 12:55:18 +01:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-04-19 10:48:30 +02:00
2023-04-19 10:48:30 +02:00
2023-04-19 10:48:30 +02:00
2023-04-19 10:48:30 +02:00
2023-04-19 10:48:30 +02:00
2023-04-19 10:48:30 +02:00
2023-01-26 10:44:05 +01:00
2023-02-15 14:42:28 -08:00
2023-01-31 19:34:35 +01:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-01-05 09:05:14 +00:00
2023-04-19 10:48:30 +02:00
2023-03-15 16:43:31 +01:00
2023-04-19 10:48:30 +02:00
2023-04-20 06:08:22 -07:00
2023-03-21 13:04:21 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-03-23 19:38:38 +01:00
2023-03-23 19:38:38 +01:00
2023-02-03 18:15:42 +01:00
2023-01-26 10:44:05 +01:00
2023-02-03 18:15:42 +01:00
2023-01-31 11:50:10 +00:00
2023-03-23 12:55:18 +01:00
2023-03-23 12:55:18 +01:00
2023-03-15 16:42:42 +01:00
2023-03-15 16:42:42 +01:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-04-19 10:48:30 +02:00
2023-02-01 11:33:35 +01:00
2023-02-01 11:33:35 +01:00
2023-03-23 12:52:00 +01:00
2023-04-03 14:41:22 +01:00
2022-12-24 23:49:50 +00:00
2023-01-30 15:57:12 +00:00
2022-12-12 21:06:04 +00:00
2022-12-12 21:06:04 +00:00
2023-04-19 10:48:30 +02:00
2023-04-21 11:19:08 +01:00
2022-12-24 23:49:50 +00:00
2023-04-19 10:48:30 +02:00
2023-03-23 12:55:18 +01:00
2023-04-19 10:48:30 +02:00
2022-12-24 23:49:50 +00:00
2023-01-17 18:31:51 +01:00
2023-01-31 19:34:35 +01:00
2023-01-31 11:50:10 +00:00
2023-04-05 11:50:27 +01:00
2023-03-23 12:55:18 +01:00
2023-04-21 11:19:08 +01:00
2023-03-23 19:38:38 +01:00
2022-04-26 16:25:38 -04:00
2022-06-23 15:33:01 +02:00
2022-07-21 10:42:09 +01:00
2023-02-27 13:53:29 +00:00
2022-09-13 17:15:17 +01:00
2022-09-13 17:15:17 +01:00
2022-11-17 14:52:45 +00:00
2023-03-23 19:38:38 +01:00
2023-04-20 16:20:15 -04:00
2023-02-17 13:34:40 -05:00
2023-01-28 15:24:13 +00:00
2023-03-23 19:38:38 +01:00
2022-12-24 23:49:50 +00:00
2023-04-21 11:19:08 +01:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-04-21 11:19:08 +01:00
2023-04-03 15:42:15 -03:00
2023-02-17 13:34:40 -05:00
2023-02-17 13:34:40 -05:00
2023-03-13 17:09:54 +01:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-04-20 14:35:53 +01:00
2022-12-24 23:49:50 +00:00
2023-04-16 23:48:05 +02:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-04-19 10:48:30 +02:00
2022-12-24 23:49:50 +00:00
2023-04-21 14:06:12 -04:00
2023-04-21 14:06:12 -04:00
2023-01-13 09:40:57 +00:00
2023-01-13 09:40:57 +00:00
2023-03-02 14:48:28 +01:00
2023-02-15 14:58:47 +00:00
2023-04-03 14:44:48 +01:00
2023-04-17 10:13:34 -03:00
2023-01-12 13:42:44 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-01-31 11:50:10 +00:00
2023-02-28 12:04:47 -05:00
2023-04-19 10:48:30 +02:00
2023-01-31 11:50:10 +00:00
2023-02-02 10:47:37 +00:00
2023-01-25 09:33:26 +01:00
2023-04-19 10:48:30 +02:00
2022-12-24 23:49:50 +00:00
2023-01-31 11:50:10 +00:00
2023-04-19 10:48:30 +02:00
2023-03-23 12:55:18 +01:00
2023-03-13 17:09:54 +01:00
2023-03-23 12:55:18 +01:00
2023-04-19 10:48:30 +02:00
2023-02-01 11:33:35 +01:00
2023-01-26 10:36:18 +00:00
2023-01-26 10:36:18 +00:00
2022-12-10 14:34:44 -06:00
2023-02-06 13:56:51 -05:00
2023-04-26 11:18:09 +01:00
2023-04-03 14:41:22 +01:00
2023-02-01 11:33:35 +01:00
2023-01-05 09:05:14 +00:00
2023-01-03 19:31:29 -06:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00