Skip to content

Commit

Permalink
Penalize invalid transient txs
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
  • Loading branch information
fab-10 committed Jul 18, 2024
1 parent 0e55014 commit c33f5ec
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
releaseVersion=0.1.4-test29
besuVersion=24.6-develop-752aeff
besuVersion=27.0-fdf
besuArtifactGroup=io.consensys.linea-besu
distributionIdentifier=besu-sequencer-plugins
distributionBaseUrl=https://artifacts.consensys.net/public/linea-besu/raw/names/linea-besu.tar.gz/versions/
2 changes: 1 addition & 1 deletion gradle/dist.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tasks.register('javadocJar', Jar) {
from javadoc.destinationDir
}

def lineaBesuDistTar = new File(buildDir, rootProject.besuFilename)
def lineaBesuDistTar = new File(new File(buildDir, "tmp"), rootProject.besuFilename)

tasks.register('copyLocalLineaBesu', Copy) {
onlyIf {
Expand Down
2 changes: 2 additions & 0 deletions sequencer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ dependencies {
implementation 'org.hibernate.validator:hibernate-validator'

testImplementation "${besuArtifactGroup}:evm"
testImplementation "${besuArtifactGroup}:plugin-api"
testImplementation "${besuArtifactGroup}:besu-datatypes"
testImplementation "${besuArtifactGroup}.internal:core:${besuVersion}"
testImplementation "${besuArtifactGroup}.internal:rlp:${besuVersion}"
testImplementation "${besuArtifactGroup}.internal:core:${besuVersion}"
testImplementation "${besuArtifactGroup}.internal:algorithms:${besuVersion}"
}

configurations {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,24 @@

public class LineaTransactionSelectionResult extends TransactionSelectionResult {
private enum LineaStatus implements TransactionSelectionResult.Status {
BLOCK_CALLDATA_OVERFLOW(false, false),
BLOCK_MODULE_LINE_COUNT_FULL(true, false),
TX_GAS_EXCEEDS_USER_MAX_BLOCK_GAS(false, true),
TX_TOO_LARGE_FOR_REMAINING_USER_GAS(false, false),
TX_MODULE_LINE_COUNT_OVERFLOW(false, true),
TX_MODULE_LINE_COUNT_OVERFLOW_CACHED(false, true),
TX_UNPROFITABLE(false, false),
TX_UNPROFITABLE_UPFRONT(false, false),
TX_UNPROFITABLE_RETRY_LIMIT(false, false);
BLOCK_CALLDATA_OVERFLOW(false, false, false),
BLOCK_MODULE_LINE_COUNT_FULL(true, false, false),
TX_GAS_EXCEEDS_USER_MAX_BLOCK_GAS(false, true, true),
TX_TOO_LARGE_FOR_REMAINING_USER_GAS(false, false, true),
TX_MODULE_LINE_COUNT_OVERFLOW(false, true, true),
TX_MODULE_LINE_COUNT_OVERFLOW_CACHED(false, true, true),
TX_UNPROFITABLE(false, false, true),
TX_UNPROFITABLE_UPFRONT(false, false, true),
TX_UNPROFITABLE_RETRY_LIMIT(false, false, false);

private final boolean stop;
private final boolean discard;
private final boolean penalize;

LineaStatus(boolean stop, boolean discard) {
LineaStatus(boolean stop, boolean discard, boolean penalize) {
this.stop = stop;
this.discard = discard;
this.penalize = penalize;
}

@Override
Expand All @@ -45,6 +47,11 @@ public boolean stop() {
public boolean discard() {
return discard;
}

@Override
public boolean penalize() {
return penalize;
}
}

protected LineaTransactionSelectionResult(LineaStatus status) {
Expand Down

0 comments on commit c33f5ec

Please sign in to comment.