-
Notifications
You must be signed in to change notification settings - Fork 72
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
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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