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

feat(rosetta): Support pagination for Rosetta API list_neurons #3609

Merged
merged 6 commits into from
Feb 5, 2025

Conversation

max-dfinity
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the feat label Jan 24, 2025
@max-dfinity max-dfinity changed the title feat(rosetta): Support pagination for list_neurons feat(rosetta): Support pagination for Rosetta API list_neurons Jan 27, 2025
@max-dfinity max-dfinity marked this pull request as ready for review January 31, 2025 17:39
@max-dfinity max-dfinity requested a review from a team as a code owner January 31, 2025 17:39
@fsodre
Copy link
Contributor

fsodre commented Feb 4, 2025

Thanks for working on this.

Ar there tests showing the new behavior works as expected and also that it's not breaking for people that are not specifying a page number?

@max-dfinity
Copy link
Contributor Author

@fsodre No, I did not add tests. It definitely wouldn't be breaking for users not specifying page number since that's what the tests are already doing.

Is there an efficient way to create more than 500 neurons in Rosetta tests? If not, we would need to additionally add the page_size parameter to the Rosetta API, but I was hoping to keep the changes in rosetta as minimal as possible, since many other parameters are already not provided.

@fsodre
Copy link
Contributor

fsodre commented Feb 5, 2025

Hi. I believe it shouldn't be hard to add another scenario to this test case, in which neurons can be easily created.

@max-dfinity
Copy link
Contributor Author

max-dfinity commented Feb 5, 2025

@fsodre
I tried looping and creating enough neurons to test the paging, but ran into a few problems.

There is a neuron creation limit in the Governance API. I tried advancing time, and got the following errors in the tests (this is just a sample, there were about 10 of the first, and hundreds of the second (as I was trying to create 501 neurons).

2025-02-05T01:32:36.713175Z ERROR rs/rosetta-api/icp/src/ledger_client.rs:712: Error submitting transaction TransactionIdentifier(TransactionIdentifier { hash: "0000000000000000000000000000000000000000000000000000000000000000" }): Operation took longer than 20s to complete..


2025-02-05T01:32:53.546703Z ERROR rs/rosetta-api/icp/src/ledger_client.rs:712: Error submitting transaction TransactionIdentifier(TransactionIdentifier { hash: "18413cff148a7eee3650b3d3629071820edbceb7e28eafb5e5f622f94c9cf02f" }): Operation took longer than 20s to complete..

Any ideas?

Copy link
Contributor

@fsodre fsodre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for trying to add the tests, it seems like we have infra limitations there for now. Let's ship this change without it and work on it as a follow up.

@max-dfinity max-dfinity force-pushed the msum/list-neurons-pagination-A branch from 2151022 to c1130d3 Compare February 5, 2025 17:57
@max-dfinity max-dfinity enabled auto-merge February 5, 2025 17:58
@max-dfinity max-dfinity added this pull request to the merge queue Feb 5, 2025
Merged via the queue into master with commit a21f470 Feb 5, 2025
53 checks passed
@max-dfinity max-dfinity deleted the msum/list-neurons-pagination-A branch February 5, 2025 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants