76 Commits

Author SHA1 Message Date
Jamie Lokier
aee0fe39d2
EVM: Remove vm_types2 everywhere, use common forks list instead
File `vm_types2` is obsolete.  Remove this file and divert all imports to the
common forks list outside the EVM, or in some cases they don't need it anyway.

Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-06-08 15:36:31 +01:00
Jamie Lokier
613f06e61c
Whisper: Remove all the main Whisper code (config, startup, RPC etc)
This is the main patch which removes Whisper code from `nimbus-eth1` code.
It removes all configuration, help, startup, JSON-RPC calls and most types.

Note, there is still Whisper functionality in `nim-eth`.  Also, the "wrapper"
under `wrappers/` isn't dealt with by this change, but it's not built by
default (and might not currently work).

Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-06-01 18:12:48 +01:00
Jamie Lokier
774f697c73
Whisper: Disable Whisper (Shh) protocol by default
This commit turns Whisper off by default, without changing anything else.

So this can be cherry-picked if you just want to disable Whisper without
removing it.

Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-06-01 18:12:47 +01:00
jangko
396f3e9909
add missing poaEngine configuration in config.nim
later we will use real engine configuration it if become available to us
2021-05-24 14:35:47 +07:00
jangko
b82061bf46
don't mix customBootNodes and bootNodes usage 2021-05-20 14:04:17 +07:00
jangko
a0d10f5728
drop PublicNetwork enum usage and replace it with NetworkId
we cannot limit the `--networkid` switch to values available in
`PublicNetwork` enum. it should able to accept very wide range of
custom NetworkId.
2021-05-20 14:04:16 +07:00
jangko
f2491e6307
fixes crappy custom genesis and chain config parser
instead of using stdlib/json, now we switch to json_serialization
the result is much tidier code and more robust when parsing
optional fields.

fixes #635
2021-05-13 16:04:08 +07:00
jangko
a57ac65c8c
fixes --customnetwork parser
now it can ignore an optional fork e.g. MuirGlacier
2021-05-12 19:05:32 +07:00
jangko
97f4226171
update berlin fork number in config.nim
also update test_forkid because of berlin changes
2021-05-12 17:24:27 +07:00
jangko
e6d7d6188c
processArguments now can have alternate OptParser instead of fixed one
the `processArguments` now have overloaded proc, one with opt param and one without.
the OptParser now can be passed to `opt` param.
this is useful in scenario where in test code we need to simulate something
without using real command line arguments.
2021-04-30 12:56:19 +07:00
jangko
68e70ebdca
fixes hard fork block number initialization in processCustomGenesisConfig
rather than initialize it to 0, those block numbers
are initialized to high(BlockNumber). this will fix
issue when imported genesis.json doesn't contains all
forks' blockNumber.
2021-04-30 12:56:18 +07:00
Jamie Lokier
90cefc7a3d
Shell: Update help text to match reality
Capitalisation:
- The option is lower case `--logmetrics` but help said `--logMetrics`
- Same for `--logmetricsiterval`
- Same for `--metricsserver` and `--metricsserverport`

Ethereum network selection:
- Moved out into their own, cleaner help section
- Added help for `--mainnet`, `--goerli` and `--kovan`
- Moved `--networkid` and `--customnetwork` to this section as well

Other:
- Reworded or formatted some help lines for clarity and consistency

