Skip to content

Conversation

@vgonkivs
Copy link
Member

@vgonkivs vgonkivs commented Oct 28, 2025

@vgonkivs vgonkivs self-assigned this Oct 28, 2025
@vgonkivs vgonkivs added the kind:docs For solely documentation PRs label Oct 28, 2025
@vgonkivs vgonkivs changed the title Shrex client server specificatio Shrex client server specification Oct 28, 2025
@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (shrex_spec@76db37c). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff              @@
##             shrex_spec    #4665   +/-   ##
=============================================
  Coverage              ?   36.06%           
=============================================
  Files                 ?      304           
  Lines                 ?    20170           
  Branches              ?        0           
=============================================
  Hits                  ?     7274           
  Misses                ?    11944           
  Partials              ?      952           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

- Retrieving data from local storage
- Sending responses back to clients

### Request Handling
Copy link
Member

Choose a reason for hiding this comment

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

in certain cases (ND), not found comes with data too (non incl proof)

Copy link
Member

Choose a reason for hiding this comment

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

Actually false. Server sends "OK" along with non-inclusion proof

- **NOT FOUND**: Requested data is not available
- **INTERNAL ERROR**: Server encountered an error

2. **Data (if OK)**: The actual requested data
Copy link
Member

Choose a reason for hiding this comment

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

also include non-incl proof if ND not found


- Connection failures
- Timeouts
- Invalid data
Copy link
Member

Choose a reason for hiding this comment

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

meaning invalid data sent back from server?

Copy link
Member Author

@vgonkivs vgonkivs Oct 28, 2025

Choose a reason for hiding this comment

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

relic

Copy link
Member

@walldiss walldiss left a comment

Choose a reason for hiding this comment

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

Needs to add:

  • transport protocol spec (libp2p streaming)
  • message flow. Status message definition and proto. Error model in status message
  • reference to shwap spec defining encoding and payload of requests and responses
  • peer manager integration, reference to peer manager spec

@vgonkivs
Copy link
Member Author

vgonkivs commented Nov 3, 2025

reference to shwap spec defining encoding and payload of requests and responses

I haven't added this spec yet. My idea was to add it when I will be merging all specs into a single.

peer manager integration, reference to peer manager spec

Client-Server does not interact with peer manager, but Getter does.

I will update spec with

transport protocol spec (libp2p streaming)
message flow. Status message definition and proto. Error model in status message

Additionally, I can add a list of available endpoints

Comment on lines 58 to 65
### Request Messages

Request messages are binary encoded.

The request is serialized to binary format and written directly to the stream. Each request type includes:

- Height: Block height for the requested data
- Type-specific parameters
Copy link
Member

Choose a reason for hiding this comment

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

Requests use shwap id and associated encoding. We can be more specific here and link to the shwap spec

Copy link
Member Author

Choose a reason for hiding this comment

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

reworked

Comment on lines 67 to 84
### Response Messages

#### Status Message

Every server response begins with a status message:

```protobuf
enum Status {
INVALID = 0; // Invalid/unknown status
OK = 1; // Data found and will be sent
NOT_FOUND = 2; // Requested data not found
INTERNAL = 3; // Internal server error
}

message Response {
Status status = 1;
}
```
Copy link
Member

Choose a reason for hiding this comment

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

After handling requests server must send Status message indicating result of handling.

Copy link
Member Author

Choose a reason for hiding this comment

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

added

Comment on lines 96 to 112
## Supported Endpoints

SHREX supports multiple endpoint types for retrieving different kinds of data. All endpoints follow the same request-response pattern but return different data structures.

### Common Types

```protobuf
message Share {
bytes data = 1;
}

enum AxisType {
ROW = 0;
COL = 1;
}
```

Copy link
Member

Choose a reason for hiding this comment

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

This should list shwap IDs and associated shawp.Containers. Encoding is defined in shwap spec, so no need to make copy of it here. But make sure to make to link them here. Formatting as table might look better:
| protocol-id | request (shwap.id) | response payload (shwap.container)

Copy link
Member Author

Choose a reason for hiding this comment

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

added

- Retrieving data from local storage
- Sending responses back to clients

### Request Handling
Copy link
Member

Choose a reason for hiding this comment

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

Actually false. Server sends "OK" along with non-inclusion proof

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

Labels

kind:docs For solely documentation PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants