Skip to content

eth/tracers: add state-sync tracing support

a34698a
Select commit
Loading
Failed to load commit list.
Open

(feat): tracing support for state-sync transactions #2172

eth/tracers: add state-sync tracing support
a34698a
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Mar 31, 2026 in 1m 1s

Quality Gate failed

Annotations

Check warning on line 332 in eth/tracers/api_statesync_test.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename function "TestTraceBlockByHash_WithStateSyncTx" to match the regular expression ^(_|[a-zA-Z0-9]+)$

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1DbvoB6oJbwS8615V-&open=AZ1DbvoB6oJbwS8615V-&pullRequest=2172

Check warning on line 294 in consensus/bor/heimdall/span/spanner.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This function has 8 parameters, which is greater than the 7 authorized.

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1DbvpA6oJbwS8615WB&open=AZ1DbvpA6oJbwS8615WB&pullRequest=2172

Check warning on line 388 in eth/tracers/api_statesync_test.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename function "TestTraceChain_WithStateSyncTx" to match the regular expression ^(_|[a-zA-Z0-9]+)$

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1DbvoB6oJbwS8615V_&open=AZ1DbvoB6oJbwS8615V_&pullRequest=2172

Check failure on line 302 in eth/tracers/api_statesync_test.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "expected json.RawMessage for state-sync trace result, got %T" 3 times.

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1DbvoB6oJbwS8615V3&open=AZ1DbvoB6oJbwS8615V3&pullRequest=2172

Check warning on line 674 in eth/tracers/api.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unnecessary variable declaration and use the expression directly in the condition.

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1Dbvlb6oJbwS8615Vz&open=AZ1Dbvlb6oJbwS8615Vz&pullRequest=2172

Check failure on line 396 in eth/tracers/api_statesync_test.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "failed to get block: %d, err: %v" 3 times.

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1DbvoB6oJbwS8615V1&open=AZ1DbvoB6oJbwS8615V1&pullRequest=2172

Check warning on line 450 in eth/tracers/api_statesync_test.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename function "TestIntermediateRoots_WithStateSyncTx" to match the regular expression ^(_|[a-zA-Z0-9]+)$

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1DbvoB6oJbwS8615WA&open=AZ1DbvoB6oJbwS8615WA&pullRequest=2172

Check failure on line 1152 in eth/tracers/api.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 26 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1Dbvlb6oJbwS8615Vx&open=AZ1Dbvlb6oJbwS8615Vx&pullRequest=2172

Check failure on line 312 in eth/tracers/api_statesync_test.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "state-sync trace has no struct logs — EVM code was not executed" 3 times.

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1DbvoB6oJbwS8615V4&open=AZ1DbvoB6oJbwS8615V4&pullRequest=2172

Check failure on line 294 in eth/tracers/api_statesync_test.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "expected %d trace results, got: %d" 3 times.

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1DbvoB6oJbwS8615V7&open=AZ1DbvoB6oJbwS8615V7&pullRequest=2172

Check failure on line 325 in eth/tracers/api_statesync_test.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "expected 2 LOG0 opcodes (one per bridge event forwarded to target), got %d" 3 times.

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1DbvoB6oJbwS8615V5&open=AZ1DbvoB6oJbwS8615V5&pullRequest=2172

Check warning on line 1152 in eth/tracers/api.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This function has 8 parameters, which is greater than the 7 authorized.

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1Dbvlb6oJbwS8615Vy&open=AZ1Dbvlb6oJbwS8615Vy&pullRequest=2172

Check warning on line 276 in eth/tracers/api_statesync_test.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename function "TestTraceBlockByNumber_WithStateSyncTx" to match the regular expression ^(_|[a-zA-Z0-9]+)$

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1DbvoB6oJbwS8615V9&open=AZ1DbvoB6oJbwS8615V9&pullRequest=2172

Check warning on line 70 in consensus/bor/bor_test.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This function has 8 parameters, which is greater than the 7 authorized.

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1DbvqR6oJbwS8615WE&open=AZ1DbvqR6oJbwS8615WE&pullRequest=2172

Check failure on line 286 in eth/tracers/api_statesync_test.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "expected %d transactions in block body, got %d" 3 times.

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1DbvoB6oJbwS8615V8&open=AZ1DbvoB6oJbwS8615V8&pullRequest=2172

Check failure on line 284 in eth/tracers/api_statesync_test.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "block %d not found" 3 times.

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1DbvoB6oJbwS8615V2&open=AZ1DbvoB6oJbwS8615V2&pullRequest=2172

Check warning on line 37 in eth/tracers/api_statesync_test.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Complete the task associated to this TODO comment.

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1DbvoB6oJbwS8615V0&open=AZ1DbvoB6oJbwS8615V0&pullRequest=2172

Check warning on line 53 in consensus/bor/span_mock.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This function has 8 parameters, which is greater than the 7 authorized.

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1DbvpQ6oJbwS8615WC&open=AZ1DbvpQ6oJbwS8615WC&pullRequest=2172

Check failure on line 715 in eth/tracers/api.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 22 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1Dbvlb6oJbwS8615Vw&open=AZ1Dbvlb6oJbwS8615Vw&pullRequest=2172

Check failure on line 311 in eth/tracers/api_statesync_test.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "failed to unmarshal state-sync trace: %v" 3 times.

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1DbvoB6oJbwS8615V6&open=AZ1DbvoB6oJbwS8615V6&pullRequest=2172

Check warning on line 61 in consensus/bor/span_mock.go

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This function has 8 parameters, which is greater than the 7 authorized.

See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZ1DbvpQ6oJbwS8615WD&open=AZ1DbvpQ6oJbwS8615WD&pullRequest=2172