Cannot connect Bitconj wallet to Multichain

0 votes
I tried to connect Multichain using BitcoinJ wallet.  It kept getting timed-out, please help.

Thank you so much

09:28:26 21 WalletSetPasswordController.lambda$estimateKeyDerivationTimeMsec$1: Doing background test key derivation
09:28:26 22 WalletAppKit.startUp: Starting up with directory = .
09:28:27 22 AbstractBlockChain.<init>: chain head is at height 0:
v1 block:
   previous block: 0000000000000000000000000000000000000000000000000000000000000000
   merkle root: e7dd61ea7a69c8b4e53a9aca4fc82717a1403bd884434c65e3a7cfe9bf7df7d7
   time: [1459225292] 2016-03-29T04:21:32Z
   difficulty target (nBits): 520159231
   nonce: 122346

09:28:27 22 AbstractBlockChain.addWallet: Wallet/chain height mismatch: -1 vs 0
09:28:27 22 AbstractBlockChain.addWallet: Hashes: null vs 00007b00747e7e803bfcedcd36141920f4e1d9fbfca72164efd71b44e3ae4717
09:28:27 23 PeerGroup$7.run: Starting ...
09:28:28 23 PeerGroup.maybeCheckForLocalhostPeer: Localhost peer not detected.
09:28:28 23 PeerGroup.connectTo: Attempting connection to [52.77.89.184]:9239     (0 connected, 1 pending, 1 max)
09:28:28 24 NioClientManager.handleKey: Successfully connected to /52.77.89.184:9239
09:28:28 24 Peer.connectionOpened: Announcing to /52.77.89.184:9239 as: /bitcoinj:0.14-SNAPSHOT/Prachakij_Wallet:1.0/
09:28:30 21 WalletSetPasswordController.lambda$estimateKeyDerivationTimeMsec$1: Background test key derivation took 3364msec
09:28:33 25 PeerSocketHandler.timeoutOccurred: [52.77.89.184]:9239: Timed out
09:28:33 25 PeerGroup.handlePeerDeath: [52.77.89.184]:9239: Peer died      (0 connected, 0 pending, 1 max)
09:28:33 23 PeerGroup.discoverPeers: Peer discovery took 0ms and returned 0 items
09:28:33 23 PeerGroup$5.go: Waiting 1500 msec before next connect attempt to [52.77.89.184]:9239
09:28:35 23 PeerGroup.connectTo: Attempting connection to [52.77.89.184]:9239     (0 connected, 1 pending, 1 max)
09:28:35 24 NioClientManager.handleKey: Successfully connected to /52.77.89.184:9239
asked Apr 7, 2016 by anonymous
Are you using the modified BItcoinJ library linked from our website, or the original one? http://www.multichain.com/developers/
I'm using the modified Bitconj-Multichain. ( https://github.com/MultiChain/sample-bitcoinj )  I wanted to use it with private assets so I didn't change params.dat to Bitcoin behavior.
Hi, from the output above it looks like you're using the latest version of BitcoinJ i.e. bitcoinj:0.14-SNAPSHOT.  You'll need to follow the instructions in the README to build the experimental bitcoinj which has been patched to work with Multichain.  If you are still having issues, please post an update with any error messages and the params.dat file you are using.  Thanks.
Hi, I've followed the instructions in the README.  I'm still having issues.
It didn't report any error but it kept getting connected.

08:21:27 21 WalletSetPasswordController.lambda$estimateKeyDerivationTimeMsec$1: Doing background test key derivation
08:21:27 22 WalletAppKit.startUp: Starting up with directory = .
08:21:27 22 AbstractBlockChain.<init>: chain head is at height 0:
v1 block:
   previous block: 0000000000000000000000000000000000000000000000000000000000000000
   merkle root: e7dd61ea7a69c8b4e53a9aca4fc82717a1403bd884434c65e3a7cfe9bf7df7d7
   time: [1459225292] 2016-03-29T04:21:32Z
   difficulty target (nBits): 520159231
   nonce: 122346

