Skip to content

Commit 9396746

Browse files
authored
use 72 blocks for eth finality which should cover p75 (#733)
* use 72 blocks for eth finality which should cover p75 finality is somewhere between 64 and 95 blocks * fix tests
1 parent 870323f commit 9396746

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/base/__tests__/finality.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77

88
describe("Finality tests", function () {
99
test("Receive expected number of rounds", () => {
10-
expect(finalityThreshold("Ethereum")).toEqual(96);
10+
expect(finalityThreshold("Ethereum")).toEqual(72);
1111
expect(finalityThreshold("Algorand")).toEqual(0);
1212
expect(finalityThreshold("Solana")).toEqual(32);
1313
});
@@ -41,7 +41,7 @@ describe("Finality tests", function () {
4141
test("Estimates rounds from finalized consistency level", () => {
4242
// 100 + (# final rounds)
4343
expect(consistencyLevelToBlock("Ethereum", ConsistencyLevels.Finalized, fromBlock)).toEqual(
44-
fromBlock + 96n,
44+
fromBlock + 72n,
4545
);
4646
expect(consistencyLevelToBlock("Solana", ConsistencyLevels.Finalized, fromBlock)).toEqual(
4747
fromBlock + 32n,

core/base/src/constants/finality.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const safeThreshold = constMap(safeThresholds);
2626
// Number of blocks before a transaction is considered "final"
2727
const finalityThresholds = [
2828
["Solana", 32],
29-
["Ethereum", 96],
29+
["Ethereum", 72], // between 64 and 95 blocks; use 72 as a middle ground
3030
["Bsc", 15],
3131
// Checkpointed to L1 after ~512 blocks
3232
["Optimism", 512],

0 commit comments

Comments
 (0)