hirosystems / hirosystems/stacks-subnets

Node would crash if invalid JSON returned from `/v2/transactions` endpoint

Open
#270 0 comments 0 reactions 1 assignee Claimed by @jbencin View on GitHub
Dominant language
Rust
Stars
51
Forks
13
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
There is an `unwrap()` when processing the response from `/v2/transactions` in `l1_submit_tx` [here](https://github.com/hirosystems/stacks-subnets/blob/c0287d39c376d1f0a984645f6b9f1796892f70ec/testnet/stacks-node/src/burnchains/l1_events.rs#L214)

**Expected behavior**
The application should never crash on incorrect/malicious network input, as this is a potential denial-of-service vector

**Additional context**
`unwrap()` should be replaced with `?`, and if necessary the appropriate `From` trait needs to be implemented on `subnet_node::burnchains:Error` to convert the error

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.