cardano-rpc: ReadTip#1259
Open
carbolymer wants to merge 1 commit into
Open
Conversation
carbolymer
changed the base branch from
master
to
mgalazyn/fix-grpc-bytes-fields
July 20, 2026 15:26
carbolymer
force-pushed
the
mgalazyn/fix-grpc-bytes-fields
branch
3 times, most recently
from
July 21, 2026 15:45
b4ffb7d to
4f93e0b
Compare
carbolymer
force-pushed
the
mgalazyn/reature/read-tip
branch
2 times, most recently
from
July 21, 2026 15:47
9508895 to
0bf4ff4
Compare
carbolymer
marked this pull request as ready for review
July 21, 2026 15:48
carbolymer
requested review from
CarlosLopezDeLara,
Jimbo4350,
disassembler,
erikd and
palas
as code owners
July 21, 2026 15:48
carbolymer
force-pushed
the
mgalazyn/reature/read-tip
branch
from
July 21, 2026 15:49
0bf4ff4 to
6a69c74
Compare
Jimbo4350
approved these changes
Jul 21, 2026
carbolymer
force-pushed
the
mgalazyn/reature/read-tip
branch
from
July 22, 2026 09:23
6a69c74 to
4418b96
Compare
carbolymer
force-pushed
the
mgalazyn/fix-grpc-bytes-fields
branch
from
July 22, 2026 09:23
4f93e0b to
a7ec745
Compare
carbolymer
force-pushed
the
mgalazyn/reature/read-tip
branch
from
July 22, 2026 09:29
4418b96 to
5ab98a0
Compare
carbolymer
force-pushed
the
mgalazyn/fix-grpc-bytes-fields
branch
from
July 22, 2026 09:29
a7ec745 to
2112d60
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Part of the node kernel access work (ADR-019) and the Kupo/Ogmios replacement effort (#1229): implements the
SyncService.ReadTipmethod (#1218).ReadTipreturns the current chain tip as a fully populatedBlockRef: slot, block header hash, block height and the slot timestamp in milliseconds. The handler reads the tip header straight from ChainDB through node kernel access (getTipHeader- no block body fetch), and derives the timestamp from era history the same wayFetchBlockdoes. When the chain is at origin thetipfield is left unset; when the node kernel has not initialised yet the call fails withUNAVAILABLE.Implementation notes:
Cardano.Api.ConsensusgainsgetTipHeader,blockHashandblockSlotre-exports.TraceRpcReadTipSpantrace is emitted around the handler; the node-side rendering and therpc.request.SyncService.ReadTipprometheus counter land with the E2E test in gRPC: fetchBlock method cardano-node#6579.Stacked on #1258; only the last commit is new here.
How to trust this PR
The handler is a ChainDB read plus field projection, so there are no unit tests - it needs a live ChainDB. E2E coverage lives in IntersectMBO/cardano-node#6579's
Cardano.Testnet.Test.Rpc.FetchBlock: it callsReadTipover gRPC against a running testnet and asserts the tip's slot and height are bounded below by a CLIquery tipsnapshot, the hash is 32 bytes, and the timestamp agrees with the slot-derived time within 1s.Run it with:
Checklist
.changes/