-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
transactions() on beta 5 has some issues with cursors. #1825
Comments
I'm using the |
Nice finds! These are real bugs, the SortedTxCursor decodes block height using
Oddly, this should've been covered by the |
Hi @andy-thomason 👋, Thank you for taking the initiative to open this bug report in Given your interest and expertise, we believe you would be an excellent candidate for the Fuel Developer Champions program. It's a fantastic opportunity to collaborate more closely with our team, deepen your engagement, get access to bounty programs for members of the program, champions swag, and more initiatives are in the works as the program continues to evolve. 🚀 Please consider joining us by checking out the start-here repo for the program. Looking forward to welcoming you into the program! Ben |
Thanks for the encouragement, Ben. I'll check with our team at Superchain Network about the programme. It is good to see new projects in this space and it is all great food for our cross chain We are setting up a node on our network to do more tests and I'm just building out Andy. |
#1825 The `BlockHeight` was encoded in hexadecimal in response of `transactions` endpoint and decoded with `u32::from_str` in parameter of type `SortedTXCursor` which was preventing from making chained API calls. This PR, fixes this by decoding `BlockHeight` from hexadecimal form in `SortedTXCursor`. This bug wasn't catch by the test `tx::get_transactions()` because the test was using only txs included in block 3 that has a string representation that is the same in an hexadecimal and decimal encoding. I added the creation of 10 blocks at start of the test so that now the txs are included in blocks that have a hexadecimal and decimal encoding form that differs. I didn't spotted any hangs on the endpoint when the cursor is initialized manually, however as we can't ask to start at a precise block height without specifying a previous `tx_id` it's not very usable to make manual search. PS: This is my first contribution and so to what I saw my PR doesn't brake anything else and I tried to follow the guidelines of the repository, however maybe their things that I missed and so I'm very open to criticise ! ## Checklist - [x] Breaking changes are clearly marked as such in the PR description and changelog - [x] New behavior is reflected in tests - [x] [The specification](https://github.com/FuelLabs/fuel-specs/) matches the implemented behavior (link update PR if changes are needed) ### Before requesting review - [x] I have reviewed the code myself - [x] I have created follow-up issues caused by this PR and linked them here ### After merging, notify other teams [Add or remove entries as needed] - [ ] [Rust SDK](https://github.com/FuelLabs/fuels-rs/) - [ ] [Sway compiler](https://github.com/FuelLabs/sway/) - [ ] [Platform documentation](https://github.com/FuelLabs/devrel-requests/issues/new?assignees=&labels=new+request&projects=&template=NEW-REQUEST.yml&title=%5BRequest%5D%3A+) (for out-of-organization contributors, the person merging the PR will do this) - [ ] Someone else? --------- Co-authored-by: Green Baneling <XgreenX9999@gmail.com>
closed by #1950 |
Hi Everyone. I'm enjoying exploring the codebase and doing some experiments with the public beta 5 endpoint.
I don't have a particular template to work from, so I'm making some assumptions here:
Given
Two things go wrong.
such as
Some("0000000a#0x49c6fee039066353084bdf8585930bba4cd9e89433c2abce3f8c7c35c9b8ac4e")
which fails because the endpoint expects a decimal number.
Am I being an idiot, or should these two expectations be met?
The text was updated successfully, but these errors were encountered: