-
Notifications
You must be signed in to change notification settings - Fork 42
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
Coordinator: replace teku ExecutionPlayloadV1 by Domain Block class - fix block encoding #406
base: main
Are you sure you want to change the base?
Conversation
b8a6102
to
adf559c
Compare
@@ -23,6 +23,12 @@ allprojects { | |||
apply plugin: 'java' // do not add kotlin plugin here, it will add unnecessary Kotlin runtime dependencies | |||
apply plugin: 'jacoco' | |||
|
|||
configurations.all { | |||
resolutionStrategy { | |||
force "org.web3j:core:${libs.versions.web3j.get()}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pulled your code, removed this addition, built the project and it went fine. What was breaking for you so you had to add it? I want to check if we can work around it some other way on my machine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it works. The reason I added this is because we have multiple versions of web3j, through transitive dependencies and when coding/debugging intellIJ was linking to the wrong one. So did this a quick workaround and ended up pushing by accident.
I am aware that this is not a solution that scales! We shall use proper management like spring plugin but I don't have time to address it now.
I am happy to revert or keep it since it does not cause any harm anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it doesn't cause issues for you, I'd like to remove it, because it creates a bad precedent
...or/app/src/main/kotlin/net/consensys/zkevm/coordinator/blockcreation/BlockCreationMonitor.kt
Outdated
Show resolved
Hide resolved
@@ -21,7 +24,7 @@ import kotlin.time.Duration.Companion.days | |||
|
|||
class BlockCreationMonitor( | |||
private val vertx: Vertx, | |||
private val extendedWeb3j: ExtendedWeb3J, | |||
private val web3j: Web3j, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we going back to plain Web3j here and in other places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it was simpler this way and this extension is not properly designed and refactoring adapting would be more work. We created this interface to basically facilitate mock<> and return responses, if we create a fake rpc client this won't be necessary, we can tests against state that concrete implementations. That's my pan for new tests of BlockCreationMonitor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getNetNextSafeBlock
is more complex now. Is it possible to make this change later, at the same time with the new tests?
...pp/src/test/kotlin/net/consensys/zkevm/coordinator/blockcreation/BlockCreationMonitorTest.kt
Show resolved
Hide resolved
@@ -27,4 +27,30 @@ class StringExtensionsTest { | |||
assertThat("this includes lorem ipsum".containsAny(stringList, ignoreCase = true)).isTrue() | |||
assertThat("this string won't match".containsAny(stringList, ignoreCase = true)).isFalse() | |||
} | |||
|
|||
@OptIn(ExperimentalStdlibApi::class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't catch what experimental features we're using here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It had before, then I forgot to remove, will clean it, thanks
jvm-libs/linea/besu-rlp-and-mappers/src/main/kotlin/linea/domain/TransactionTypeMapper.kt
Show resolved
Hide resolved
…r/blockcreation/BlockCreationMonitor.kt Co-authored-by: Roman Vaseev <[email protected]> Signed-off-by: Pedro Novais <[email protected]>
.../linea/web3j-extensions/src/test/kotlin/net/consensys/linea/web3j/DomainObjectMappersTest.kt
Show resolved
Hide resolved
@@ -17,6 +17,7 @@ junit = "5.10.1" | |||
kotlinxDatetime = "0.6.1" | |||
ktlint = "0.47.0" | |||
log4j = "2.20.0" | |||
slf4j = "1.7.30" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering where is it being used?
nonce = transaction.nonce.toULong(), | ||
gasPrice = transaction.getGasPrice().getOrNull()?.toBigInteger()?.toULong(), | ||
gasLimit = transaction.gasLimit.toULong(), | ||
to = transaction.to?.getOrNull()?.toArray(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without the ? operator should be sufficient as to = transaction.to.getOrNull()?.toArray()
, same for the ? operators before getOrNull()
below
# Conflicts: # coordinator/clients/shomei-client/build.gradle # jvm-libs/linea/testing/teku-helper/build.gradle
This PR implements issue(s) #
Checklist