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

Empty tx warnings #1563

Merged
merged 3 commits into from
Jun 13, 2022
Merged

Empty tx warnings #1563

merged 3 commits into from
Jun 13, 2022

Conversation

jagerman
Copy link
Member

@jagerman jagerman commented Jun 1, 2022

There's a node on the network broadcasting empty transactions to other nodes; when they receive it, they log an error and then disconnect from the spewer.

Ultimately I think this can only happen if that node has a corrupted database; that is detected here to not send junk onto the network in such a case.

In tracking this down I noticed some other minor things, collected here.

Some node on the network apparently has a corrupted DB and is spewing
empty tx blobs onto the network.  Detect such a case rather than
broadcasting broken empty txes.
If on_transaction_relayed fails to parse, it returns a null_hash, but
that wasn't being detected here.

Also eliminates calling `on_transaction_relayed(tx_blob)` twice.
If we pass the blob into parse_and_validate_tx_from_blob we get
`deserialization or varint failed` error logs, which are harmless bug
annoying.  This catches the empty tx blob case earlier and logs at a
lesser severity.
@jagerman jagerman merged commit 7f384b9 into oxen-io:dev Jun 13, 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