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>
Allows nodes in a network to not strictly prefer older peers. This
helps break up impenetrable cliques in small, stable networks (private
networks often fit this description). We generate a random mask for the
lifetime of the process and use that to xor against the nodeId of a
potential peer. The desired behavior of the network is that some of the
nodes will allow the new peer to make an inbound connection but that
peer can't try to farm a nodeId that would make prioritize it over all
other peers in a guaranteed fashion.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
This PR add the support to DNS. By default Besu refuses the use of a DNS but it is possible to use it by adding the following flag --Xdns-enabled=true. Adding this flag will resolve the hostname when starting besu and then it won't change
If there is a need for a more dynamic update (eg for permissioning) add also this flag --Xdns-update-enabled = true ( this will query the DNS every time. So you must trust the DNS on which you are looking for the IP)
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
handle peerAdded on admin_addPeer to add the peer to the PeerTable
handle peerRemoved on admin_removePeer to remove the peer from the PeerTable
Signed-off-by: Alexandre PARIS-VERGNE <alexpv14@gmail.com>
* add hive test
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* garbage endpoint in peerdisccontrollertest
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* rlp deserialization test
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* make things work with optional
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* PeerDiscoveryPacketPcapSedesTest changes from Optional getFrom
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* rlp deserialization test
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* allow empty from field in ping
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* comment
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* logging
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* cleanup rebase
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* scaffolding
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* pass hive
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* remove some stuff
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* comment
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* leave list properly
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* spotless
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* rename port -> udpPort
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* move comment
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* fix documentation bug
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* remove redundant supression
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* more accurate tests
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* empty commit to trigger build
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>