hyperledger-iroha / iroha

Iroha - A simple, enterprise-grade decentralized ledger
https://wiki.hyperledger.org/display/iroha
Apache License 2.0
438 stars 280 forks source link

fix(data-model)!: more consistent query parameters #4978

Closed 0x009922 closed 2 months ago

0x009922 commented 2 months ago

Context

There are some minor inconsistencies within query parameters (pagination, fetch size, sorting):

Solution


Review notes (optional)

Checklist

mversic commented 2 months ago

since they are all technically limited to the maximum vec size in Iroha, which is usize, which is commonly represented as u64 in the data model.

that is the hard upper limit, we can choose to make it tighter. Using a u64 for fetch size is unnecessary, especially when you consider that MAX_FETCH_SIZE = 10000

0x009922 commented 2 months ago

that is the hard upper limit, we can choose to make it tighter.

I am fine either way, just want to make it consistent.

Using a u64 for fetch size is unnecessary, especially when you consider that MAX_FETCH_SIZE = 10000

I see, maybe then make it even smaller, like u16?

github-actions[bot] commented 2 months ago

@BAStos525

0x009922 commented 2 months ago

@mversic as was discussed, let's keep u64.

0x009922 commented 2 months ago

Tests seem to work on my machine.