Improve syncing RPC call

Inspired by this geth issue: Expose State Sync ETA in eth.syncing · Issue #23448 · ethereum/go-ethereum · GitHub we where thinking about improving the output of eth_syncing.

currently this is the reply as defined in the execution-apis spec:

"oneOf": [
			{
				"title": "Syncing progress",
				"type": "object",
				"properties": {
					"startingBlock": {
						"title": "Starting block",
						"$ref": "#/components/schemas/uint"
					},
					"currentBlock": {
						"title": "Current block",
						"$ref": "#/components/schemas/uint"
					},
					"highestBlock": {
						"title": "Highest block",
						"$ref": "#/components/schemas/uint"
					}
				}
			},
			{
				"title": "Not syncing",
				"description": "Should always return false if not syncing.",
				"type": "boolean"
			}
		]

I think the case of “Not syncing” is good but in the case of syncing we should expose some more information.
Geth already adds knownStates and pulledStates - unfortunately this is not standardized yet.
In this process we should also add the sync method as e.g. with snap-sync you can give a better estimate of the progress than with full-sync.

1 Like