Skip to content

Add oldest_block in /network/status #439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
matiwinnetou opened this issue May 2, 2025 · 2 comments
Open

Add oldest_block in /network/status #439

matiwinnetou opened this issue May 2, 2025 · 2 comments
Milestone

Comments

@matiwinnetou
Copy link
Collaborator

matiwinnetou commented May 2, 2025

As we start to use pruned modes or as it will be called soon: REMOVE_SPENT_UTXOS) more and more, we must report oldest_block in /network/status.

@matiwinnetou matiwinnetou added this to the 1.2.8 milestone May 2, 2025
@linconvidal linconvidal self-assigned this May 5, 2025
@linconvidal linconvidal moved this to Backlog in Rosetta Java Kanban May 5, 2025
@linconvidal
Copy link
Member

According to Mesh API specs:

If a Rosetta implementation prunes historical state, it should populate the optional oldest_block_identifier field with the oldest block available to query. If this is not populated, it is assumed that the genesis_block_identifier is the oldest queryable block.

Here is what the response looks like:

{
  "current_block_identifier": {
    "index": ...,
    "hash": "..."
  },
  "current_block_timestamp": ...,
  "genesis_block_identifier": {
    "index": 0,
    "hash": "..."
  },
  "oldest_block_identifier": {
    "index": ...,
    "hash": "..."
  },
  "sync_status": { ... },
  "peers": []
}

@matiwinnetou
Copy link
Collaborator Author

matiwinnetou commented May 6, 2025

@linconvidal as discussed we will implement this as last full blocks based on "PRUNING_ENABLED" (REMOVE_SPENT_UTXOS) flag set.

A proper pruning according to definition from Mesh (as pruned from the genesis block we will implement in the future).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
2 participants