* Use type name eth and snap (rather than snap1)
* Prettified snap/eth handler trace messages
* Regrouped sync sources
details:
Snap storage related sources are moved to common directory.
Option --new-sync renamed to --snap-sync
also:
Normalised logging for secondary/non-protocol handlers.
* Merge protocol wrapper files => protocol.nim
details:
Merge wrapper sync/protocol_ethxx.nim and sync/protocol_snapxx.nim
into single file snap/protocol.nim
* Comments cosmetics
* Similar start logic for blockchain_sync.nim and sync/snap.nim
* Renamed p2p/blockchain_sync.nim -> sync/fast.nim
new hive features introduces breaking changes we need to address:
- expose engine api port 8551 in docker script
- export enode.sh file to hive-bin folder
- add terminalTotalDifficulty to mapper.jq
* Activate wire protocol eth/66
and:
Disentangle protocol_eth66.nim from import sections
why:
Importing the protocol_eth66 module is not necessary. There is
no need to know too many details of the underlying wire protocol. All
that is needed will be exported by blockchain_sync.nim.
* fixes, and rebase
* Update nimbus/p2p/blockchain_sync.nim
Co-authored-by: Kim De Mey <kim.demey@gmail.com>
* Fixes and rebase
Co-authored-by: Kim De Mey <kim.demey@gmail.com>
Adds changes to Nimbus Hive support for the new
[Arrow Glacier fork](https://eips.ethereum.org/EIPS/eip-4345).
While here:
- Fix typo in `nimbus.sh`:
`HIVE_FORK_MUIRGLACIER` => `HIVE_FORK_MUIR_GLACIER` (just a comment).
- Add `muirGlacierBlock` to the JSON generated in `extract_consensus_data.nim`.
This makes it symmetric with the JSON parsed in `mapper.jq`.
- Removed "At5" network names which are not used by any of the test suite.
These are `ByzantiumToConstantinopleAt5`, `ConstantinopleFixToIstanbulAt5`
and `IstanbulToBerlinAt5`.
The motivation for removing these instead of systematically including all
possibilities was that I realised `LondonToArrowGlacierAt5` does not appear
anywhere in the current test suite, even though `ArrowGlacier` does. As each
section in the code is rather large already, I thought it cleaner to not add
this one, and keep only the ones the test suite actually uses.
This also now better matches the code in `test_blockchain_json.nim`.
- Sorted `HomesteadToDaoAt5` before `HomesteadToEIP150At5` because the DAO
fork happened earlier than EIP-150 in real life.
Signed-off-by: Jamie Lokier <jamie@shareable.org>
this is a preparation for migration to confutils based config
although there is still some getConfiguration usage in tests code
it will be removed after new config arrived
This preparation is needed for subsequent
EIPs included in London.
- Add London to Fork enum
- Block number to fork
- Parsing London fork in chain config
- Prepare gas costs table for London
- Prepare EVM opcode dispatcher for London
- Block rewards for London
- Prepare hive script for London
* Re-adjust canonical head to parent of block to be inserted
why:
of the failing tests that remain to be solved, 30 of those will succeed
if the canonical database chain head is cleverly adjusted -- yes, it
looks like a hack, indeed.
details:
at the moment, this hack works for the non-hive tests only and is
triggered by a boolean argument passed on to the chain.persistBlocks()
method.
* Use parent instead of canonical head for block to be inserted
why:
side chains need to be inserted typically somewhere before the
canonical head.
details:
the previous _hack_ was unnecessary and removed, it was inspired by
some verification in persistBlocks() which explicitly referenced the
canonical head (which now might or might not refer to the newly inserted
header.)
* remove unnecessary code + comment
additional flags we use:
- [x] HIVE_NETWORK_ID network ID number to use for the eth protocol
- [x] HIVE_LOGLEVEL client loglevel (0-5)
- [x] HIVE_GRAPHQL_ENABLED enables graphql on port 8545
hive always set 'HIVE_FORK_DAO_VOTE' to '1'.
set 'daoForkSupport' to 'true' if only 'HIVE_FORK_DAO_BLOCK'
is set by hive, not depends only on 'HIVE_FORK_DAO_VOTE'.
This is because 'nimbus-eth1' internal is different compared to 'geth'.
now we have hive simulators written in nim:
- ethereum/consensus
- ethereum/graphql
Using these simulators, we can debug test cases without have to run
hive or docker.
this changes is required due to recent #654.
custom genesis and chain config parser are fixed
and the genesis fields are grouped into "genesis"
field, similar with chain config fields,
they are grouped in "config" field.
trying Jacek suggestion in #591, I added nat setting to
nimbus-eth1 hive shell script. visible difference after adding
this flag is the nat library not complaining about
"the gateway does not support nat-pmp" anymore.
but the slow startup time described in #591 is yet to be measured
again, although I already see improvement when executing
ethereum/consensus category in hive.
- Explain some of the prerequisites in more detail (Go version).
- Practical issues around Go version and Docker configuration to make it work.
- Make the first example be one that works with nimbus-eth1.
(Instead of giving an obscure error message that looks like the user's Docker
setup is broken).
- Rename to `README.md` per convention.
Signed-off-by: Jamie Lokier <jamie@shareable.org>