EIP-7692 "Mega" EOF Implementation (#7169)

A complete and up to date implementation of EIP-7692 EOF v.1. For genesis 
file activation use "PragueEOFTime", for references tests it activates as 
part of Prague.

Signed-off-by: Danno Ferrin <danno@numisight.com>
This commit is contained in:
Danno Ferrin
2024-06-12 15:09:18 -06:00
committed by GitHub
parent 365737c2eb
commit 85d286aa85
123 changed files with 6197 additions and 1918 deletions

View File

@@ -42,6 +42,7 @@ import com.fasterxml.jackson.core.StreamReadConstraints;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import org.apache.tuweni.bytes.Bytes;
/**
* Utility class for generating JUnit test parameters from json files. Each set of test parameters
@@ -75,7 +76,7 @@ public class JsonTestParameters<S, T> {
private final List<Object[]> testParameters = new ArrayList<>(256);
/**
* Add.
* Add standard reference test.
*
* @param name the name
* @param fullPath the full path of the test
@@ -88,6 +89,27 @@ public class JsonTestParameters<S, T> {
new Object[] {name, value, runTest && includes(name) && includes(fullPath)});
}
/**
* Add EOF test.
*
* @param name the name
* @param fullPath the full path of the test
* @param fork the fork to be tested
* @param code the code to be tested
* @param value the value
* @param runTest the run test
*/
public void add(
final String name,
final String fullPath,
final String fork,
final Bytes code,
final S value,
final boolean runTest) {
testParameters.add(
new Object[] {name, fork, code, value, runTest && includes(name) && includes(fullPath)});
}
private boolean includes(final String name) {
// If there is no specific includes, everything is included unless it is ignored, otherwise,
// only what is in includes is included whether or not it is ignored.