Changed options:
- Renamed `--metricserver` to `--metrics`
- Renamed `--matricsserverport` to `--metricsport`
- Removed Morden network; this didn't have an option, but could be
  selected with `--networkid:2` and then fail to work

Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-04-27 11:11:13 +01:00
jangko
34536b0d25
add --graphql and --graphqlbind to cli parser 2021-04-24 10:58:05 +07:00
Jacek Sieka
3147df0dcd
switch to chronos metrics, remove insecure (#580)
* switch to chronos metrics, remove insecure

See https://github.com/status-im/nimbus-eth2/pull/2468

also fixes pcre linking for real, and adds some random build flags that
help nimbus-eth2 stay afloat

* fix help

* don't omit frame pointers on windows
2021-04-09 09:26:06 +02:00
Jordan Hrycaj
2eb46ca221
Merge pull request #573 from status-im/feature/isolate-evms
Feature/isolate evms
2021-04-08 08:00:34 +01:00
jangko
a923016a12
allow missing chainId in chain config 2021-04-08 08:52:41 +07:00
Jordan Hrycaj
00ba7a2718
merge vm_forks and vm_opcode_values => vm_type2
why:
  all types, but they cannot be merged int vm_types because of a circular
  dependency.
2021-03-31 17:53:15 +01:00
Jordan Hrycaj
3a3e4d5707
provide vm_forks as import/export wrapper
details:
  moved original vm/interpreter/vm_forks.nim => vm/interpreter/nvm_forks.nim
2021-03-31 16:03:34 +01:00
jangko
2cd081495b implement '--import': import rlp encoded block(s), validate, write to db and quit 2021-03-23 10:37:00 +07:00
jangko
8e4b917fd3 allow custom net parser to skip chain config and only parse genesis data 2021-02-16 10:37:42 +07:00
jangko
8486c1834c fixes #558, use distinct uint for ChainId and NetworkId to prevent confusion 2021-02-14 11:01:27 +07:00
jangko
2566cebfe0 fixes #548, custom network json parser now behaves like geth 2021-02-11 18:19:33 +07:00
jangko
c68aa47464
fixes fork comparison related code 2020-11-19 11:59:53 +07:00
jangko
f82dff64fa
implement more eth rpc and keystore management 2020-07-23 14:54:32 +07:00
jangko
032c29288a
fix git revision string in config.nim 2020-07-22 18:40:12 +07:00
jangko
165f9fea2e
reduce warnings 2020-07-21 13:15:06 +07:00
jangko
ab5c763a84
move rng to configuration 2020-07-21 00:16:59 +07:00
jangko
845671bf0a
fix compilation error following breaking changes in nim-eth 2020-07-20 13:50:05 +07:00
jangko
12ddfee675
fix compilation error related to lib-secp256k1 changes 2020-06-24 17:07:33 +07:00
Jacek Sieka
4ade5797ee
rlp: don't use ranges / experimental features (#495) 2020-04-20 20:12:44 +02:00
Ștefan Talpalaru
a783b096fe
bump vendor/nimbus-build-system (#491)
* bump vendor/nimbus-build-system

- add the Nim compiler header to the Nimbus header
- also support the USE_LIBBACKTRACE env var

* "go-checks" target no longer available
2020-04-16 00:21:58 +02:00
andri lim
e324a7342d
move toFork to config.nim 2020-04-12 17:07:09 +07:00
andri lim
a864967c4f
more to update chain config [skip ci] 2020-04-11 16:59:46 +07:00
andri lim
d69ede6060 add goerli testnet genesis data[skip ci] 2020-04-09 19:13:17 +03:00
andri lim
1ad0dcd586
fix testnet config 2020-04-08 16:53:26 +07:00
Jacek Sieka
c1899711c9
keep up with nim-eth (#483)
* keep up with nim-eth
2020-04-07 11:53:50 +02:00
Jacek Sieka
1d472cf090
Eth keys (#482)
* bump nim-eth, fix deprecated calls
2020-04-05 15:12:48 +02:00
acolytec3
45cda8bab0 Add support for custom genesis blocks 2020-01-20 06:35:35 -05:00
kdeme
9aae2f9463 No more blind except 2019-12-05 13:02:21 +01:00
Ștefan Talpalaru
5a18227562
add Git revision to NimbusHeader 2019-11-10 18:44:40 +01:00
Ștefan Talpalaru
c1621a518b
bump vendor/nim-metrics 2019-11-10 18:28:55 +01:00
kdeme
1e716a960a Refactor bootnodes and whispernodes 2019-08-16 08:51:40 +02:00
Ștefan Talpalaru
1d7e14dc1b
refactor the C and Go wrapper build system
- moved "nimbus/api" to "wrappers"
- renamed files
- replaced the build scripts with Makefile targets
- set the rpath relative to the test binary's location so it can look
  for libnimbus.so there at runtime
- libnimbus.so.0 required on Linux, apparently
- compiled all the Nimbus code with `--app:lib`, not just one file (this
  required skipping a proc in "nimbus/config.nim" because it uses an API
  that's unavailable in libraries)
- removed static linking from the Go wrapper. It doesn't make sense at a
  global level, when using a shared Nimbus library. To selectively link
  static libraries, we should probably be specifying them as *.a. I did
  build a static libnimbus.a, as a test, but it insisted on dlopen-ing a
  shared version of itself which looked too ugly to continue.
2019-08-02 18:13:47 +02:00
kdeme
f2f2f57040 Add new bootnodes (#353)
* Add new bootnodes and remove legacy bootnodes

* Clean-up network selection
2019-07-30 11:00:55 +02:00
Ștefan Talpalaru
409d771a50 metrics: put the HTTP server under -d:insecure
- also fix an option parsing bug
- bump vendor/nim-eth and vendor/nim-metrics
2019-07-19 15:17:51 +03:00
Ștefan Talpalaru
0f3d05bf68 metrics: HTTP server disabled by default
- metric logging added
- new Nimbus options: --metricsServer, --metricsServerPort:<value>,
  --logMetrics, --logMetricsInterval:<value>
2019-07-19 15:17:51 +03:00
Ștefan Talpalaru
2d9f62530b metrics HTTP server replacing the periodic "stats" logging
and example prometheus.yml file to use it as a scraping target
2019-07-19 15:17:51 +03:00
kdeme
f62816c4f3 Use of BlockNumber to be able to switch between UInt256 and int64 2019-07-10 20:56:05 +02:00
kdeme
46fb9dc1b2 Add staticnodes, protocols, and whisper config options (#319) 2019-04-23 07:49:49 -06:00
Ștefan Talpalaru
d4aff04cbd
NAT port mapping 2019-04-17 03:56:28 +02:00