Electrs: Electrs hang when submitting an invalid transaction

Created on 14 Aug 2018  路  4Comments  路  Source: romanz/electrs

As a test I submitted a transaction built with invalid signatures:

Some("{\"result\":null,\"error\":{\"code\":-25,\"message\":\"Missing inputs\"},\"id\":517379}")
2018-08-14T13:26:17.847+00:00 - WARN - connection failed: request failed "HTTP/1.1 500 Internal Server Error": ["Content-Type: application/json", "Date: Tue, 14 Aug 2018 13:26:17 GMT", "Content-Length: 76"] = Some("{\"result\":null,\"error\":{\"code\":-25,\"message\":\"Missing inputs\"},\"id\":517379}")
2018-08-14T13:26:20.847+00:00 - WARN - connection failed: request failed "HTTP/1.1 500 Internal Server Error": ["Content-Type: application/json", "Date: Tue, 14 Aug 2018 13:26:20 GMT", "Content-Length: 76"] = Some("{\"result\":null,\"error\":{\"code\":-25,\"message\":\"Missing inputs\"},\"id\":517379}")
2018-08-14T13:26:23.848+00:00 - WARN - connection failed: request failed "HTTP/1.1 500 Internal Server Error": ["Content-Type: application/json", "Date: Tue, 14 Aug 2018 13:26:23 GMT", "Content-Length: 76"] = Some("{\"result\":null,\"error\":{\"code\":-25,\"message\":\"Missing inputs\"},\"id\":517379}")
2018-08-14T13:26:26.849+00:00 - WARN - connection failed: request failed "HTTP/1.1 500 Internal Server Error": ["Content-Type: application/json", "Date: Tue, 14 Aug 2018 13:26:26 GMT", "Content-Length: 76"] = Some("{\"result\":null,\"error\":{\"code\":-25,\"message\":\"Missing inputs\"},\"id\":517379}")

Electrs should return directly the error to the client.

bug

All 4 comments

Good catch!

The correct solution is to handle such errors differently than connection-related ones (which are handled by naive retries).
Note to self: there should be a specific handler for "transient" server errors, e.g. RPC_IN_WARMUP.

@gbenattar Please try the latest master branch - it should not get stuck on failing bitcoind RPC...

Closing the issue! Thanks @romanz.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

darklow picture darklow  路  8Comments

romanz picture romanz  路  5Comments

sangaman picture sangaman  路  8Comments

duckartes picture duckartes  路  3Comments

lukechilds picture lukechilds  路  3Comments