Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

statereover: update web3j #322

Merged
merged 3 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ teku = "23.1.1"
tuweni = "2.4.2"
kotlinResult = "1.1.16"
vertx = "4.5.0"
web3j = "4.12.0"
web3j = "4.12.2"
wiremock = "3.0.1"
jsonUnit = "3.4.1"
blobCompressor = "0.0.4"
Expand Down
23 changes: 23 additions & 0 deletions jvm-libs/linea/besu-libs/build.gradle
jpnovais marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
plugins {
id 'net.consensys.zkevm.kotlin-library-minimal-conventions'
id 'java-library'
}

dependencies {
api("org.hyperledger.besu:besu-datatypes:${libs.versions.besu.get()}") {
transitive = false
}
api("org.hyperledger.besu:evm:${libs.versions.besu.get()}") {
transitive = false
}
api("org.hyperledger.besu.internal:core:${libs.versions.besu.get()}") {
transitive = false
}
api("org.hyperledger.besu.internal:algorithms:${libs.versions.besu.get()}") {
transitive = false
}

api("org.hyperledger.besu:plugin-api:${libs.versions.besu.get()}") {
transitive = false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@ fun submitBlobs(
*
* returns list of tx hashes of aggregations submissions only, does not wait for txs to be mined
*/
data class SubmissionTxHashes(
val blobTxHashes: List<String>,
val aggregationTxHashes: List<String>
)
fun submitBlobsAndAggregations(
contractClient: LineaRollupSmartContractClient,
aggregationsAndBlobs: List<AggregationAndBlobs>,
blobChunksSize: Int = 6
): List<String> {
submitBlobs(contractClient, aggregationsAndBlobs, blobChunksSize)
): SubmissionTxHashes {
val blobSubmissionTxHashes = submitBlobs(contractClient, aggregationsAndBlobs, blobChunksSize)

return aggregationsAndBlobs
.filter { it.aggregation != null }
Expand All @@ -52,4 +56,5 @@ fun submitBlobsAndAggregations(
)
}
.let { SafeFuture.collectAll(it.stream()).get() }
.let { SubmissionTxHashes(blobSubmissionTxHashes, it) }
}
5 changes: 1 addition & 4 deletions jvm-libs/linea/web3j-extensions/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,14 @@ dependencies {
api project(':jvm-libs:linea:core:domain-models')
api project(':jvm-libs:generic:logging')
// For domain mappers
api project(':jvm-libs:linea:besu-libs')
implementation project(":jvm-libs:generic:extensions:kotlin")
implementation "tech.pegasys.teku.internal:bytes:${libs.versions.teku.get()}"
implementation "tech.pegasys.teku.internal:jackson:${libs.versions.teku.get()}"
// Returned by domain mapper
api project(":jvm-libs:linea:teku-execution-client")
implementation "tech.pegasys.teku.internal:unsigned:${libs.versions.teku.get()}"
implementation "org.hyperledger.besu:besu-datatypes:${libs.versions.besu.get()}"
implementation "org.hyperledger.besu:evm:${libs.versions.besu.get()}"
implementation "org.hyperledger.besu.internal:core:${libs.versions.besu.get()}"
implementation "org.hyperledger.besu.internal:algorithms:${libs.versions.besu.get()}"
implementation "org.hyperledger.besu:plugin-api:${libs.versions.besu.get()}"

testImplementation "org.apache.logging.log4j:log4j-slf4j2-impl:${libs.versions.log4j.get()}"
testImplementation "com.fasterxml.jackson.core:jackson-annotations:${libs.versions.jackson.get()}"
Expand Down
9 changes: 5 additions & 4 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rootProject.name = 'linea'

// please keep deps sorted by group and alphabetically
include 'jvm-libs:generic:serialization:jackson'
include 'jvm-libs:generic:json-rpc'
include 'jvm-libs:generic:http-rest'
Expand All @@ -11,15 +11,16 @@ include 'jvm-libs:generic:vertx-helper'
include 'jvm-libs:generic:errors'
include 'jvm-libs:generic:persistence:db'

include 'jvm-libs:linea:besu-libs'
include 'jvm-libs:linea:blob-compressor'
include 'jvm-libs:linea:blob-decompressor'
include 'jvm-libs:linea:blob-shnarf-calculator'
include 'jvm-libs:linea:clients:linea-state-manager'
include 'jvm-libs:linea:core:client-interface'
include 'jvm-libs:linea:core:domain-models'
include 'jvm-libs:linea:core:long-running-service'
include 'jvm-libs:linea:core:metrics'
include 'jvm-libs:linea:core:traces'
include 'jvm-libs:linea:blob-compressor'
include 'jvm-libs:linea:blob-decompressor'
include 'jvm-libs:linea:blob-shnarf-calculator'
include 'jvm-libs:linea:linea-contracts:l1-rollup'
include 'jvm-libs:linea:linea-contracts:l2-message-service'
include 'jvm-libs:linea:metrics:micrometer'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import net.consensys.zkevm.coordinator.clients.smartcontract.LineaRollupSmartCon
import net.consensys.zkevm.domain.Aggregation
import net.consensys.zkevm.ethereum.ContractsManager
import net.consensys.zkevm.ethereum.Web3jClientManager
import net.consensys.zkevm.ethereum.waitForTransactionExecution
import net.consensys.zkevm.ethereum.waitForTxReceipt
import org.apache.logging.log4j.Level
import org.apache.logging.log4j.LogManager
import org.assertj.core.api.Assertions.assertThat
Expand Down Expand Up @@ -94,8 +94,8 @@ class LineaSubmissionEventsClientIntTest {
)

// wait for all finalizations Txs to be mined
Web3jClientManager.l1Client.waitForTransactionExecution(
submissionTxHashes.last(),
Web3jClientManager.l1Client.waitForTxReceipt(
txHash = submissionTxHashes.aggregationTxHashes.last(),
timeout = 20.seconds
)

Expand Down
Loading