Small updates and fixes for rlpx suite (#2571)

* Remove redundant `eth/68` message and clean up docu

details:
  There is only eth/68 available at the moment

* Allow to turn on chronicles line number logging in `Makefile`

* Accept (and forget) tx hashes announcements

why:
  Does no harm to just ignore it at the moment

* Bump nim-eth (rlp fix)
This commit is contained in:
Jordan Hrycaj 2024-08-19 14:00:10 +00:00 committed by GitHub
parent 60c9b2c00d
commit 4db9c5c2d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 13 additions and 5 deletions

View File

@ -168,6 +168,9 @@ ENABLE_EVMC := 0
# "-d:release" cannot be added to config.nims # "-d:release" cannot be added to config.nims
NIM_PARAMS += -d:release NIM_PARAMS += -d:release
ifneq ($(if $(ENABLE_LINE_NUMBERS),$(ENABLE_LINE_NUMBERS),0),0)
NIM_PARAMS += -d:chronicles_line_numbers:1
endif
ifeq ($(BOEHM_GC),1) ifeq ($(BOEHM_GC),1)
NIM_PARAMS += --mm:boehm NIM_PARAMS += --mm:boehm
endif endif

View File

@ -205,11 +205,14 @@ available.)
cases when the `gc` is involved in a memory corruption or corruption cases when the `gc` is involved in a memory corruption or corruption
camouflage. camouflage.
* ENABLE_LINE_NUMBERS=1
Enables logger to print out source code location with log message
* ENABLE_EVMC=1<br> * ENABLE_EVMC=1<br>
Enable mostly EVMC compliant wrapper around the native Nim VM Enable mostly EVMC compliant wrapper around the native Nim VM
* ENABLE_VMLOWMEM=1<br> * ENABLE_VMLOWMEM=1<br>
Enable new re-factored version of the native Nim VM. This version is not Enable low-memory version of the native Nim VM. This version is not
optimised and coded in a way so that low memory compilers can handle it optimised and coded in a way so that low memory compilers can handle it
(observed on 32 bit windows 7.) (observed on 32 bit windows 7.)

View File

@ -19,10 +19,12 @@ func vmName(): string =
"nimvm" "nimvm"
const const
chronicles_line_numbers {.strdefine.} = "0"
VmName* = vmName() VmName* = vmName()
warningMsg = block: warningMsg = block:
var rc = "*** Compiling with " & VmName var rc = "*** Compiling with " & VmName
rc &= ", eth/68" if chronicles_line_numbers notin ["0", "off"]:
rc &= ", logger line numbers"
when defined(boehmgc): when defined(boehmgc):
rc &= ", boehm/gc" rc &= ", boehm/gc"
when 0 < coreDbBaseConfigExtras.len: when 0 < coreDbBaseConfigExtras.len:

View File

@ -448,8 +448,8 @@ method handleAnnouncedTxsHashes*(
txSizes: openArray[int]; txSizes: openArray[int];
txHashes: openArray[Hash256]; txHashes: openArray[Hash256];
): Result[void, string] = ): Result[void, string] =
## `Eth68` method trace "Wire handler ignoring txs hashes", nHashes=txHashes.len
notImplemented "handleAnnouncedTxsHashes()/eth68" ok()
method handleNewBlock*(ctx: EthWireRef, method handleNewBlock*(ctx: EthWireRef,
peer: Peer, peer: Peer,

2
vendor/nim-eth vendored

@ -1 +1 @@
Subproject commit 951150227350381bbabe596a714f9450571c16d0 Subproject commit 98b2a34075614f9ea8bd629c18580c16e8065397