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

Debug stream can be cut off by binary data #122

Open
vbar opened this issue Mar 7, 2022 · 5 comments
Open

Debug stream can be cut off by binary data #122

vbar opened this issue Mar 7, 2022 · 5 comments

Comments

@vbar
Copy link
Collaborator

vbar commented Mar 7, 2022

Running the Payment transaction from an account with the attached hook produces the following stream:
cutoff-new

(this is on the feat/debug-prettify branch but the same problem exists with the old debug stream formatting), i.e. without the (unconditional) trace output. The raw log can also be captured from rippled, and it does include the trace output, including the \0 character after s.

Sometimes the log output with \0 characters is truncated even from rippled (it's very dependent of what's traced, e.g. length of the traced name), and it's debatable whether rippled should include \0 in its (otherwise readable text) output, but apparently it can happen, and it should be handled by the debug stream.

cutoff.zip

@muzam1l
Copy link
Collaborator

muzam1l commented Mar 8, 2022

Does this problem still exist in https://xrpl-hooks-ide-git-feat-debug-prettify-equilibriumco.vercel.app ?

@muzam1l
Copy link
Collaborator

muzam1l commented Mar 8, 2022

As far as I can see, front-end is displaying all logs as recieved now, you can compare them with xrpl debug stream explorer too https://hooks-testnet-debugstream.xrpl-labs.com/rLRoQRDHTVwxChE7abrQsD6PoDJtDs7qHK (replace url path with required account address). If compared at same time they seem to be similar.

@vbar
Copy link
Collaborator Author

vbar commented Mar 8, 2022

Well, yes, but comparing the stream explorer at different times shows surprising differences:
explorer

The entry at 14:31 might be (times don't agree) logging a transaction from https://xrpl-hooks-ide-git-feat-debug-prettify-equilibriumco.vercel.app/ , which is cut off (also in IDE):
cutoff

The entries at 14:36 (at least the second & third one - no idea where the first 14:36 comes from) is logging a transaction I made locally, against rippled instance from https:/XRPL-Labs/xrpld-hooks . I'd think it was the same payment transaction, and it was certainly the same hook (I didn't reinstall anything), but the log is not cut off, and it's also complete in rippled, which has

local

with binary data that looks like some random memory...

So while I agree the logging problems are not limited to IDE, I still think it would be nice to show all of the log (not just printable characters), so that in time we can learn what the problem actually is...

@muzam1l
Copy link
Collaborator

muzam1l commented Mar 8, 2022

Yes I saw this too, ide also shows full log sometimes and truncates them other times. If you have both debug streams open side by side, they show same logs, and this can be confirmed by inspecting socket messages directly. So ide can't do much in that, xrpl-labs needs to fix their logs!

@vbar
Copy link
Collaborator Author

vbar commented Mar 9, 2022

But of course IDE (which is for developers) can do more than the stream explorer (which shows the blockchain to anybody who's interested): it can show (and highlight) binary data in the log. Then we can see whether the truncated output in stream explorer is also caused by binary data coming from rippled, take the demo to XRPL Labs and (even before it's fixed) reassure hook developers the problem isn't in their code...

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

No branches or pull requests

2 participants