Skip to content

refactor: Remove seq from TMGetObjectByHash#6976

Open
a1q123456 wants to merge 3 commits intodevelopfrom
a1q123456/remove-seq-from-TMGetObjectByHash
Open

refactor: Remove seq from TMGetObjectByHash#6976
a1q123456 wants to merge 3 commits intodevelopfrom
a1q123456/remove-seq-from-TMGetObjectByHash

Conversation

@a1q123456
Copy link
Copy Markdown
Contributor

@a1q123456 a1q123456 commented Apr 20, 2026

High Level Overview of Change

This PR removes the seq field from TMGetObjectByHash as it's not used and obsolete.

Context of Change

As Vinie suggested in the comment that the seq field is obsolete, we did some research and confirmed that it's indeed not used and it's safe to remove.

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

@a1q123456 a1q123456 requested review from vlntb and ximinez April 20, 2026 14:55
Copy link
Copy Markdown
Contributor

@xrplf-ai-reviewer xrplf-ai-reviewer bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave this a review

Missing reserved 3; after removing the seq field — see inline.


Review by ReviewBot 🤖

Review by Claude Opus 4.6 · Prompt: V15

Comment thread include/xrpl/proto/xrpl.proto
Copy link
Copy Markdown
Contributor

@xrplf-ai-reviewer xrplf-ai-reviewer bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues.

Review by Claude Opus 4.6 · Prompt: V15

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the peer-protocol TMGetObjectByHash message by removing the obsolete seq field and cleaning up related code paths and tests.

Changes:

  • Remove seq (field/tag 3) from TMGetObjectByHash in xrpl.proto.
  • Stop copying seq from request to reply in PeerImp and LedgerMaster handlers.
  • Update overlay compression test to no longer set seq on TMGetObjectByHash.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/xrpld/overlay/detail/PeerImp.cpp Removes propagation of obsolete seq into TMGetObjectByHash replies and drops an outdated comment.
src/xrpld/app/ledger/detail/LedgerMaster.cpp Removes propagation of seq when constructing fetch-pack replies.
src/test/overlay/compression_test.cpp Updates test setup to stop setting removed seq field.
include/xrpl/proto/xrpl.proto Deletes the seq field from the protobuf definition of TMGetObjectByHash.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread include/xrpl/proto/xrpl.proto
Comment thread include/xrpl/proto/xrpl.proto Outdated
@a1q123456 a1q123456 requested a review from bthomee April 20, 2026 15:13
Copy link
Copy Markdown
Contributor

@xrplf-ai-reviewer xrplf-ai-reviewer bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues.

Review by Claude Opus 4.6 · Prompt: V15

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.6%. Comparing base (852fbe9) to head (61ce265).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #6976   +/-   ##
=======================================
  Coverage     81.6%   81.6%           
=======================================
  Files         1010    1010           
  Lines        75992   75988    -4     
  Branches      7605    7595   -10     
=======================================
+ Hits         62002   62017   +15     
+ Misses       13990   13971   -19     
Files with missing lines Coverage Δ
src/xrpld/app/ledger/detail/LedgerMaster.cpp 42.7% <ø> (+0.1%) ⬆️
src/xrpld/overlay/detail/PeerImp.cpp 5.6% <ø> (-0.1%) ⬇️

... and 4 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ximinez
Copy link
Copy Markdown
Collaborator

ximinez commented Apr 20, 2026

What is the most recent version that used this field, and is it amendment or otherwise blocked?

@a1q123456
Copy link
Copy Markdown
Contributor Author

What is the most recent version that used this field, and is it amendment or otherwise blocked?

We were doing this initially

if (!reply.has_seq() && (hObj->getIndex() != 0))
						reply.set_seq(hObj->getIndex());

And then we removed it 11 years ago in the commit f946d7b by Vinnie.

Can confirm we don't use this field in the past 11 years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants