Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Conversation

RGafiyatullin
Copy link

Problem

Strange behaviour when before and/or until refer a transaction that is not the only transaction within the slot

Summary of Changes

An attempt to streamline the selection of transaction, so that the first/last/other slots are treated less differently.

Also this PR yields the entries exactly in the newest-to-oldest order as returned by the address_signatures_cf, without putting it into temporary collections, reversing them etc.

Disclaimer: this is a draft PR. The primary goal is to trigger the CI and with some luck — a conversation.

@RGafiyatullin RGafiyatullin changed the title RPC-call getSignaturesForAddress misbehaves if before/until args land on one of multiple transactions within a slot. RPC-call getSignaturesForAddress misbehaves if before/until args land on one of multiple transactions within a slot. Feb 20, 2024
@mergify mergify bot added community Community contribution need:merge-assist labels Feb 20, 2024
@mergify mergify bot requested a review from a team February 20, 2024 22:42
@RGafiyatullin RGafiyatullin marked this pull request as draft February 20, 2024 22:42
@CriesofCarrots
Copy link
Contributor

The issue you link to is known, with multiple pre-existing github issues (see, for example, the links in #33419). That issue is fixed in v1.18.
If you have other motivation for a refactor, feel free to make that argument.

@RGafiyatullin
Copy link
Author

That issue is fixed in v1.18.

Great!

If you have other motivation for a refactor, feel free to make that argument.

I personally find the proposed code a bit more readable, but that is inherently subjective, I can't possibly insist.

The reasons I see it this way are:

  • single call to the column-iterator, that is massaged into the required sequence of signatures in a self-explanatory manner;
  • reduce the level of nesting in the code that forms the exclusion-filter hash-sets;
  • find_address_signatures_for_slot a single use function, that requires reversing the list of entries, that it returns.

@RGafiyatullin
Copy link
Author

I admit that some more work has to be done:

  • doing the ensure_lowest_cleanup_slot gymnastics;
  • removing the unused timers.

But there are chances for an early return out of this PR, so I'm prepared to address the above if it would make sence.

@RGafiyatullin RGafiyatullin marked this pull request as ready for review February 23, 2024 15:14
@willhickey
Copy link
Contributor

This repository is no longer in use. Please re-open this pull request in the agave repo: https://github.com/anza-xyz/agave

@willhickey willhickey closed this Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community Community contribution need:merge-assist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants