Skip to content

session: clarify ResponseMetaHeader's fields presence - #404

Merged
roman-khimov merged 1 commit into
masterfrom
fix/response-meta-header-broad-definition
Jul 30, 2026
Merged

session: clarify ResponseMetaHeader's fields presence#404
roman-khimov merged 1 commit into
masterfrom
fix/response-meta-header-broad-definition

Conversation

@carpawell

Copy link
Copy Markdown
Member

Closes #397.

@carpawell carpawell self-assigned this Jul 27, 2026
@carpawell
carpawell force-pushed the fix/response-meta-header-broad-definition branch from 92648b9 to c4e8979 Compare July 27, 2026 13:43
Comment thread session/types.proto
@carpawell
carpawell force-pushed the fix/response-meta-header-broad-definition branch from c4e8979 to 874f28f Compare July 27, 2026 13:55
roman-khimov
roman-khimov previously approved these changes Jul 27, 2026
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Jul 27, 2026
Refs nspcc-dev/neofs-api#404.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>

@cthulhu-rider cthulhu-rider left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i'd drop as much fields as possible right now and keep only really handled ones. And describe all cases when they are set: there are few of them actually

i think it's also worth noting the behavior for server-side streams w/ multiple response messages like object GET. To me, only 1st message can have meta header

Comment thread session/types.proto Outdated
uint64 epoch = 2 [json_name = "epoch"];

// Maximum number of intermediate nodes in the request route
// Maximum number of intermediate nodes in the request route. Optional.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i'd just mark it as deprecated. origin is already marked, and field affects nothing right now and completely senseless to me

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

i dont mind. @roman-khimov

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Needs to be checked wrt real use. Reputation service cares about path for example. But if unused can be deprecated.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

no, seems they have never been used. nodes do not restrict anything based on this value. it is also meaningless to me without origin chain. the current reputation service is based on p2p local reviews and public keys

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

deprecated

Comment thread session/types.proto
// Information about the response
message ResponseMetaHeader {
// Peer's API version used
// Server's API version used. Must be attached only if server's version is

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what meaning could the field have in this case (server < client)?

this is how i see it. If server detects unknown field in the request - it should be either rejected or forwarded. If all fields are known, behavior should be fixed and (minor)version-independent, making fields excessive again. Overall, I mean i dont expect having any "old way" to process fixed request that client should think about. This only complicates and can destabilize the system

and API version is available through node info rpc

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

client may change its requests to the server accordingly

Comment thread session/types.proto
neo.fs.v2.refs.Version version = 1 [json_name = "version"];

// Peer's local epoch number
// Peer's local epoch number. Optional.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • net info rpc returns it
  • there is more reliable source for it - FS chain
  • requirement for the field does not depend on the specific request. Server is free to do as it pleases

so the field is redundant for me. I don't see any point in continuing to support it

i think the same about Optional part of x_headers

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

i think in general it can be used somewhere. there were even "caches" (that did not work) in SDK. i think once we are not dependent that much on epochs, we may drop it here too

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can be deprecated in future. OK as optional for now.

@carpawell

Copy link
Copy Markdown
Member Author

Added stream adjustments.

@carpawell
carpawell force-pushed the fix/response-meta-header-broad-definition branch 2 times, most recently from 9fbdd34 to 342619d Compare July 29, 2026 16:43
roman-khimov
roman-khimov previously approved these changes Jul 29, 2026
Comment thread object/service.proto Outdated
Closes #397.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
@carpawell
carpawell force-pushed the fix/response-meta-header-broad-definition branch from 342619d to 81ecba7 Compare July 30, 2026 08:15
@carpawell
carpawell requested a review from roman-khimov July 30, 2026 08:16
@roman-khimov
roman-khimov merged commit 3954854 into master Jul 30, 2026
3 checks passed
@roman-khimov
roman-khimov deleted the fix/response-meta-header-broad-definition branch July 30, 2026 10:20
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Jul 31, 2026
Refs nspcc-dev/neofs-api#404.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Jul 31, 2026
Refs nspcc-dev/neofs-api#404.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Jul 31, 2026
Refs nspcc-dev/neofs-api#404.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Jul 31, 2026
Refs nspcc-dev/neofs-api#404.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Jul 31, 2026
Refs nspcc-dev/neofs-api#404.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 3, 2026
Refs nspcc-dev/neofs-api#404.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 3, 2026
Refs nspcc-dev/neofs-api#404.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Aug 3, 2026
Refs nspcc-dev/neofs-api#404.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
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.

Describe response meta header's goal and responsibility

3 participants