carp icon indicating copy to clipboard operation
carp copied to clipboard

Inconsistent paging style in Carp server

Open SebastienGllmt opened this issue 3 years ago • 0 comments

There are two ways to get stable pagination:

  1. Provide a start value and an ending block. This is because if the state of the blockchain changes, the ending block hash will change so you're guaranteed the iterator is safe.
  2. Provide a start value and a start block. For the same reason, if the start value stops existing you will eventually get an error

In the current Carp server, we use (2) for the credential/addresses endpoint and we use a mix of both (1)+(2) for the transaction/history endpoint.

We should either decide on a style, or find some to offer both of them.

SebastienGllmt avatar May 26 '22 04:05 SebastienGllmt