clightning4j / btcli4j

It is a core lightning plugin to override Bitcoin backend plugin with esplora by Blockstream and give the possibility to make the running process with bitcoind in pruning mode more solid.
GNU General Public License v2.0
9 stars 7 forks source link

commands: add monkey check for the getutxo command from exsplora #60

Closed vincenzopalazzo closed 2 years ago

vincenzopalazzo commented 2 years ago

Changelog-Fixed: commands: add monkey check for the getutxo command from exsplora. Fixed issue #59

cc @swaptr Can you test this monkey patch on testent?

Closes https://github.com/clightning4j/btcli4j/issues/59

Signed-off-by: Vincenzo Palazzo vincenzopalazzodev@gmail.com

KAVAN-DESAI commented 2 years ago

After sometime, suddenly the node stopped running with some error as below

user:~$ sudo lightningd --daemon --testnet --log-file='/home/kavan/.lightning/testnet/log/log' --disable-plugin=bcli
user:~$ java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at jrpc.clightning.plugins.rpcmethods.RPCMethodReflection.doRun(RPCMethodReflection.java:37)
    at jrpc.clightning.plugins.CLightningPlugin.doMethods(CLightningPlugin.java:379)
    at jrpc.clightning.plugins.CLightningPlugin.start(CLightningPlugin.java:168)
    at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt:26)
    at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt)
Caused by: jrpc.clightning.plugins.exceptions.CLightningPluginException
    at io.vincenzopalazzo.btcli4j.control.commands.esplora.GetUtxOutCommand.run(GetUtxOutCommand.kt:71)
    at io.vincenzopalazzo.btcli4j.control.MediationMethod.runCommand(MediationMethod.kt:89)
    at io.vincenzopalazzo.btcli4j.Plugin.getUtxOut(Plugin.kt:122)
    ... 9 more
Lost connection to the RPC socket.Lost connection to the RPC socket.
Lost connection to the RPC socket.Lost connection to the RPC socket.Lost connection to the RPC socket.
KAVAN-DESAI commented 2 years ago

Stack trace after re-running

user:~$sudo lightningd --daemon --testnet --log-file='/home/kavan/.lightning/testnet/log/log' --disable-plugin=bcli
user:~$ java.lang.NumberFormatException: For input string: "Check fails"
    at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.base/java.lang.Integer.parseInt(Integer.java:652)
    at java.base/java.lang.Byte.parseByte(Byte.java:152)
    at java.base/java.lang.Byte.parseByte(Byte.java:178)
    at io.vincenzopalazzo.btcli4j.control.checkchain.ChainOfResponsibilityCheck.checkCommand(ChainOfResponsibilityCheck.kt:60)
    at io.vincenzopalazzo.btcli4j.control.commands.esplora.GetUtxOutCommand.run(GetUtxOutCommand.kt:51)
    at io.vincenzopalazzo.btcli4j.control.MediationMethod.runCommand(MediationMethod.kt:89)
    at io.vincenzopalazzo.btcli4j.Plugin.getUtxOut(Plugin.kt:122)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at jrpc.clightning.plugins.rpcmethods.RPCMethodReflection.doRun(RPCMethodReflection.java:37)
    at jrpc.clightning.plugins.CLightningPlugin.doMethods(CLightningPlugin.java:379)
    at jrpc.clightning.plugins.CLightningPlugin.start(CLightningPlugin.java:168)
    at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt:26)
    at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt)
java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at jrpc.clightning.plugins.rpcmethods.RPCMethodReflection.doRun(RPCMethodReflection.java:37)
    at jrpc.clightning.plugins.CLightningPlugin.doMethods(CLightningPlugin.java:379)
    at jrpc.clightning.plugins.CLightningPlugin.start(CLightningPlugin.java:168)
    at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt:26)
    at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt)
Caused by: jrpc.clightning.plugins.exceptions.CLightningPluginException: For input string: "Check fails"
    at io.vincenzopalazzo.btcli4j.control.commands.esplora.GetUtxOutCommand.run(GetUtxOutCommand.kt:80)
    at io.vincenzopalazzo.btcli4j.control.MediationMethod.runCommand(MediationMethod.kt:89)
    at io.vincenzopalazzo.btcli4j.Plugin.getUtxOut(Plugin.kt:122)
    ... 9 more
Lost connection to the RPC socket.Lost connection to the RPC socket.

Lost connection to the RPC socket.Lost connection to the RPC socket.
Lost connection to the RPC socket.