-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f630013
commit 4e40faf
Showing
20 changed files
with
978 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
hildr-batcher/src/main/java/io/optimism/batcher/HildrBatcher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
hildr-batcher/src/main/java/io/optimism/batcher/exception/BatcherExecutionException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
hildr-batcher/src/main/java/io/optimism/type/RollupConfigRes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,246 @@ | ||
plugins { | ||
id 'java' | ||
id 'application' | ||
id "jacoco" | ||
id "com.diffplug.spotless" version "6.22.0" | ||
id "net.ltgt.errorprone" version "3.1.0" | ||
id 'org.graalvm.buildtools.native' version '0.9.28' | ||
id 'com.github.johnrengelman.shadow' version '8.1.1' | ||
} | ||
|
||
group = 'io.optimism' | ||
version = '0.4.0' | ||
|
||
repositories { | ||
// Use Maven Central for resolving dependencies. | ||
mavenCentral() | ||
maven { | ||
url "https://artifacts.consensys.net/public/teku/maven/" | ||
} | ||
maven { | ||
url "https://dl.cloudsmith.io/public/libp2p/jvm-libp2p/maven/" | ||
} | ||
maven { | ||
url "https://hyperledger.jfrog.io/artifactory/besu-maven/" | ||
} | ||
maven { | ||
url "https://artifacts.consensys.net/public/maven/maven/" | ||
} | ||
maven { url "https://jitpack.io" } | ||
google() | ||
} | ||
|
||
application { | ||
// Define the main class for the application. | ||
mainClass = 'io.optimism.proposer.HildrProposer' | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.annotationProcessorPath = configurations.annotationProcessor | ||
options.compilerArgs += "--enable-preview" | ||
options.compilerArgs += "-Xlint:preview" | ||
options.compilerArgs += ["-Aproject=${project.group}/${project.name}"] | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.annotationProcessorPath = configurations.annotationProcessor | ||
options.compilerArgs += "--enable-preview" | ||
options.compilerArgs += "-Xlint:preview" | ||
options.compilerArgs += ["-Aproject=${project.group}/${project.name}"] | ||
} | ||
|
||
tasks.withType(Test).configureEach { | ||
jvmArgs += "--enable-preview" | ||
} | ||
|
||
tasks.withType(JavaExec).configureEach { | ||
jvmArgs += "--enable-preview" | ||
} | ||
|
||
dependencies { | ||
implementation project(':hildr-utilities') | ||
implementation 'com.github.gestalt-config:gestalt-core:0.20.4' | ||
implementation 'com.github.gestalt-config:gestalt-toml:0.20.4' | ||
|
||
implementation 'com.fasterxml.jackson:jackson-bom:2.15.2' | ||
implementation 'com.fasterxml.jackson.core:jackson-core' | ||
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-toml' | ||
implementation 'org.jctools:jctools-core:4.0.1' | ||
|
||
implementation 'io.jsonwebtoken:jjwt-api:0.11.5' | ||
implementation 'io.jsonwebtoken:jjwt-impl:0.11.5' | ||
implementation 'io.jsonwebtoken:jjwt-jackson:0.11.5' | ||
|
||
//jsonrpc | ||
implementation('io.vertx:vertx-auth-jwt:4.4.2') | ||
implementation('io.vertx:vertx-core:4.4.2') | ||
implementation('io.vertx:vertx-web:4.4.2') | ||
|
||
implementation 'io.micrometer:micrometer-registry-prometheus:1.11.0' | ||
implementation platform('io.micrometer:micrometer-tracing-bom:1.1.1') | ||
implementation 'io.micrometer:micrometer-tracing' | ||
implementation 'io.micrometer:micrometer-tracing-bridge-otel' | ||
|
||
// Logback | ||
implementation 'ch.qos.logback:logback-core:1.4.12' | ||
implementation 'ch.qos.logback:logback-classic:1.4.14' | ||
implementation 'org.slf4j:slf4j-api:2.0.7' | ||
|
||
implementation platform("io.opentelemetry:opentelemetry-bom-alpha:1.26.0-alpha") | ||
// OpenTelemetry core | ||
implementation(platform("io.opentelemetry:opentelemetry-bom:1.26.0")) | ||
implementation 'io.opentelemetry:opentelemetry-api' | ||
implementation 'io.opentelemetry:opentelemetry-sdk' | ||
implementation 'io.opentelemetry:opentelemetry-sdk-logs' | ||
|
||
// OpenTelemetry log4j appenders | ||
implementation platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.26.0-alpha") | ||
runtimeOnly 'io.opentelemetry.instrumentation:opentelemetry-logback-mdc-1.0' | ||
|
||
implementation('io.tmio:tuweni-crypto:2.4.2'){ | ||
exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on' | ||
exclude group: 'org.apache.tuweni', module: 'tuweni-bytes' | ||
exclude group: 'org.apache.tuweni', module: 'tuweni-units' | ||
exclude group: 'org.apache.tuweni', module: 'tuweni-rlp' | ||
exclude group: 'org.apache.tuweni', module: 'tuweni-crypto' | ||
} | ||
|
||
implementation 'info.picocli:picocli:4.7.3' | ||
annotationProcessor 'info.picocli:picocli-codegen:4.7.3' | ||
|
||
implementation 'io.tmio:tuweni-crypto:2.4.2' | ||
|
||
// Use JUnit Jupiter for testing. | ||
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.1' | ||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0' | ||
// https://mvnrepository.com/artifact/org.junit.platform/junit-platform-suite-api | ||
testImplementation 'org.junit.platform:junit-platform-suite-api:1.9.1' | ||
// https://mvnrepository.com/artifact/org.junit.platform/junit-platform-suite-engine | ||
testRuntimeOnly 'org.junit.platform:junit-platform-suite-engine:1.9.1' | ||
|
||
testRuntimeOnly 'org.junit.platform:junit-platform-reporting:1.9.1' | ||
|
||
testImplementation 'org.mockito:mockito-junit-jupiter:2.19.0' | ||
testImplementation("com.squareup.okhttp3:mockwebserver:5.0.0-alpha.14") | ||
|
||
errorprone("com.google.errorprone:error_prone_core:2.18.0") | ||
} | ||
|
||
// Apply a specific Java toolchain to ease working on different environments. | ||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(21) | ||
} | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
testLogging { | ||
events "passed", "skipped", "failed" | ||
} | ||
finalizedBy jacocoTestReport | ||
} | ||
|
||
jacoco { | ||
toolVersion = "0.8.12" | ||
} | ||
|
||
jacocoTestReport { | ||
dependsOn test | ||
|
||
reports { | ||
csv.required = true | ||
} | ||
} | ||
|
||
jacocoTestCoverageVerification { | ||
violationRules { | ||
rule { | ||
limit { | ||
minimum = 0 | ||
} | ||
} | ||
} | ||
} | ||
|
||
spotless { | ||
// optional: limit format enforcement to just the files changed by this feature branch | ||
// ratchetFrom 'origin/main' | ||
|
||
format 'misc', { | ||
// define the files to apply `misc` to | ||
target '*.gradle', '*.md', '.gitignore' | ||
|
||
// define the steps to apply to those files | ||
trimTrailingWhitespace() | ||
indentWithTabs() // or spaces. Takes an integer argument if you don't like 4 | ||
endWithNewline() | ||
} | ||
java { | ||
// Use the default importOrder configuration | ||
|
||
// don't need to set target, it is inferred from java | ||
|
||
// apply a specific flavor of google-java-format | ||
palantirJavaFormat('2.38.0') | ||
// fix formatting of type annotations | ||
formatAnnotations() | ||
|
||
importOrder() | ||
|
||
removeUnusedImports() | ||
} | ||
} | ||
|
||
tasks.named('test') { | ||
// Use JUnit Platform for unit tests. | ||
useJUnitPlatform() | ||
} | ||
|
||
check { | ||
dependsOn += jacocoTestCoverageVerification | ||
// dependsOn += integrationTest | ||
} | ||
|
||
tasks.withType(Test).configureEach { | ||
def outputDir = reports.junitXml.outputLocation | ||
jvmArgumentProviders << ({ | ||
[ | ||
"-Djunit.platform.reporting.open.xml.enabled=true", | ||
"-Djunit.platform.reporting.output.dir=${outputDir.get().asFile.absolutePath}", | ||
"--enable-preview" | ||
] | ||
} as CommandLineArgumentProvider) | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
|
||
javadoc { | ||
if (JavaVersion.current().isJava9Compatible()) { | ||
options.addBooleanOption('html5', true) | ||
} | ||
options.addBooleanOption('-enable-preview', true) | ||
options.addStringOption('-release', '21') | ||
} | ||
|
||
jar { | ||
enabled = false | ||
manifest { | ||
attributes "Main-Class": "io.optimism.proposer.HildrProposer" | ||
attributes "Multi-Release": "true" | ||
} | ||
dependsOn(shadowJar) | ||
} | ||
|
||
shadowJar { | ||
archiveFileName = "${project.name}-${project.version}.jar" | ||
transform(com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer) | ||
} | ||
|
||
nativeCompile { | ||
enabled = false | ||
} |
26 changes: 26 additions & 0 deletions
26
hildr-proposer/src/main/java/io/optimism/proposer/HildrProposer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package io.optimism.proposer; | ||
|
||
import io.optimism.proposer.cli.Cli; | ||
import picocli.CommandLine; | ||
|
||
/** | ||
* Batcher main method. | ||
* | ||
* @author thinkAfCod | ||
* @since 0.1.1 | ||
*/ | ||
public class HildrProposer { | ||
|
||
/** Constructor of HildrBatcher. */ | ||
public HildrProposer() {} | ||
|
||
/** | ||
* Main method of HildrBatcher. | ||
* | ||
* @param args Starts arguments | ||
*/ | ||
public static void main(String[] args) { | ||
int exitCode = new CommandLine(new Cli()).execute(args); | ||
System.exit(exitCode); | ||
} | ||
} |
Oops, something went wrong.