Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

Node internal error while calling RPC method 'getblock' on block #1199910 #4211

Open
ozakhariash-ledger opened this issue Nov 12, 2020 · 0 comments

Comments

@ozakhariash-ledger
Copy link

Branch 3.0.9.0 (on 3.0.8.0 is the same, while on stable 3.0.5 verbosity '2' is not supported at all ).

curl --user user:password --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblock", "params": ["d45bc7a6326c4ddd03a2cea22c0d36c14826aa6a630a9f412d2573cfc023a792", "2"]}' -H 'content-type: text/plain;' http://localhost:30000/
{"result":null,"error":{"code":-32603,"message":"Internal error"},"id":"curltest"}

In the node logs:

fail: Stratis.Bitcoin.Features.RPC.RPCMiddleware[0]
      Internal error while calling RPC Method
System.NotImplementedException: The network StratisMain does not have any prefix for bech32 WITNESS_PUBKEY_ADDRESS
   at NBitcoin.Network.GetBech32Encoder(Bech32Type type, Boolean throws) in /StratisBitcoinFullNode/src/NBitcoin/Network.cs:line 720
   at NBitcoin.Network.CreateBech32(Bech32Type type, Byte[] bytes, Byte witnessVersion, Network network) in /StratisBitcoinFullNode/src/NBitcoin/Network.cs:line 751
   at NBitcoin.BitcoinWitPubKeyAddress..ctor(WitKeyId segwitKeyId, Network network) in /StratisBitcoinFullNode/src/NBitcoin/BitcoinSegwitAddress.cs:line 69
   at NBitcoin.WitKeyId.GetAddress(Network network) in /StratisBitcoinFullNode/src/NBitcoin/KeyId.cs:line 181
   at Stratis.Bitcoin.Controllers.Models.ScriptPubKey..ctor(Script script, Network network) in /StratisBitcoinFullNode/src/Stratis.Bitcoin/Controllers/Models/TransactionModel.cs:line 295
   at Stratis.Bitcoin.Controllers.Models.Vout..ctor(Int32 n, TxOut txout, Network network) in /StratisBitcoinFullNode/src/Stratis.Bitcoin/Controllers/Models/TransactionModel.cs:line 223
   at Stratis.Bitcoin.Controllers.Models.TransactionVerboseModel.<>c__DisplayClass1_1.<.ctor>b__1(TxOut txout) in /StratisBitcoinFullNode/src/Stratis.Bitcoin/Controllers/Models/TransactionModel.cs:line 87
   at System.Linq.Enumerable.SelectListIterator`2.ToList()
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Stratis.Bitcoin.Controllers.Models.TransactionVerboseModel..ctor(Transaction trx, Network network, ChainedHeader block, ChainedHeader tip) in /StratisBitcoinFullNode/src/Stratis.Bitcoin/Controllers/Models/TransactionModel.cs:line 87
   at Stratis.Bitcoin.Controllers.Models.BlockModel.<>c__DisplayClass97_0.<.ctor>b__1(Transaction t) in /StratisBitcoinFullNode/src/Stratis.Bitcoin/Controllers/Models/BlockModel.cs:line 102
   at System.Linq.Enumerable.SelectListIterator`2.ToArray()
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Stratis.Bitcoin.Controllers.Models.BlockModel..ctor(Block block, ChainedHeader chainedHeader, ChainedHeader tip, Network network, Int32 verbosity) in /StratisBitcoinFullNode/src/Stratis.Bitcoin/Controllers/Models/BlockModel.cs:line 102
   at Stratis.Bitcoin.Features.RPC.Controllers.FullNodeController.GetBlock(String blockHash, Int32 verbosity) in /StratisBitcoinFullNode/src/Stratis.Bitcoin.Features.RPC/Controllers/FullNodeController.cs:line 399
   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Stratis.Bitcoin.Features.RPC.RPCMiddleware.InvokeSingleAsync(HttpContext httpContext, JObject requestObj) in /StratisBitcoinFullNode/src/Stratis.Bitcoin.Features.RPC/RPCMiddleware.cs:line 229

All other blocks < 1199910 work fine.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant