Enable optional chunked RLPx messages (#1010)

* Enable optional chunked RLPx messages

why:
  Legacy feature used by Nethermind

details:
  Disable with make flag: ENABLE_CHUNKED_RLPX=0

* Rebase & bump nim-eth

* Fix default behaviour

why:
  Got lost somehow. Comments do not match GNU make code directives.
This commit is contained in:
Jordan Hrycaj 2022-03-29 10:19:32 +01:00 committed by GitHub
parent a64da329e8
commit 4696a53302
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 4 deletions

View File

@ -92,15 +92,20 @@ ifneq ($(ENABLE_EVMC), 0)
endif
# disabled by default, enable with ENABLE_VM2LOWMEM=1
ifneq ($(ENABLE_VM2LOWMEM), 0)
ifneq ($(if $(ENABLE_VM2LOWMEM),$(ENABLE_VM2LOWMEM),0),0)
NIM_PARAMS += -d:vm2_enabled -d:lowmem:1
else
# disabled by default, enable with ENABLE_VM2=1
ifneq ($(ENABLE_VM2), 0)
ifneq ($(if $(ENABLE_VM2),$(ENABLE_VM2),0),0)
NIM_PARAMS += -d:vm2_enabled
endif
endif
# chunked messages enabled by default, use ENABLE_CHUNKED_RLPX=0 to disable
ifneq ($(if $(ENABLE_CHUNKED_RLPX),$(ENABLE_CHUNKED_RLPX),1),0)
NIM_PARAMS := $(NIM_PARAMS) -d:chunked_rlpx_enabled
endif
#- deletes and recreates "nimbus.nims" which on Windows is a copy instead of a proper symlink
update: | update-common
rm -rf nimbus.nims && \

View File

@ -217,6 +217,10 @@ engine is compiled. The variables are listed with decreasing priority (in
case of doubt, the lower prioritised variable is ignored when the higher on is
available.)
* ENABLE_CHUNKED_RLPX=0<br>
Disable legacy chunked RLPx messages which are enabled by default for
synchronising against `Nethermind` nodes
* ENABLE_EVMC=1<br>
Enable mostly EVMC compliant wrapper around the native Nim VM

View File

@ -18,7 +18,12 @@ func vmName(): string =
const
VmName* = vmName()
warningMSg = "*** Compiling with " & VmName & " enabled"
warningMSg = block:
var rc = "*** Compiling with " & VmName
when defined(chunked_rlpx_enabled):
rc &= ", chunked-rlpx"
rc &= " enabled"
rc
{.warning: warningMsg.}

2
vendor/nim-eth vendored

@ -1 +1 @@
Subproject commit e794c149f5df4047a9067fe55c9479893512a4b1
Subproject commit 4c7cdcaaf2147953624f20cd78b439151751c5a9