Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

When syncing, add target block via RPC #5727

@amaury1093

Description

@amaury1093

When syncing a node, the logs show a nice

⚙️  Syncing, target=#199957 (2 peers), best: #512 (0x5895…614e), finalized #512 (0x5895…614e), ⬇ 33.3kiB/s ⬆ 2.4kiB/s

However, I cannot find this target=#... number via RPC. In light-ui, where syncing can take some time, I'd like to show the target block.

I'm not 100% sure where to put it, maybe in system_health?

{
  peers: number,
  shouldHavePeers: boolean,
  isSyncing: boolean,
  // add this field:
  syncing: { startBlock: number, currentBlock: number, targetblock: number } | null
}

Note: I copied how eth did it, for inspiration: https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_syncing

pinging maybe @tomusdrw @ascjones?

Metadata

Metadata

Assignees

No one assigned

    Labels

    J0-enhancementAn additional feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions