-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 at BitcoinJ deserializing message #2557
Comments
I had a look. There is a peer sending an invalid "alert" msg. On top of that, the alert msg is malformed. As part of bisq's bitcoinj 0.14.7 release I included some DoS protection I was able to reproduce the exception running bisq in dao-betanet (it is reproduced randomly). I notice by default dao-betanet does not use the "safe" btc nodes provided by the bisq community. It uses either dns peer discovery or connects to the harcoded bitcoinj nodes. I wrote a java main program that reproduces the problem:
|
@ManfredKarrer by "PB" you mean protobuf? By "our branch" you mean https://github.com/bisq-network/bitcoinj/tree/bisq_0.14.7? I don't think this is a protobuf related problem. |
Thanks for looking into it! Ah yes the dao-betanet uses public network and that is the reason we never saw that before as normal mainnet connect to our provided nodes which prob. do not relay such messages in the first place. Yes with PB i meant protobuffer, just thought maybe we miss a new data field from recent releases.... |
Running dao-betanet (mainnet) I got that error msg repeatadly.
@oscarguindzberg Any idea? Can it be that some new data is not supported by the PB serialisation in our branch?
org.bitcoinj.core.ProtocolException: Error deserializing message f9beb4d9616c65727400000000000000a80000001bf9aaea60010000000000000000000000ffffff7f00000000ffffff7ffeffff7f01ffffff7f00000000ffffff7f00ffffff7f002f555247454e543a20416c657274206b657920636f6d70726f6d697365642c2075706772616465207265717569726564004630440220653febd6410f470f6bae11cad19c48413becb1ac2c17f908fd0fd53bdc3abd5202206d0e9c96fe88d4a0f01ed9dedae2b6f9e00da94cad0fecaae66ecf689bf71b50
Caused by: org.bitcoinj.core.ProtocolException: Claimed value length too large: 249
at org.bitcoinj.core.Message.readBytes(Message.java:331)
at org.bitcoinj.core.Message.readByteArray(Message.java:345)
at org.bitcoinj.core.AlertMessage.parse(AlertMessage.java:71)
at org.bitcoinj.core.Message.(Message.java:96)
at org.bitcoinj.core.Message.(Message.java:123)
at org.bitcoinj.core.AlertMessage.(AlertMessage.java:58)
at org.bitcoinj.core.BitcoinSerializer.makeAlertMessage(BitcoinSerializer.java:261)
at org.bitcoinj.core.BitcoinSerializer.makeMessage(BitcoinSerializer.java:219)
at org.bitcoinj.core.BitcoinSerializer.deserializePayload(BitcoinSerializer.java:183)
... 9 common frames omitted
Mar-18 13:29:16.705 [NioClientManager] INFO org.bitcoinj.core.PeerGroup: [139.59.151.88]:8333: Peer died (11 connected, 0 pending, 12 max)
Mar-18 13:29:16.705 [NioClientManager] WARN o.b.net.ConnectionHandler: Error handling SelectionKey: java.lang.IllegalStateException java.lang.IllegalStateException: null
at com.google.common.base.Preconditions.checkState(Preconditions.java:429)
at org.bitcoinj.net.ConnectionHandler.handleKey(ConnectionHandler.java:224)
at org.bitcoinj.net.NioClientManager.handleKey(NioClientManager.java:86)
at org.bitcoinj.net.NioClientManager.run(NioClientManager.java:122)
at com.google.common.util.concurrent.AbstractExecutionThreadService$1$2.run(AbstractExecutionThreadService.java:66)
at com.google.common.util.concurrent.Callables$4.run(Callables.java:122)
at org.bitcoinj.utils.ContextPropagatingThreadFactory$1.run(ContextPropagatingThreadFactory.java:49)
at java.base/java.lang.Thread.run(Thread.java:844)
The text was updated successfully, but these errors were encountered: