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: get in queue requests #655

Closed
wants to merge 3 commits into from
Closed

Conversation

blckngm
Copy link
Contributor

@blckngm blckngm commented Apr 13, 2022

Now the gw_get_transaction/gw_get_withdrawal RPC calls will return

{ "status": "in_queue", ... }

instead of null for in queue transactions/withdrawals.

On a full node gw_get_transaction/gw_get_withdrawal will be almost
always accurate.

Readonly nodes when well connected to the full node via the p2p network
will be notified about in queue request changes, so they will also
return

{ "status": "in_queue", ... }

for requests that they know are in queue.

But due to network delay or connectivity issues they may still return
inaccurate answers, e.g. they may return null for some in queue
requests, or they may return “in queue” or null for actually
pending/committed requests.

@blckngm blckngm force-pushed the get-in-queue-transactions branch from ec5c5c1 to 1d880fd Compare April 19, 2022 02:08
@blckngm blckngm marked this pull request as ready for review April 19, 2022 02:17
@blckngm blckngm changed the title WIP: feat: get in queue requests feat: get in queue requests Apr 19, 2022
@blckngm blckngm force-pushed the get-in-queue-transactions branch from 0c7449f to 21642dc Compare April 20, 2022 01:53
blckngm added 2 commits April 20, 2022 16:51
Now the `gw_get_transaction`/`gw_get_withdrawal` RPC calls will return

```
{ "status": "in_queue", ... }
```

instead of null for in queue transactions/withdrawals.

On a full node `gw_get_transaction`/`gw_get_withdrawal` will be almost
always accurate.

Readonly nodes when well connected to the full node via the p2p network
will be notified about in queue request changes, so they will also
return

```
{ "status": "in_queue", ... }
```

for requests that **they know** are in queue.

But due to network delay or connectivity issues they may still return
inaccurate answers, e.g. they may return null for some in queue
requests, or they may return “in queue” or null for actually
pending/committed requests.
FeeQueue is not shared with any other tasks. It does not need to be
wrapped with Arc Mutex.
@blckngm blckngm force-pushed the get-in-queue-transactions branch from 21642dc to 106781f Compare April 20, 2022 08:52
@jjyr jjyr requested review from jjyr and zeroqn April 26, 2022 06:44
@jjyr
Copy link
Collaborator

jjyr commented Apr 26, 2022

This PR introduce too many cost to the protocol compares to the benefit. We should give a better solution.

@jjyr jjyr closed this Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants