Bitcoin Forum
June 22, 2024, 04:07:07 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Armory / Re: armoryd.py sendasciitx times out when trying to broadcast fully signed tx on: September 12, 2018, 05:14:23 PM
This will probably never work in regtest.

Armory has 2 paths to broadcast a transactions:

1) P2P

Armory is connected to your Bitcoin node as a node itself. It uses that to grab zero confirmation tx from the network, new block notifications as well as broadcasting transactions. The P2P layer is not meant to operate according to a client server paradigm however.

When a node broadcasts a transaction on the network, it first announces it has transactions by hash in an inv_tx packet. The recipient nodes then decide at their own discretion if they want any of the transactions in that inventory batch. They will request these tx by hash from the origin node. At this point, the exchange is over.

These 2 steps are the "send" mechanic, where Armory sends to the tx to the node.

Next is the "get" step. In a client/server setup (i.e. Armory operations), you want an ACK on whether the tx was accepted. What we are trying to achieve when broadcasting a transaction from Armory is to get that tx in the Bitcoin network's "mempool". Simply pushing that tx to our node is not enough, we need to know whether that tx was accepted by the node as well, which is a strong enough guarantee the tx will be passed around the entire network in consequence.

To do so, after the node has grabbed our tx, we then try to grab that tx back from the node's own mempool, which demonstrates the node has in fact accepted the new tx. The issue with this method is 2 fold.

a) First, the tx will not be available in the node's mempool until the node pushes the inv packet itself to its connected peers. This process can take a while, as Core like to batch their inv_tx together before pushing that stuff out. This is why P2P broadcast is unreliable on testnet/regtest, as there's not enough traffic to prompt quick inv_tx forwarding.

Keep in mind that your node thinks this tx is just one of many floating around the network, that it may or may not need to bounce it to other nodes for propagation. It has no sense of priority nor duty to push that stuff out. Your node just doesn't know this is its own original tx and it needs to propagate it ASAP, and there is no facility to convey that over the P2P.

b) Next, since Armory pushed that tx to your node, it will never see the inv_tx packet in return. From the perspective of your node, it is wasted bandwidth to return the inv of this tx to its point origin. Therefor, Armory has to poll your node's mempool blindly, hoping to find that tx in there. If it fails to, the result will be a "timeout (get)".

2) RPC

The tx is passed to your node's RPC interface. This is guaranteed behavior with ACK/nACK and error verbose.

-------------------------

- Why not always use the RPC?
   There's no guarantee the user has gone through the steps to enable the RPC, nor that it is desirable. Only the node is required to operate Armory, not the RPC. Also, in terms of performance, the RPC is at least an order of magnitude slower.

- Why use the RPC interface at all then?
   If the RPC is available, ArmoryQt will use it as fallback for tx broadcasting in case the P2P method fails.

- RPC broadcast in armoryd
   There's method for this in armoryd atm. You can add it easily by copying the code in jsonrpc_sendasciitransactionraw and replacing the one line with RPC broadcast (https://github.com/goatpig/armoryd/blob/master/armoryd.py#L323):

Code:
         #TheBDM.bdv().broadcastZC(pytx.serialize()) #comment this out
         TheBDM.bdv().broadcastThroughRPC(pytx.serialize()) #use this instead

Thanks a lot for the explanation goatpig! To me it wasn't clear from the documentation/source of sendasciitransaction() or even the raw variant that it was never going to work. I ended up hacking around my stuff by getting the raw hex for the tx and then broadcast via bitcoin-cli. I understand your point about blindly relying on the RPC though.

 The other thing I've noticed is that it desyncs ArmoryDB and seems to prevent armory (even after a fresh build and new .armory folder being created to ever catch up to the regtest blockchain. So basically if you, inadvertdly try it once, you are stuck redownloading/building/scanning.

I didn't care too much about the performances here as I only wanted to see that the tx that I was pushing was good enough.

Thanks for the clarifications once again.
2  Bitcoin / Armory / Re: tx broadcast timed out on: September 11, 2018, 04:58:53 AM
Start bitcoinqt with -disablewallet and use the second GUI tab

I have the same issue with 0.96.4 and core 0.16.1 ... I've opened a separate issue here with all the logs and extra details. I'm using armoryd rather than the UI and run on regtest. Seems like
 when it happens it corrupts the db (remove the databases folder and relaunching armorydb and armoryd --rebuild doesn't do the trick (gets to block 39 out of 289).

https://bitcointalk.org/index.php?topic=5026167.0 for my issue.

Also, tried to avoid the problem by not using sendasciitx on armoryd, but rather get the hex for the tx and then broadcast with bitcoin-qt and / bitcoin-cli. Results is a string saying it's missing inputs ?!?

3  Bitcoin / Armory / Re: Can Armory multisig lockbox have more than one funding address? on: September 11, 2018, 01:09:21 AM
The redeem scripts on chain will reveal these are one and the same however, i.e. when you spent from both variants, the txin will carry data that will link the addresses together.

That's good to know
4  Bitcoin / Armory / armoryd.py sendasciitx times out when trying to broadcast fully signed tx on: September 11, 2018, 12:49:30 AM
Hey guys,

just looking for quick assistance in reviewing what I have here. I'm running the code in regtest and it seems that whenever I try to broadcast a tx signed by all parties of a lockbox but it seems to always time out in one of these two ways:

Code:
(ERROR) armoryd.py:3353 - failed to broadcast tx 7b6b6c70f235e192275f2017e7939ab8a6e8c57f64c4710bed90bb1fbffb5913
(ERROR) armoryd.py:3354 - error message: tx broadcast timed out (get)

or

Code:
(ERROR) armoryd.py:3353 - failed to broadcast tx 73e21413fbb4a7e71ed8b1e3a0368b7ea8723821f3bf1cf52c656282d219bc67
(ERROR) armoryd.py:3354 - error message: tx broadcast timed out (send)

Could someone explain the difference between the "get" and "send" time out. Also any idea why this would continuously time out? It use to work and I suspect a bitcoin.conf or armory config issue, that said I'm not sure. Any help is welcome. Here are more information to help you assist me Smiley

  • I run armory 0.96.4
  • I run bitcoin core 0.16.1
  • bitcoind is launched in command line this way: ~/bitcoin-0.16.1/bin/bitcoind -regtest -daemon
  • ArmoryDB is launched like this: ~/BitcoinArmory/ArmoryDB --regtest --db-type="DB_FULL" --cookie --satoshi-datadir="~/.bitcoin/regtest/blocks" --fcgi-port="19002";
  • Armoryd is launched like this: python ~/BitcoinArmory/armoryd.py --regtest --debug
  • Everything runs on the same box aside from 1 signature of that lockbox being done 'offline' on a separate device. The other 2 signatures for the lb are done on the same machine that's running armoryd & bitcoind

~/.bitcoin/bitcoin.conf
Code:
regtest=1
listen=1
server=1
rpcuser=<redacted>
rpcpassword=<redacted>
rpcclienttimeout=100

~/.armory/regtest/armoryd.conf
Code:
<redacted user>:<redacted password>

ArmorySetting.txt
Code:
Default_FeeByte                      | 200
ManageSatoshi                        | False
AdjustFee                            | True
MainWalletCols                       | ff0500004100820057009401
NotifyBlkFinish                      | False
MainGeometry                         | 01d9d0cb0001000000000057000000590000045200000312000000610000007f0000044800000308000000000000
LastBlkRecvTime                      | 1536545446.98
LastDirectory                        | ~/.armory/regtest
Agreed_to_EULA                       | True
NotifyBtcIn                          | True
First_Load                           | False
Wallet_29xhD7eNA_LedgerShow          | True
AddrBookGeometry                     | 01d9d0cb0001000000000034000000630000033f0000030e0000003e000000890000033500000304000000000000
SyncSuccessCount                     | 2
FeeOption                            | Auto
MainLedgerCols                       | ff0d14000000a7004800720098007200000000000000000000000000
LockboxAddrCols                      | ff0c8f006400640003010000000000000000000064005c010000
DNAA_UnlockTimeout                   | False
WltPropAddrCols                      | ff046400640064000101
AddrBookTxTbl                        | ff04a100000065007801
LockboxGeometry                      | 01d9d0cb00010000000000060000002f0000044f000002e1000000100000005500000445000002d7000000000000
NotifyDiscon                         | True
Wallet_36TAV3Zhp_LedgerShow          | True
NotifyIgnore                         |
DNAA_IntroDialog                     | True
AddrBookRxTbl                        | ff052100be00de004000db00
AddrBookWltTbl                       | ff050000c000800080000f01
DNAA_AllBackupWarn                   | False
Default_FeeByte_BlocksToConfirm      | 2
Default_ReceiveType                  | P2PKH
AdvFeature_UseCt                     | 0
LockboxLedgerCols                    | ff0d14000000a7004800720098007200000000000000000000000000
UnlockTimeout                        | 10
Default_Fee                          | 20000
LastFilterState                      | 0
MinimizeOrClose                      | Close
User_Mode                            | Expert
Load_Count                           | 13
First_Load_Date                      | 1531464992
NotifyBtcOut                         | True
MinimizeOnOpen                       | False
FailedLoadCount                      | 3
Wallet_2bVtn7SnS_LedgerShow          | True
DateFormat                           | 25592d25622d25642025493a254d2570
Default_ChangeType                   | P2PKH
Wallet_6N8Pz4op_LedgerShow           | True
IgnoreAlerts                         |
Wallet_3Bkd5eYWz_LedgerShow          | True
LastBlkRecv                          | 4700
DNAA_DeleteLevelDB                   | False
NotifyReconn                         | True
WltPropGeometry                      | 01d9d0cb00010000fffffff600000013000003470000022600000000000000390000033d0000021c000000000000
DNAA_DefaultApp                      | False
LastVersionLoad                      | v0.96.4

~/.armory/regtest/armorylog.txt
Code:
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:679 - Executing popen: free -m
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:679 - Executing popen: ['cat', '/proc/cpuinfo']
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1271 -
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1272 -
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1273 -
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1274 - ************************************************************
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1275 - Invoked: ~/<redacted>/BitcoinArmory/armoryd.py --regtest sendasciitransaction ~/<redacted path to signed tx>/2af658c061552dfacc328618e910865b_20180910074824.tx
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1276 - ************************************************************
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1277 - Loading Armory Engine:
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1278 -    Armory Version        : 0.96.4
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1279 -    Armory Build:         : None
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1280 -    PyBtcWallet  Version  : 1.35
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1281 - Detected Operating system: Linux
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1282 -    OS Variant            : Ubuntu-18.04-bionic
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1283 -    User home-directory   : ~
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1284 -    Satoshi BTC directory : ~/.bitcoin/regtest
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1285 -    Armory home dir       : ~/.armory/regtest
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1286 - Detected System Specs    :
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1287 -    Total Available RAM   : 7.68 GB
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1288 -    CPU ID string         : Intel(R) Core(TM) i5-7260U CPU @ 2.20GHz
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1289 -    Number of CPU cores   : 4 cores
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1290 -    System is 64-bit      : True
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1291 -    Preferred Encoding    : UTF-8
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1292 -    Machine Arch          : x86_64
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1293 -    Available HDD (ARM)   : 432 GB
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1294 -    Available HDD (BTC)   : 432 GB
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1295 -
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1296 - Network Name: Regtest Network
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1297 - Satoshi Port: 18444
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1298 - Do wlt check: True
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1299 - Named options/arguments to armoryengine.py:
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     force_segwit    : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     nettimeout      : 2
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     rescan          : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     force_fcgi      : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     ignoreAllZC     : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     rescanBalance   : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     disableModules  : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     port            : None
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     interport       : 8224
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     coverageOutputDir: None
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     forceWalletCheck: False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     regtest         : True
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     rebuild         : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     thread_count    : -1
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     datadir         : DEFAULT
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     clearMempool    : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     offline         : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     armoryDBDir     : DEFAULT
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     armorydb_port   : 9001
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     satoshiPort     : DEFAULT
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     disableConfPermis: False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     useTorSettings  : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     netlog          : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     keypool         : 100
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     coverageInclude : None
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     forceOnline     : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     disableWalletCheck: False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     redownload      : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     rpcBindAddr     : 127.0.0.1
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     armorydb_ip     : 127.0.0.1
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     multisigFile    : DEFAULT
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     ram_usage       : -1
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     ignoreZC        : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     logDisable      : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     settingsPath    : ~/.armory/regtest/ArmorySettings.txt
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     language        : en
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     db_type         : DB_FULL
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     doDebug         : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     enableDetSign   : True
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     mtdebug         : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     testnet         : False
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     rpcport         : DEFAULT
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     satoshiHome     : DEFAULT
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     satoshiRpcport  : DEFAULT
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     logFile         : ~/.armory/regtest/armoryd.py.log.txt
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1301 -     verbosity       : None
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1302 - Other arguments:
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1304 -     sendasciitransaction
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1304 -     ~/<redacted path to signed tx>/2af658c061552dfacc328618e910865b_20180910074824.tx
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1305 - ************************************************************
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:1708 - C++ block utilities loaded successfully
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:3566 - Using settings file: ~/.armory/regtest/ArmorySettings.txt
2018-09-10 03:48:34 (ERROR) -- ArmoryUtils.py:3723 - Unsupported language  specified. Defaulting to English (en)
2018-09-10 03:48:34 (INFO) -- ArmoryUtils.py:3726 - Using Language: en
2018-09-10 03:48:34 (INFO) -- BDM.py:361 - Using the asynchronous/multi-threaded BlockDataManager.
2018-09-10 03:48:34 (INFO) -- BDM.py:362 - Blockchain operations will happen in the background.
2018-09-10 03:48:34 (INFO) -- BDM.py:363 - Devs: check TheBDM.getState() before asking for data.
2018-09-10 03:48:34 (INFO) -- BDM.py:364 - Registering addresses during rescans will queue them for
2018-09-10 03:48:34 (INFO) -- BDM.py:365 - inclusion after the current scan is completed.
2018-09-10 03:48:53 (ERROR) -- armoryd.py:3353 - failed to broadcast tx 7b6b6c70f235e192275f2017e7939ab8a6e8c57f64c4710bed90bb1fbffb5913
2018-09-10 03:48:53 (ERROR) -- armoryd.py:3354 - error message: tx broadcast timed out (get)
2018-09-10 03:58:25 (DEBUG) -- PyBtcWallet.py:2868 - Attempting to lock wallet: 6N8Pz4op
2018-09-10 03:58:25 (DEBUG) -- PyBtcWallet.py:2887 - Wallet locked: 6N8Pz4op
2018-09-10 03:58:30 (DEBUG) -- PyBtcWallet.py:2868 - Attempting to lock wallet: 3Bkd5eYWz
2018-09-10 03:58:30 (DEBUG) -- PyBtcWallet.py:2887 - Wallet locked: 3Bkd5eYWz

~/.armory/regtest/dbLog.txt
Code:
Log file opened at 03:26:40: ~/.armory/regtest/dbLog.txt
-INFO  - 03:26:40: (main.cpp:32) Running on 4 threads
-INFO  - 03:26:40: (main.cpp:33) Ram usage level: 50
-INFO  - 03:26:40: (BlockUtils.cpp:915) blkfile dir: ~/.bitcoin/regtest/blocks
-INFO  - 03:26:40: (BlockUtils.cpp:916) lmdb dir: ~/.armory/regtest/databases
-INFO  - 03:26:40: (lmdb_wrapper.cpp:388) Opening databases...
-INFO  - 03:26:40: (BDM_Server.h:263) Listening on port 19002
-INFO  - 03:26:40: (BlockUtils.cpp:1108) Executing: doInitialSyncOnLoad
-INFO  - 03:26:40: (DatabaseBuilder.cpp:199) Reading headers from db
-INFO  - 03:26:40: (DatabaseBuilder.cpp:238) Found 4701 headers in db
-INFO  - 03:26:40: (DatabaseBuilder.cpp:64) Rewinding 100 blocks
-INFO  - 03:26:40: (DatabaseBuilder.cpp:71) updating HEADERS db
-INFO  - 03:26:40: (DatabaseBuilder.cpp:493) Found next block after skipping 1018bytes
-INFO  - 03:26:40: (DatabaseBuilder.cpp:281) parsed block file #0
-INFO  - 03:26:40: (Blockchain.cpp:248) Organizing chain
-INFO  - 03:26:40: (Blockchain.cpp:370) Organized chain in 0s
-INFO  - 03:26:40: (DatabaseBuilder.cpp:76) updated HEADERS db in 0s
-INFO  - 03:26:40: (lmdb_wrapper.cpp:388) Opening databases...
-INFO  - 03:26:40: (DatabaseBuilder.cpp:1231) verifying txfilters integrity
-INFO  - 03:26:40: (DatabaseBuilder.cpp:1314) done checking txfilters
-INFO  - 03:26:40: (DatabaseBuilder.cpp:134) scanning new blocks from #4701 to #4700
-INFO  - 03:26:40: (BlockchainScanner.cpp:52) no history to scan
-INFO  - 03:26:40: (BlockchainScanner.cpp:1021) no SSH to scan
-INFO  - 03:26:40: (lmdb_wrapper.cpp:388) Opening databases...
-INFO  - 03:26:40: (DatabaseBuilder.cpp:186) scanned new blocks in 0s
-INFO  - 03:26:40: (DatabaseBuilder.cpp:190) init db in 0s
-INFO  - 03:26:40: (BDM_supportClasses.cpp:1891) Enabling zero-conf tracking
-INFO  - 03:26:40: (BitcoinP2P.cpp:947) Connected to Bitcoin node
-INFO  - 03:26:52: (BDM_Server.cpp:1121) registered bdv: bf970b14151c0d5704d6
-INFO  - 03:29:24: (BDM_supportClasses.cpp:2098) sent inv packet
-INFO  - 03:29:24: (BDM_supportClasses.cpp:2117) got getData packet
-INFO  - 03:29:24: (BDM_supportClasses.cpp:2147) grabbing tx from node
[color=red]-ERROR - 03:29:34: (BDM_supportClasses.cpp:2159) tx broadcast timed out (get)[/color]
-INFO  - 03:37:52: (BDM_supportClasses.cpp:2098) sent inv packet
[color=red]-ERROR - 03:38:02: (BDM_supportClasses.cpp:2112) tx broadcast timed out (send)[/color]
-INFO  - 03:48:34: (BDM_supportClasses.cpp:2098) sent inv packet
-INFO  - 03:48:43: (BDM_supportClasses.cpp:2117) got getData packet
-INFO  - 03:48:43: (BDM_supportClasses.cpp:2147) grabbing tx from node
[color=red]-ERROR - 03:48:53: (BDM_supportClasses.cpp:2159) tx broadcast timed out (get)[/color]

Start bitcoinqt with -disablewallet and use the second GUI tab

I found this answer in an old post ..., but I have the same issue with 0.96.4 and core 0.16.1 ... I'm using armoryd rather than the UI and run on regtest. Seems like
 when it happens it corrupts the db (remove the databases folder and relaunching armorydb and armoryd --rebuild doesn't do the trick (gets to block 39 out of 289).

https://bitcointalk.org/index.php?topic=5026167.0 for my issue.

Also, tried to avoid the problem by not using sendasciitx on armoryd, but rather get the hex for the tx and then broadcast with bitcoin-qt and / bitcoin-cli. Results is a string saying it's missing inputs ?!?

Any help would be greatly appreciated!
5  Bitcoin / Armory / Re: armoryd.py missing import? NameError; global name 'ServiceProxy' is undefined on: July 03, 2018, 03:23:56 PM
I confirm that copying the old bitcoinrpc_jsonrpc from etotheipi's repo does the trick!

Maybe we should add it to the current version and add to the README that it has to be copied over in the BitcoinArmory root (if user decides to copy over the armoryd.py + txjsonrpc/.) or to root of armoryd as you mentioned  and then make a minor release?

6  Bitcoin / Armory / Re: armoryd.py missing import? NameError; global name 'ServiceProxy' is undefined on: July 03, 2018, 02:00:45 PM
Hi. Just FYI, I'll be gone for a few days, and my laptop will be in the shop anyway.

Now then, you've come across something interesting. ServiceProxy is actually from here. (It's still in etotheipi's original repo here.) For some reason, the reference to Jeff's code was removed four years ago. I still got armoryd to work somehow. Now, when I run it on a fresh VM, it chokes.

Here's what I propose. Copy the bitcoinrpc_jsonrpc folder from etotheipi's repo into the root armoryd direction. Then, in armoryd.py, add "from bitcoinrpc_jsonrpc import ServiceProxy" below the "import sys" line. It works for me. If it works for you, I'll open a PR. I noticed a couple of minor bugs that need to be fixed anyway.
.

Great!!! Thanks for the help there droark, I'll confirm that it works with the bitcoinrpc_jsonrpc folder and close the topic if it does!

The BitcoinThat was my original impression at the very beginning, but at the same time wasn't sure as it could have definitely only been for some old bitcoind rpc calls done in armoryd back then.

I think to answer your question, you might of installed the proper old jsonrpc libs back in the days in your python scripts paths and looks for it there? Otherwise I'm not too sure.

I'd be more than happy to contribute to the project if I find anything else that seems odd/weird. Also maybe extend the features ... I'll do a pull request if so.

Thanks,
7  Bitcoin / Armory / Re: armoryd.py missing import? NameError; global name 'ServiceProxy' is undefined on: July 03, 2018, 01:47:06 AM
@goatpig @droark

was this of any help ? I get that the ./armoryd/txjsonrpc/ is good to go once copied, however does it assume there's a specific json rpc version pre-installed on the system?

Also, if either one of you could point to the class implementing ServiceProxy (in which file/lib even), I could probably take it from there. I was hoping to get this up by Wednesday to show a friend, but I'm running out of time/luck on this.

Let me know, I'm eager to fix this and open to any other mean of communication that would be more direct and/or interactive if you are OK with this.

Thanks!
8  Bitcoin / Armory / Re: armoryd.py missing import? NameError; global name 'ServiceProxy' is undefined on: July 02, 2018, 03:33:05 AM
here's what I've tried tonight:

Code:
~/BitcoinArmory$ python2 armoryd.py --regtest getarmorydinfo
Traceback (most recent call last):
  File "update_version.py", line 14, in <module>
    f = open(hash_loc, "r")
IOError: [Errno 2] No such file or directory: '.git/91a3137ef1056e15cc606a186b0e508f84c'
/~
(ERROR) ArmoryUtils.py:3723 - Unsupported language  specified. Defaulting to English (en)
(WARNING) armoryd.py:3489 - http://<randomusername>:<randompassword>@127.0.0.1:18225 [i][b]#Yes I've added a printout here to try confirm the .conf worked as expected. Not sure where these credentials are actually used by the server instance of armoryd[/b][/i]
(ERROR) Traceback (most recent call last):
  File "armoryd.py", line 3630, in <module>
    rpc_server = Armory_Daemon()
  File "armoryd.py", line 3125, in __init__
    self.executeCommand()
  File "armoryd.py", line 3490, in executeCommand
    proxyobj = ServiceProxy("http://%s:%s@127.0.0.1:%d" % \
NameError: global name 'ServiceProxy' is not defined

Traceback (most recent call last):
  File "armoryd.py", line 3630, in <module>
    rpc_server = Armory_Daemon()
  File "armoryd.py", line 3125, in __init__
    self.executeCommand()
  File "armoryd.py", line 3490, in executeCommand
    proxyobj = ServiceProxy("http://%s:%s@127.0.0.1:%d" % \
NameError: global name 'ServiceProxy' is not defined


#### Here's a sanitized version of the armorylog.txt that was generated for that attempt specifically (path changed to ~ and username:password replaced by <randomusername>:<randompassword>

Code:
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1154 - C++ block utilities loaded successfully
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:679 - Executing popen: free -m
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:679 - Executing popen: ['cat', '/proc/cpuinfo']
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1271 -
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1272 -
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1273 -
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1274 - ************************************************************
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1275 - Invoked: armoryd.py --regtest getarmorydinfo
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1276 - ************************************************************
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1277 - Loading Armory Engine:
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1278 -    Armory Version        : 0.96.4
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1279 -    Armory Build:         : None
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1280 -    PyBtcWallet  Version  : 1.35
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1281 - Detected Operating system: Linux
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1282 -    OS Variant            : Ubuntu-18.04-bionic
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1283 -    User home-directory   : ~
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1284 -    Satoshi BTC directory : ~/.bitcoin/regtest
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1285 -    Armory home dir       : ~/.armory/regtest
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1286 - Detected System Specs    :
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1287 -    Total Available RAM   : 7.68 GB
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1288 -    CPU ID string         : Intel(R) Core(TM) i5-7260U CPU @ 2.20GHz
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1289 -    Number of CPU cores   : 4 cores
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1290 -    System is 64-bit      : True
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1291 -    Preferred Encoding    : UTF-8
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1292 -    Machine Arch          : x86_64
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1293 -    Available HDD (ARM)   : 433 GB
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1294 -    Available HDD (BTC)   : 433 GB
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1295 -
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1296 - Network Name: Regtest Network
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1297 - Satoshi Port: 18444
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1298 - Do wlt check: True
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1299 - Named options/arguments to armoryengine.py:
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     force_segwit    : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     nettimeout      : 2
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     rescan          : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     force_fcgi      : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     ignoreAllZC     : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     rescanBalance   : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     disableModules  : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     port            : None
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     interport       : 8224
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     coverageOutputDir: None
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     forceWalletCheck: False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     regtest         : True
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     rebuild         : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     thread_count    : -1
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     datadir         : DEFAULT
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     clearMempool    : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     offline         : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     armoryDBDir     : DEFAULT
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     armorydb_port   : 9001
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     satoshiPort     : DEFAULT
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     disableConfPermis: False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     useTorSettings  : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     netlog          : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     keypool         : 100
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     coverageInclude : None
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     forceOnline     : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     disableWalletCheck: False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     redownload      : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     rpcBindAddr     : 127.0.0.1
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     armorydb_ip     : 127.0.0.1
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     multisigFile    : DEFAULT
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     ram_usage       : -1
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     ignoreZC        : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     logDisable      : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     settingsPath    : ~/.armory/regtest/ArmorySettings.txt
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     language        : en
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     db_type         : DB_FULL
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     doDebug         : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     enableDetSign   : True
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     mtdebug         : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     testnet         : False
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     rpcport         : DEFAULT
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     satoshiHome     : DEFAULT
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     satoshiRpcport  : DEFAULT
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     logFile         : ~/.armory/regtest/armoryd.py.log.txt
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1301 -     verbosity       : None
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1302 - Other arguments:
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1304 -     getarmorydinfo
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1305 - ************************************************************
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:1708 - C++ block utilities loaded successfully
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:3566 - Using settings file: ~/.armory/regtest/ArmorySettings.txt
2018-07-01 23:16:12 (ERROR) -- ArmoryUtils.py:3723 - Unsupported language  specified. Defaulting to English (en)
2018-07-01 23:16:12 (INFO) -- ArmoryUtils.py:3726 - Using Language: en
2018-07-01 23:16:12 (INFO) -- BDM.py:361 - Using the asynchronous/multi-threaded BlockDataManager.
2018-07-01 23:16:12 (INFO) -- BDM.py:362 - Blockchain operations will happen in the background.  
2018-07-01 23:16:12 (INFO) -- BDM.py:363 - Devs: check TheBDM.getState() before asking for data.
2018-07-01 23:16:12 (INFO) -- BDM.py:364 - Registering addresses during rescans will queue them for
2018-07-01 23:16:12 (INFO) -- BDM.py:365 - inclusion after the current scan is completed.
2018-07-01 23:16:12 (WARNING) -- armoryd.py:3489 - http://<randomusername>:<randompassword>@127.0.0.1:18225
2018-07-01 23:16:12 (ERROR) -- Traceback (most recent call last):
  File "armoryd.py", line 3630, in <module>
    rpc_server = Armory_Daemon()
  File "armoryd.py", line 3125, in __init__
    self.executeCommand()
  File "armoryd.py", line 3490, in executeCommand
    proxyobj = ServiceProxy("http://%s:%s@127.0.0.1:%d" % \
NameError: global name 'ServiceProxy' is not defined



What am I missing?
9  Bitcoin / Armory / Re: armoryd.py missing import? NameError; global name 'ServiceProxy' is undefined on: June 25, 2018, 11:51:13 PM
Try running python2. Somewhere along the way, I think Ubuntu switched the default such that python invokes python3. I know that's the case on Macs using brew and am pretty certain Linux distros are going in that direction if they haven't already.

I'm running python 2.7 for sure. This is my dev environment and all of my projects are in 2.7 still (sadly ? :/)

1) Where are you getting armoryd from?

2) Post armorylog.txt

3) What version of Python are you running?

1) I cloned it from the repo: https://github.com/goatpig/armoryd.git As mentioned the first instance that is used as the server works like a charm and can interact with bitcoind no problem.
2) Will do. Currently out of the country and don't have ssh into the box
3) Running python 2.7
10  Bitcoin / Armory / Re: armoryd.py missing import? NameError; global name 'ServiceProxy' is undefined on: June 24, 2018, 02:00:48 AM
No luck ... Though it could have been related to qt4reactor given goatpig mentioned twisted, but didn't change anything.

ServiceProxy() doesn't seem to be part of Twisted either ... My guess is it would be within the JSON RPC library itself, but from my understanding I only need to copy the txjsonrpc into the <path to parent of BitcoinArmory git clone>/BitcoinArmory directory. That doesn't seem to do the trick. Looking up online for ServiceProxy(url) pretty much always yields results related to a jsonrpc, but still can't find it within the txjsonrpc folder included in the source of armoryd. Do I need to do anything else regarding json rpc libs (other than copy the directory to the other location)?
11  Bitcoin / Armory / Re: armoryd.py missing import? NameError; global name 'ServiceProxy' is undefined on: June 24, 2018, 01:12:45 AM
so apt-get is still stuck on the older version of  twisted, however even with the current installed through pip, rebuilding and trying again I'm still getting the same error on the 2nd instance (1st instance aka server works like a charm) trying to run python armoryd.py --regtest <any command>
12  Bitcoin / Armory / Re: armoryd.py missing import? NameError; global name 'ServiceProxy' is undefined on: June 24, 2018, 01:00:58 AM
Thanks for the quick replies @goatpig & @droark. It's appreciated.

Also, please make sure you're running the latest version. It's here. There's a README here that hasn't been pulled in yet but it should cover many, if not all, of the questions you might have.

I do have this version and went through the specified README; I had done the exercise going the pull requests on top to try to get more info in case a new version was pushed in some non-master branch, but the only one available for armoryd was indeed master. I must say this new README provides extra details and was welcome, but didn't solve that specific issue. I've got the username:password added in a armoryd.conf that lives in <path to parent of armory home>/.armory/regtest/ ... I've even modified the code to print out that it grabs the proper username, password, RPC_PORT prior to executing:
 
