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

Error on broadcasting transaction via API in testnet/regtest #467

Open
ziprotak opened this issue May 26, 2024 · 1 comment
Open

Error on broadcasting transaction via API in testnet/regtest #467

ziprotak opened this issue May 26, 2024 · 1 comment

Comments

@ziprotak
Copy link

I'm trying to broadcast raw tx with /v1/cryptos/BTC/transactions endpoint but I'm getting the errors in the app log (see below). I've tried to broadcast in Regtest mode using my own node and now faced it in Testnet with my own node.

The raw tx I'm trying to broadcast is sucesfully decoded with any external tool like blockcypher decodetx service

Any ideas?

fail: Microsoft.AspNetCore.Server.Kestrel: Connection id "0HN3TMBKG8RED", Request id "0HN3TMBKG8RED:00000001": An unhandled exception was thrown by the application.
System.IO.EndOfStreamException: No more byte to read
at NBitcoin.BitcoinStream.ReadWriteBytes(Span1 data) at NBitcoin.uint256.MutableUint256.ReadWrite(BitcoinStream stream) at NBitcoin.BitcoinStream.ReadWrite(uint256& value) at NBitcoin.OutPoint.ReadWrite(BitcoinStream stream) at NBitcoin.TxIn.ReadWrite(BitcoinStream stream) at NBitcoin.BitcoinStream.ReadWrite(TxInList& list) at NBitcoin.Transaction.ReadWrite(BitcoinStream stream) at NBitcoin.Transaction.FromBytes(Byte[] bytes, Nullable1 version)
at NBitcoin.Transaction.FromBytes(Byte[] bytes)
at NBXplorer.Controllers.MainController.Broadcast(TrackedSourceContext trackedSourceContext, Boolean testMempoolAccept) in /home/NBXplorer/NBXplorer/Controllers/MainController.cs:line 748
at lambda_method28(Closure, Object)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application)

Screenshot 2024-05-26 at 9 45 56 PM

@notraiday
Copy link

Same in both ltc and btc mainnets when using http api. Docs are poor for transaction broadcast

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