-
Notifications
You must be signed in to change notification settings - Fork 242
Add route for /transactions/{txnid}/status #457
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
Conversation
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Codecov Report
@@ Coverage Diff @@
## main #457 +/- ##
===========================================
- Coverage 100.00% 99.92% -0.08%
===========================================
Files 279 282 +3
Lines 15077 15171 +94
===========================================
+ Hits 15077 15160 +83
- Misses 0 11 +11
Continue to review full report at Codecov.
|
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
peterbroadhurst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is a bit of a pain, but I think one improvement would be to order the items in the list. My gut would be:
- Pending first
- Then sorted by descending timestamp for operations and blockchain events
I do think the timestamp for anything that's completed should be a top-level item in the status.
I um'd and ah'd about ideas for making the output more human+computer readable, but this was fundamentally the only idea I had.
peterbroadhurst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found this case we're still attempting to update TX status:
firefly/internal/assets/token_transfer.go
Lines 314 to 316 in 5526967
| if err = s.mgr.database.UpdateTransaction(ctx, tx.ID, update); err != nil { | |
| l.Errorf("TX update failed: %s update=[ %s ]", err, update) | |
| } |
|
... considering submitting my PR on events to this branch, to avoid merge hell |
|
Thanks for looking this over. I agree timestamp is a useful field to add (anything that can be helpful for debugging). On the ordering, I'll say that the benefit of the current order is that it should be stable between successive calls to the API, or when comparing two similar transactions. But I can see value in ordering by timestamp as well, from the angle of trying to plot when it got stuck. Will ponder some more... |
|
Another subtle point about timestamps - the time for BlockchainEvents comes from the chain, while the time for other objects comes from FireFly. For the most part they should line up; just noting it. Also I just realized I may not be intelligently handling large queries (such as a large Batch with a ton of Operations). Another edge case to ponder... |
I feel like maybe this is ok. Feel like a restriction that your FF must be able to cope with returning small JSON snippets for the maximum number of operations you include in any transaction, within a single JSON payload, is a valid restriction. |
The size of the batch in terms of messages/data wouldn't affect the overall operation count. For private messages, it would be the number of different parties you sent to that would scale out the ops. |
|
kaleido-io#60 raised to merge my changes into this branch. |
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Also add handling for unconfirmed token pools. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
|
Decided to go with the recommended sorting (descending by timestamp, with "pending" items at the top) |
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
|
Found an issue to sort in the merge. Fixing |
|
Sadly it's timing rather than merge 🙃 |
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
No description provided.