nimbus-eth2/tests/mocking
Jacek Sieka 03a147ab8d
avoid state copy in state transition (#930)
In BlockPool, we keep the head state around, so it's trivial to restore
the temporary state there and keep going as if nothing happened.

This solves 3 problems:
* stack space - the state copy on mainnet is huge
* GC scanning - using stack space for state slows down the GC
significantly
* reckless copying - the copy itself takes a long time

In state_sim, we'll do the same and allocate on heap - this helps a
little with GC - without it, the collection of the temporary strings
created with `toHex` while printing the json dominates the trace.
2020-04-26 21:13:33 +02:00
..
mock_attestations.nim avoid state copy in state transition (#930) 2020-04-26 21:13:33 +02:00
mock_blocks.nim avoid state copy in state transition (#930) 2020-04-26 21:13:33 +02:00
mock_deposits.nim refactor some Merkle proof generation code outside tests; remove unused variables/functions 2020-04-15 09:59:49 +00:00
mock_genesis.nim Introduce BeaconNodeRef and use it in all the right places 2020-04-26 13:04:53 +03:00
mock_state.nim replace links to Apache and MIT licenses with HTTPS versions (#592) 2019-11-25 16:30:02 +01:00
mock_validator_keys.nim crypto: cleanup (#882) 2020-04-11 10:51:07 +02:00