Reimplement EthereumNodeRecord for DNS discovery (#7989)

* Reimplement EthereumNodeRecord and remove dependency on tuweni-devp2p
* Refactor EthereumNodeRecord for DNSDaemon
* Update EthereumNodeRecord to use Besu RLP
* additional unit tests
* Convert ENR to Java record
* regenerate equals and hashcode for enr record
---------

Signed-off-by: Usman Saleem <usman@usmans.info>
This commit is contained in:
Usman Saleem
2025-01-07 13:14:39 +10:00
committed by GitHub
parent ffd593d72b
commit 01126c0853
14 changed files with 244 additions and 24 deletions

View File

@@ -233,6 +233,11 @@ public abstract class AbstractSECP256 implements SignatureAlgorithm {
return PROVIDER;
}
@Override
public ECDomainParameters getCurve() {
return curve;
}
/**
* Gets K calculator.
*

View File

@@ -20,6 +20,7 @@ import java.util.function.UnaryOperator;
import org.apache.tuweni.bytes.Bytes;
import org.apache.tuweni.bytes.Bytes32;
import org.bouncycastle.crypto.params.ECDomainParameters;
import org.bouncycastle.math.ec.ECPoint;
/** The interface Signature algorithm. */
@@ -124,6 +125,13 @@ public interface SignatureAlgorithm {
*/
String getCurveName();
/**
* Bouncy castle ECDomainParameters representing the curve.
*
* @return instance of ECDomainParameters
*/
ECDomainParameters getCurve();
/**
* Create secp private key.
*