soroban-rpc: get expiration ledger sequence at source - #916
Conversation
|
As I mentioned at #913 I don't think it makes sense to implement this without hiding the expiration ledger entries from the end user. Otherwise it's redundant. In addition, as it is today, the user can request expiration entries. The hashing can be provided by a library and I don't see it as that big a hurdle. Either way, I would provide the expirations on the response or give the user access to the ledger expiration ledger entries, not both. Finally, as a UX improvement and library optimization, this isn't in the critical line for the testnet release. Let's please park it and focus on testing until then. |
2opremio
left a comment
There was a problem hiding this comment.
As per my comments above, I don't think we should allow accessing raw Expiration ledger entries and providing the expiration in a separate way. I would go one way or the other.
* fix: add latest_modified_ledger to FullLedgerEntry Also simplifies parsing FullLedgerEntry * fix: CLI test for contract read * fix: update tests to use getLedgerEntries * fix: nit
…oban-tools into tsachi/ledgerentries
sreuland
left a comment
There was a problem hiding this comment.
looks good, I'm light on rust side, on rpc side, left one other comment for consideration related to test coverage of expirationLedgerSeq=nil, such as when getLedgerEntries on a non-expirable LE like Account.
|
I'm going to merge this for now, but open to additional unit testing ideas. |
|
@tsachiherman did you modify the docs to include the API changes? |
not yet. I will follow up on that. I wanted to prioritize merging this one in so it won't block the js clients. |
What
The current implementation is making multiple requests between the rust and go code when fetching the ledger entries and their corresponding ledger expiration entries.
This PR merge them both, as well as return the expired ledger sequence to the getLedgerEntries endpoint.
Note that this PR is based on https://github.com/stellar/soroban-tools/pull/913/files