go-ethereum/consensus/ethash
Martin Holst Swende 178debe435
consensus/ethash: avoid runtime errors due to OOD on mmap writes (#23799)
When we map a file for generating the DAG, we do a simple truncate to e.g. 1Gb. This is fine, even if we have nowhere near 1Gb disk available, as the actual file doesn't take up the full 1Gb, merely a few bytes. When we start generating into it, however, it eventually crashes with a unexpected fault address .

This change fixes it (on linux systems) by using the Fallocate syscall, which preallocates suffcient space on disk to avoid that situation. 


Co-authored-by: Felix Lange <fjl@twurst.com>
2021-11-02 11:33:54 +01:00
..
algorithm.go consensus/ethash: replace a magic number with it's constant (#22618) 2021-04-06 21:02:52 +03:00
algorithm_test.go cmd/geth, consensus/ethash: add support for --miner.notify.full flag (#22558) 2021-03-26 18:30:10 +01:00
api.go all: fix miner hashRate -> hashrate on API calls 2021-03-31 10:56:51 +03:00
consensus.go cmd/geth, cmd/evm, params: implement Arrow Glacier (EIP 4345) (#23810) 2021-10-28 22:18:14 +02:00
consensus_test.go consensus/ethash: implement faster difficulty calculators (#21976) 2020-12-11 11:06:44 +01:00
difficulty.go go.mod: upgrade to github.com/holiman/uint256 v1.2.0 (#22745) 2021-05-10 12:29:33 +02:00
ethash.go consensus/ethash: avoid runtime errors due to OOD on mmap writes (#23799) 2021-11-02 11:33:54 +01:00
ethash_test.go all: fix miner hashRate -> hashrate on API calls 2021-03-31 10:56:51 +03:00
mmap_help_linux.go consensus/ethash: avoid runtime errors due to OOD on mmap writes (#23799) 2021-11-02 11:33:54 +01:00
mmap_help_other.go consensus/ethash: avoid runtime errors due to OOD on mmap writes (#23799) 2021-11-02 11:33:54 +01:00
sealer.go consensus/ethash: less allocation during mining (#23199) 2021-07-28 14:24:41 +02:00
sealer_test.go cmd/geth, consensus/ethash: add support for --miner.notify.full flag (#22558) 2021-03-26 18:30:10 +01:00