08:21:27 22 AbstractBlockChain.addWallet: Wallet/chain height mismatch: -1 vs 0
08:21:27 22 AbstractBlockChain.addWallet: Hashes: null vs 00007b00747e7e803bfcedcd36141920f4e1d9fbfca72164efd71b44e3ae4717
08:21:27 23 PeerGroup$7.run: Starting ...
08:21:28 23 PeerGroup.maybeCheckForLocalhostPeer: Localhost peer not detected.
08:21:28 23 PeerGroup.connectTo: Attempting connection to [52.77.89.184]:9239     (0 connected, 1 pending, 1 max)
08:21:28 24 NioClientManager.handleKey: Successfully connected to /52.77.89.184:9239
08:21:28 24 Peer.connectionOpened: Announcing to /52.77.89.184:9239 as: /bitcoinj:0.14-SNAPSHOT/Prachakij_Wallet:1.0/
08:21:29 21 WalletSetPasswordController.lambda$estimateKeyDerivationTimeMsec$1: Background test key derivation took 2808msec
08:21:33 25 PeerSocketHandler.timeoutOccurred: [52.77.89.184]:9239: Timed out
08:21:33 25 PeerGroup.handlePeerDeath: [52.77.89.184]:9239: Peer died      (0 connected, 0 pending, 1 max)
08:21:33 23 PeerGroup.discoverPeers: Peer discovery took 0ms and returned 0 items
08:21:33 23 PeerGroup$5.go: Waiting 1500 msec before next connect attempt to [52.77.89.184]:9239
08:21:35 23 PeerGroup.connectTo: Attempting connection to [52.77.89.184]:9239     (0 connected, 1 pending, 1 max)
08:21:35 24 NioClientManager.handleKey: Successfully connected to /52.77.89.184:9239
08:21:35 24 Peer.connectionOpened: Announcing to /52.77.89.184:9239 as: /bitcoinj:0.14-SNAPSHOT/Prachakij_Wallet:1.0/
08:21:40 25 PeerSocketHandler.timeoutOccurred: [52.77.89.184]:9239: Timed out
08:21:40 25 PeerGroup.handlePeerDeath: [52.77.89.184]:9239: Peer died      (0 connected, 0 pending, 1 max)
08:21:40 23 PeerGroup.discoverPeers: Peer discovery took 0ms and returned 0 items
08:21:40 23 PeerGroup$5.go: Waiting 3375 msec before next connect attempt to [52.77.89.184]:9239
08:21:43 23 PeerGroup.connectTo: Attempting connection to [52.77.89.184]:9239     (0 connected, 1 pending, 1 max)
08:21:43 24 NioClientManager.handleKey: Successfully connected to /52.77.89.184:9239
08:21:43 24 Peer.connectionOpened: Announcing to /52.77.89.184:9239 as: /bitcoinj:0.14-SNAPSHOT/Prachakij_Wallet:1.0/
08:21:48 25 PeerSocketHandler.timeoutOccurred: [52.77.89.184]:9239: Timed out
08:21:48 25 PeerGroup.handlePeerDeath: [52.77.89.184]:9239: Peer died      (0 connected, 0 pending, 1 max)
08:21:48 23 PeerGroup.discoverPeers: Peer discovery took 0ms and returned 0 items
08:21:48 23 PeerGroup$5.go: Waiting 7594 msec before next connect attempt to [52.77.89.184]:9239
08:21:56 23 PeerGroup.connectTo: Attempting connection to [52.77.89.184]:9239     (0 connected, 1 pending, 1 max)
08:21:56 24 NioClientManager.handleKey: Successfully connected to /52.77.89.184:9239
My params.dat is ::

chain-protocol = multichain             # Chain protocol: multichain (permissions, native assets) or bitcoin
chain-description = MultiChain chain1   # Chain description, embedded in genesis block coinbase, max 256 chars.
chain-is-testnet = false                # Content of the 'testnet' field of API responses, for compatibility.
target-block-time = 15                  # Target time between blocks (transaction confirmation delay), seconds. (5 - 86400)
maximum-block-size = 1000000            # Maximum block size in bytes. (1000 - 1000000000)

# Global permissions

anyone-can-connect = false              # Anyone can connect, i.e. a publicly readable blockchain.
anyone-can-send = false                 # Anyone can send, i.e. transaction signing not restricted by address.
anyone-can-receive = false              # Anyone can receive, i.e. transaction outputs not restricted by address.
anyone-can-issue = false                # Anyone can issue new native assets.
anyone-can-mine = false                 # Anyone can mine blocks (confirm transactions).
anyone-can-activate = false             # Anyone can grant or revoke connect, send and receive permissions.
anyone-can-admin = false                # Anyone can grant or revoke all permissions.
allow-p2sh-outputs = true               # Allow pay-to-scripthash (P2SH) scripts, often used for multisig.
allow-multisig-outputs = true           # Allow bare multisignature scripts, rarely used but still supported.

# Consensus requirements

setup-first-blocks = 60                 # Length of initial setup phase in blocks, in which mining-diversity,
                                        # admin-consensus-* and mining-requires-peers are not applied. (1 - 31536000)
