* When tls is on, use passthrough framer and passthrough handshaker to avoid double encryption
Signed-off-by: Saravana Perumal Shanmugam <perusworld@linux.com>
* catch exception and shorten warning log
Signed-off-by: Frank Li <b439988l@gmail.com>
Co-authored-by: Frank Li <frank@Franks-MacBook-Pro.local>
Co-authored-by: matkt <karim.t2am@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Diego López León <dieguitoll@gmail.com>
Co-authored-by: garyschulte <garyschulte@gmail.com>
Broad reaching optimizations to speed up EVM calculations
* Generally speaking, use int and long where it is more appropriate than UInt256 (memory indexes mostly)
* Move the internal stack to Bytes from UInt256
* Re-work the flow of many operations to account for the above
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Create new datatypes module
Create a new `datatypes` module to hold datatypes that are broadly used.
This will aid modularization by making sure the base types in the module
minimize the amount of unrelated support classes needed.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Add Address, Hash, and Wei to datatypes
Move the Address, Hash, and Wei to datatypes in as they are needed for
EVM modularization.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Update spotless to 5.14.2 and java-google-format to 1.10.0.
Both of these are needed to support Java 16 and Gradle 7.x.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* change enr sequence field to be a long scalar instead of open ended byte array
* handles missing source addresses
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
* Upgrade to Apache Tuweni 2.0
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Remove intermediate repository
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Remove all occurrences of toBytes
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Migrate to tuweni-bytes
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* add changelog
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* correct reference tests
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Initial API changes
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* more changes
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Change APIs for VM ops
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Use constant UInt256.ONE
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Optimize a bit address <> word transformation
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* spotless
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* change enr sequence field to be a long scalar instead of open ended byte array
* removed utility method for creating packets
* made ping/pong parsing backwards compatible with older besu clients
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
* seems like a reasonable use for TRACE level instead of DEBUG
* hint to user they should adjust logging if they really want to see the body of the corrupt HELLO
* include actual nodeId length in error message
Signed-off-by: Justin Florentine <jflorentine@gmail.com>
Co-authored-by: Justin Florentine <jflorentine@gmail.com>
Co-authored-by: matkt <karim.t2am@gmail.com>
Co-authored-by: garyschulte <garyschulte@gmail.com>
This takes care of the current requirements as well as provide the possibility of adding other channel handlers before that like for example a TLS handler
Signed-off-by: Saravana Perumal Shanmugam <perusworld@linux.com>
* Fix discovery packet size
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Add assertion to check the size of the packet once encoded
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* code review
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
If peer discovery was disabled, we would still try to create a Node Record even though we hadn't initialized required fields.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
We wrote the saved the new node record to disk but we didn't set it on the DiscoveryPeer class so we were still responding with the old one.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
We were creating new in-memory storage segments each time we were
supposed to be retrieving it which prevented me from being able to test
what keys ended up being stored in that segment.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Not all clients implement EIP-706, even though they may advertise a
version 5 in the hello packet. To cope with this if we are expecting
compression but haven't had a compressed message yet and a new message
fails to decompress we turn off compression and try again.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Remove all but 4 log4j2.xml config files
* The main config for the besu CLI app
* The config for the evmTool CLI app
* The config for acceptance tests
* A config in testUtil
If any tests depend on a log4j file they should import testutil.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* #1695 - Added support for EIP-868
Signed-off-by: David Mechler <david.mechler@consensys.net>
* Fix broken test
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1695 - Added tests for new functionality
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1695 - spotlessApply
Signed-off-by: David Mechler <david.mechler@consensys.net>
* Update changelog
Signed-off-by: David Mechler <david.mechler@consensys.net>
Adding the Log4j "jul" (java.util.logging) adapter resulted in many
messages like this at startup:
`main INFO Registered Log4j as the java.util.logging.LogManager.`
These come from the Log4j status logger. We can get rid of those by
setting the status attribute on all configurations to a higher logging
level. WARN is the next higher level.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* #1561 - Create/store/update ENR when local node is created
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1561 - spotlessApply
Signed-off-by: David Mechler <david.mechler@consensys.net>
* Update discovery library to prod version 0.4.1
Signed-off-by: David Mechler <david.mechler@consensys.net>
* Add DNS discovery for goerli, rinkeby and mainnet to help speed up discovery of peers
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Add final to constant fields
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Co-authored-by: David Mechler <david.mechler@consensys.net>