Skip to content
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

Audit all endpoints for differences from protobuf #736

Closed
Tracked by #735
peterargue opened this issue Aug 30, 2024 · 2 comments
Closed
Tracked by #735

Audit all endpoints for differences from protobuf #736

peterargue opened this issue Aug 30, 2024 · 2 comments
Assignees

Comments

@peterargue
Copy link
Contributor

peterargue commented Aug 30, 2024

Review all endpoints and flag and differences in the request or response objects in the protobuf and SDK implementation.

Once we have a list, let's create issues to update all of the client handlers that should be updated.

@peterargue peterargue changed the title Audit all endpoints and ensure request and response parameters are up to date Audit all endpoints for differences from protobuf Aug 30, 2024
@illia-malachyn
Copy link
Contributor

illia-malachyn commented Sep 11, 2024

Endpoints that look fine:

Ping - OK
GetNetworkParameters - OK
GetTransactionsByBlockID - OK
GetAccount/GetAccountAtLatestBlock/GetAccountAtBlockHeight - OK
ExecuteScriptAtLatestBlock/ExecuteScriptAtBlockID/ExecuteScriptAtBlockHeight - OK
GetLatestProtocolStateSnapshot - OK
GetExecutionResultForBlockID - OK (we don't return 1 field but it's marked as deprecated)
GetExecutionDataByBlockID - OK
SubscribeExecutionData (and similar) - OK
SubscribeEvents (and similar) - OK

Endpoints that return less info but look fine:

GetLatestBlockHeader/GetBlockHeaderByID/GetBlockHeaderByHeight

  • we return significantly less info on the SDK side but it looks fine

GetLatestBlock/GetBlockByID/GetBlockByHeight

  • GetLatestBlockRequest request omits full_block_response field
  • BlockResponse contains significantly less info on the SDK side but looks fine
  • BlockHeader & BlockPayload contain less info but look fine

GetCollection (and similar)

  • response: we don't return collection ID, but I guess we use an array index for this instead ([]Collections)

GetTransaction

  • block_id, collection_id are not used in a request but it looks fine

GetTransactionResult

  • block_id, collection_id are not used in a request but it looks fine
  • TransactionResulthas less info but looks fine

GetTransactionResultByIndex/GetTransactionResultsByBlockID

  • TransactionResult has less info but looks fine

SendTransaction

  • SendTransactionResponse model has an ID field. We don't use it on the SDK side and return error. However, it's totally fine as client can calculate id themselves by using tx.ID() method.

GetEventsForHeightRange - OK

  • though we return 1 more field Value cadence.Value in events []Events. It's fine. We do this decoding to cadence value for clients.

Endpoints that are questionable:

GetNodeVersionInfo

  • we don't return CompatibleRange compatible_range field on the SDK side.

@nvdtf
Copy link
Member

nvdtf commented Sep 27, 2024

Given these endpoints have been in use by developers for some time, I would not prioritize any change unless explicitly asked by a developer. This being said, delivering breaking changes to make the AN API in the SDK fully equivalent seems fine too, given we have enough engineering capacity to tackle.

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

No branches or pull requests

3 participants