mining-diversity = 0.3                  # Miners must wait <mining-diversity>*<active miners> between blocks. (0 - 1)
admin-consensus-admin = 0.5             # <admin-consensus-admin>*<active admins> needed to change admin perms. (0 - 1)
admin-consensus-activate = 0.5          # <admin-consensus-activate>*<active admins> to change activate perms. (0 - 1)
admin-consensus-mine = 0.5              # <admin-consensus-mine>*<active admins> to change mining permissions. (0 - 1)
admin-consensus-issue = 0.0             # <admin-consensus-issue>*<active admins> to change issue permissions. (0 - 1)
mining-requires-peers = true            # Default for whether nodes only mine blocks if connected to other nodes.

# Native blockchain currency (likely not required)

initial-block-reward = 0                # Initial block mining reward in raw native currency units. (0 - 1000000000000000000)
first-block-reward = -1                 # Different mining reward for first block only, ignored if negative. (-1 - 1000000000000000000)
reward-halving-interval = 52560000      # Interval for halving of mining rewards, in blocks. (60 - 4294967295)
reward-spendable-delay = 1              # Delay before mining reward can be spent, in blocks. (1 - 100000)
minimum-per-output = 0                  # Minimum native currency per output (anti-dust), in raw units.
                                        # If set to -1, this is calculated from minimum-relay-fee. (-1 - 1000000000)
maximum-per-output = 100000000000000    # Maximum native currency per output, in raw units. (0 - 1000000000000000000)
minimum-relay-fee = 0                   # Minimum transaction fee, in raw units of native currency. (0 - 1000000000)
native-currency-multiple = 100000000    # Number of raw units of native currency per display unit. (0 - 1000000000)

# Advanced mining parameters

skip-pow-check = false                  # Skip checking whether block hashes demonstrate proof of work.
pow-minimum-bits = 16                   # Initial and minimum proof of work difficulty, in leading zero bits. (1 - 32)
target-adjust-freq = 86400              # Interval between proof of work difficulty adjustments, in seconds. (3600 - 4294967295)
allow-min-difficulty-blocks = false     # Allow lower difficulty blocks if none after 2*<target-block-time>.

# Standard transaction definitions

only-accept-std-txs = true              # Only accept and relay transactions which qualify as 'standard'.
max-std-tx-size = 100000                # Maximum size of standard transactions, in bytes. (1024 - 10000000)
max-std-op-return-size = 4096           # Maximum size of OP_RETURN metadata in standard transactions, in bytes. (0 - 8388608)
max-std-op-drops-count = 5              # Maximum number of OP_DROPs per output in standard transactions. (0 - 100)
max-std-element-size = 600              # Maximum size of data elements in standard transactions, in bytes. (128 - 32768)

# The following parameters were generated by multichain-util.
# They SHOULD NOT BE EDITED.

default-network-port = 9239             # Default TCP/IP port for peer-to-peer connection with other nodes.
default-rpc-port = 9238                 # Default TCP/IP port for incoming JSON-RPC API requests.
chain-name = chain1                     # Chain name, used as first argument for multichaind and multichain-cli.
protocol-version = 10005                # Protocol version at the moment of blockchain genesis.
network-message-start = f9d7c9e9        # Magic value sent as the first 4 bytes of every peer-to-peer message.
address-pubkeyhash-version = 0082a65b   # Version bytes used for pay-to-pubkeyhash addresses.
address-scripthash-version = 05637174   # Version bytes used for pay-to-scripthash addresses.
private-key-version = 80f71c6d          # Version bytes used for exporting private keys.
address-checksum-value = 9b501a19       # Bytes used for XOR in address checksum calculation.

# The following parameters were generated by multichaind.
# They SHOULD NOT BE EDITED.

genesis-pubkey = 03fd11652243bafb5efa3d4d8bb5a683078eaac97eb6f56121296d6733cd10ad30 # Genesis block coinbase output public key.
genesis-version = 1                     # Genesis block version.
genesis-timestamp = 1459225292          # Genesis block timestamp.
genesis-nbits = 520159231               # Genesis block difficulty (nBits).
genesis-nonce = 122346                  # Genesis block nonce.
genesis-pubkey-hash = 4ca107b126b382deb5d1281bc574255ca4198e1f # Genesis block coinbase output public key hash.
genesis-op-return-script = 5b6e6f74207365745d # Genesis block coinbase OP_RETURN script.
genesis-hash = 00007b00747e7e803bfcedcd36141920f4e1d9fbfca72164efd71b44e3ae4717 # Genesis block hash.
chain-params-hash = 015b12ec18b249da552e4a51b51bf35c0fea87c4e1a8eacbde485de9c0c82037 # Hash of blockchain parameters, to prevent accidental changes.

1 Answer

0 votes
The BitcoinJ sample wallet can only connect to MultiChain when it has been configured to behave like the original Bitcoin blockchain.  The BitcoinJ project itself does not support assets and permissions.
answered Apr 27, 2016 by simon
...