Skip to content

Commit 028142e

Browse files
author
tac0turtle
committed
Merge branch 'main' into claude/issue-2316-20250808-0725
2 parents ee94697 + a53a7ac commit 028142e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2017
-453
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ build
1515
coverage.out
1616
execution/evm/jwttoken
1717
target
18+
/.claude/settings.local.json
19+
1820

1921
docs/.vitepress/dist
2022
node_modules

apps/evm/single/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ func main() {
2121

2222
config.AddGlobalFlags(rootCmd, "evm-single")
2323

24+
// Add configuration flags to NetInfoCmd so it can read RPC address
25+
config.AddFlags(rollcmd.NetInfoCmd)
26+
2427
rootCmd.AddCommand(
2528
cmd.InitCmd(),
2629
cmd.RunCmd,

block/manager.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ const (
4343
// defaultMempoolTTL is the number of blocks until transaction is dropped from mempool
4444
defaultMempoolTTL = 25
4545

46-
// maxSubmitAttempts defines how many times evolve will re-try to publish block to DA layer.
47-
// This is temporary solution. It will be removed in future versions.
48-
maxSubmitAttempts = 30
49-
5046
// Key for storing namespace migration state in the store
5147
namespaceMigrationKey = "namespace_migration_completed"
5248

@@ -57,9 +53,6 @@ const (
5753
var (
5854
// dataHashForEmptyTxs to be used while only syncing headers from DA and no p2p to get the Data for no txs scenarios, the syncing can proceed without getting stuck forever.
5955
dataHashForEmptyTxs = []byte{110, 52, 11, 156, 255, 179, 122, 152, 156, 165, 68, 230, 187, 120, 10, 44, 120, 144, 29, 63, 179, 55, 56, 118, 133, 17, 163, 6, 23, 175, 160, 29}
60-
61-
// initialBackoff defines initial value for block submission backoff
62-
initialBackoff = 100 * time.Millisecond
6356
)
6457

6558
// publishBlockFunc defines the function signature for publishing a block.
@@ -776,17 +769,6 @@ func (m *Manager) recordMetrics(data *types.Data) {
776769
m.metrics.CommittedHeight.Set(float64(data.Metadata.Height))
777770
}
778771

779-
func (m *Manager) exponentialBackoff(backoff time.Duration) time.Duration {
780-
backoff *= 2
781-
if backoff == 0 {
782-
backoff = initialBackoff
783-
}
784-
if backoff > m.config.DA.BlockTime.Duration {
785-
backoff = m.config.DA.BlockTime.Duration
786-
}
787-
return backoff
788-
}
789-
790772
func (m *Manager) getLastBlockTime() time.Time {
791773
m.lastStateMtx.RLock()
792774
defer m.lastStateMtx.RUnlock()

block/manager_test.go

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -703,24 +703,6 @@ func TestUtilityFunctions(t *testing.T) {
703703
require.Equal(input, reconstructed)
704704
})
705705

706-
t.Run("ExponentialBackoff", func(t *testing.T) {
707-
require := require.New(t)
708-
m, _ := getManager(t, mocks.NewMockDA(t), -1, -1)
709-
m.config.DA.BlockTime.Duration = 10 * time.Second
710-
711-
// Test initial backoff
712-
result := m.exponentialBackoff(0)
713-
require.Equal(initialBackoff, result)
714-
715-
// Test doubling
716-
result = m.exponentialBackoff(100 * time.Millisecond)
717-
require.Equal(200*time.Millisecond, result)
718-
719-
// Test max cap
720-
result = m.exponentialBackoff(20 * time.Second)
721-
require.Equal(m.config.DA.BlockTime.Duration, result)
722-
})
723-
724706
t.Run("GetHeaderSignature_NilSigner", func(t *testing.T) {
725707
require := require.New(t)
726708
m, _ := getManager(t, mocks.NewMockDA(t), -1, -1)
@@ -993,44 +975,10 @@ func TestValidationMethods(t *testing.T) {
993975
require.False(result)
994976
})
995977

996-
t.Run("ExponentialBackoff_WithConfig", func(t *testing.T) {
997-
require := require.New(t)
998-
m, _ := getManager(t, mocks.NewMockDA(t), -1, -1)
999-
1000-
// Set up a config with a specific block time
1001-
m.config.DA.BlockTime.Duration = 5 * time.Second
1002-
1003-
// Test that backoff is capped at config value
1004-
result := m.exponentialBackoff(10 * time.Second)
1005-
require.Equal(5*time.Second, result)
1006-
1007-
// Test normal doubling
1008-
result = m.exponentialBackoff(100 * time.Millisecond)
1009-
require.Equal(200*time.Millisecond, result)
1010-
})
1011978
}
1012979

1013980
// TestConfigurationDefaults tests default value handling and edge cases
1014981
func TestConfigurationDefaults(t *testing.T) {
1015-
t.Run("ExponentialBackoff_EdgeCases", func(t *testing.T) {
1016-
require := require.New(t)
1017-
m, _ := getManager(t, mocks.NewMockDA(t), -1, -1)
1018-
1019-
// Test with zero block time - should still double the backoff since there's no cap
1020-
m.config.DA.BlockTime.Duration = 0
1021-
result := m.exponentialBackoff(100 * time.Millisecond)
1022-
require.Equal(0*time.Millisecond, result) // Capped at 0
1023-
1024-
// Test with very small block time
1025-
m.config.DA.BlockTime.Duration = 1 * time.Millisecond
1026-
result = m.exponentialBackoff(100 * time.Millisecond)
1027-
require.Equal(1*time.Millisecond, result) // Should cap at block time
1028-
1029-
// Test normal doubling with larger block time
1030-
m.config.DA.BlockTime.Duration = 1 * time.Second
1031-
result = m.exponentialBackoff(100 * time.Millisecond)
1032-
require.Equal(200*time.Millisecond, result) // Should double
1033-
})
1034982

1035983
t.Run("IsProposer_NilSigner", func(t *testing.T) {
1036984
require := require.New(t)

0 commit comments

Comments
 (0)