Code:
ServiceProxy("http://%s:%s@127.0.0.1:%d" user, pw, RPC_PORT)

Do you have python twisted installed?


I do! Everything else seems fine with it. Currently on 17.9.0-2 ... I assume this ServiceProxy calls resides within python-twisted if you're asking [and not the bitcoin rpc libs]? I see they've released two versions since this one ... I'll try moving to the latest (18.4.0) as of April 2018, rebuild and try again. I will come back to report on the results.
13  Bitcoin / Armory / [SOLVED] armoryd.py missing import NameError; global name 'ServiceProxy' on: June 23, 2018, 06:28:52 PM
I'm trying to run armoryd.py locally as a server (1st instance, no issue, runnnig as --regtest, ArmoryDB & bitcoind are also up and working) and then in a separate terminal trying basic calls in the following way:

$ python armoryd.py --regtest getarmorydinfo
So far, it's pretty straight forward, however I always end up with an error when armoryd is calling executeCommand() at line 3489;
Code:
Name Error: global name 'ServiceProxy' is undefined.

I see from version 0.93.3 that there use to be the following import in various files (SDM, armoryd, etc.):
Code:
from bitcoinrpc_jsonrpc import ServiceProxy
Is this still relevant? Is it missing from the txjsonrpc libraries somehow ? Now I tried to look in the different imports from txjsonrpc and couldn't find it in there. Any idea which import hasn't work properly? Any other idea of why this wouldn't work? I did indeed copy armoryd.py and the txjsonrpc/ to the BitcoinArmory directory. I also create an armoryd.conf with a random username:password in the default armory home dir ~/.armory ... this shouldn't be the issue in my opinion as we're alreayd facing the issue as we call ProxyService()

Thanks in advance to anyone who can assist on this 1, should be pretty straightforward
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!