-
Notifications
You must be signed in to change notification settings - Fork 189
Get Block endpoint is missing the system collection #4584
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
Comments
@janezpodhostnik you're definitely right that the system tx/collection are missing and a bit confusing in the Access API today. Reading over this issue, I'm not totally clear on what the goal is. I think we could add support for querying the system transaction/result fairly easily since the TX IDs are static and known. I think it would be less straight forward to add the system collection ID into the block response or add support for querying the system collection by ID. I'm not actually sure if it's even static. Currently, we return and empty collectionID since we don't locally index it. |
I would like t o avoid relying on this. Its not guaranteed it will stay static forever, and I wouldn't want to break any code when/if we make it non-static. I'm not exactly sure what to do here, but I would definitely want to avoid the CLI or the SDKs needing to solve this issue. |
That's fair. I think we should definitely add new endpoints for getting the system tx directly for a block. Something like We may also want to add support in We could add support to |
It is not static, it has been several values already, every time something new is added to it the hash change so it will change. Here are the values it has been historically:
|
Problem Definition
Getting transactions by block ID is complicated because the block collection guarantees do not contain the system chunk. Because of this the system transaction needs to be fetched individually by a separate method.
The access node does some weird gymnastics to get around this issue:
flow-go/engine/access/rpc/backend/backend_transactions.go
Line 477 in d9ae9eb
flow-go/engine/access/rpc/backend/backend_transactions.go
Line 227 in d9ae9eb
And there is a proposed workaround in the CLI: onflow/flow-cli#1123
Ideally there wouldn't need to be workarounds to add the system transaction to get transactions by block results.
Proposed Solution
Definition of Done
We need a generalised way to fetch all transactions in a block (including the system transaction)
The text was updated successfully, but these errors were encountered: