Bitcoin Forum
May 07, 2024, 06:57:33 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 [5]  All
  Print  
Author Topic: [ANN] BitcoinArmory-Daemon - armory on web servers  (Read 20536 times)
doug_armory
Sr. Member
****
Offline Offline

Activity: 255
Merit: 250

Senior Developer - Armory


View Profile WWW
June 05, 2014, 02:27:04 PM
 #81

How can I install txjsonrpc on the BitcoinArmory directory?

Hi. As part of my ongoing cleanup of armoryd, I grabbed a copy of txjsonrpc and am now distributing it along with Armory. If anybody can't wait for the next version of Armory and wants to do what I did, https://github.com/etotheipi/BitcoinArmory/commit/5a75164e90e9898cddf66d13199744e8d94b873b has the details.

Speaking of armoryd, I've added quite a bit of functionality over the past couple of weeks. armoryd is still rough around the edges but is quickly becoming a pretty useful tool. Feel free to check it out, with the caveat that there's still plenty to do and that any version you download now definitely won't be the version that goes into Armory 0.92. (In fact, I'll be checking in some more lockbox functionality in the next hour or two.)

Senior Developer -  Armory Technologies, Inc.
1715108253
Hero Member
*
Offline Offline

Posts: 1715108253

View Profile Personal Message (Offline)

Ignore
1715108253
Reply with quote  #2

1715108253
Report to moderator
1715108253
Hero Member
*
Offline Offline

Posts: 1715108253

View Profile Personal Message (Offline)

Ignore
1715108253
Reply with quote  #2

1715108253
Report to moderator
1715108253
Hero Member
*
Offline Offline

Posts: 1715108253

View Profile Personal Message (Offline)

Ignore
1715108253
Reply with quote  #2

1715108253
Report to moderator
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715108253
Hero Member
*
Offline Offline

Posts: 1715108253

View Profile Personal Message (Offline)

Ignore
1715108253
Reply with quote  #2

1715108253
Report to moderator
1715108253
Hero Member
*
Offline Offline

Posts: 1715108253

View Profile Personal Message (Offline)

Ignore
1715108253
Reply with quote  #2

1715108253
Report to moderator
TakashiMakat
Member
**
Offline Offline

Activity: 93
Merit: 10


View Profile
June 05, 2014, 03:01:34 PM
 #82

I cloned the repo to BitcoinArmory directory. But I still get

Code:
root@cloud-server-07:/BitcoinArmory# python armoryd.py
Traceback (most recent call last):
  File "armoryd.py", line 55, in <module>
    from txjsonrpc.auth import wrapResource
ImportError: No module named txjsonrpc.auth

I'm guessing I need to install it but I could not figure out how to do that.
 
doug_armory
Sr. Member
****
Offline Offline

Activity: 255
Merit: 250

Senior Developer - Armory


View Profile WWW
June 05, 2014, 03:04:56 PM
Last edit: June 05, 2014, 04:22:11 PM by doug_armory
 #83

I cloned the repo to BitcoinArmory directory. But I still get

Code:
root@cloud-server-07:/BitcoinArmory# python armoryd.py
Traceback (most recent call last):
  File "armoryd.py", line 55, in <module>
    from txjsonrpc.auth import wrapResource
ImportError: No module named txjsonrpc.auth

I'm guessing I need to install it but I could not figure out how to do that.
 

You're probably cloning the master branch, which doesn't have any of the new armoryd code. You need to clone the devel branch to get all the new armoryd code. Just be aware that it is a work-in-progress. Various things may be incomplete or completely broken.

Senior Developer -  Armory Technologies, Inc.
TakashiMakat
Member
**
Offline Offline

Activity: 93
Merit: 10


View Profile
June 06, 2014, 01:54:45 PM
 #84

I cloned the repo to BitcoinArmory directory. But I still get

Code:
root@cloud-server-07:/BitcoinArmory# python armoryd.py
Traceback (most recent call last):
  File "armoryd.py", line 55, in <module>
    from txjsonrpc.auth import wrapResource
ImportError: No module named txjsonrpc.auth

I'm guessing I need to install it but I could not figure out how to do that.
 

You're probably cloning the master branch, which doesn't have any of the new armoryd code. You need to clone the devel branch to get all the new armoryd code. Just be aware that it is a work-in-progress. Various things may be incomplete or completely broken.

All I need is to be able to get the balance. So I think the version on the master branch will be fine?

The only problem I have right now is to get armoryd.py to find txjsonrpc.auth module.

Traceback (most recent call last):
  File "armoryd.py", line 55, in <module>
    from txjsonrpc.auth import wrapResource
ImportError: No module named txjsonrpc.auth


I'm probably going to run into some other issues after I solve it but still...
TakashiMakat
Member
**
Offline Offline

Activity: 93
Merit: 10


View Profile
June 06, 2014, 01:59:19 PM
 #85

Ok I fixed the txjsonrpc problem.

1) sudo apt-get install python-setuptools
2) sudo easy_install txJSON-RPC

The second command must be run IN the armory directory. Now the error I get is:

root@cloud-server-07:/BitcoinArmory# python armoryd.py
(ERROR) Traceback (most recent call last):
  File "armoryd.py", line 1158, in <module>
    rpc_server = Armory_Daemon()
  File "armoryd.py", line 852, in __init__
    self.lastChecked
AttributeError: 'Armory_Daemon' object has no attribute 'lastChecked'

Traceback (most recent call last):
  File "armoryd.py", line 1158, in <module>
    rpc_server = Armory_Daemon()
  File "armoryd.py", line 852, in __init__
    self.lastChecked
AttributeError: 'Armory_Daemon' object has no attribute 'lastChecked'


Which seems to be more Armory specific.
doug_armory
Sr. Member
****
Offline Offline

Activity: 255
Merit: 250

Senior Developer - Armory


View Profile WWW
June 06, 2014, 03:33:54 PM
 #86

Ok I fixed the txjsonrpc problem.

As stated before, that library will be included with the next version of Armory.

Quote
The second command must be run IN the armory directory. Now the error I get is:

root@cloud-server-07:/BitcoinArmory# python armoryd.py
(ERROR) Traceback (most recent call last):
  File "armoryd.py", line 1158, in <module>
    rpc_server = Armory_Daemon()
  File "armoryd.py", line 852, in __init__
    self.lastChecked
AttributeError: 'Armory_Daemon' object has no attribute 'lastChecked'

Traceback (most recent call last):
  File "armoryd.py", line 1158, in <module>
    rpc_server = Armory_Daemon()
  File "armoryd.py", line 852, in __init__
    self.lastChecked
AttributeError: 'Armory_Daemon' object has no attribute 'lastChecked'


Which seems to be more Armory specific.

It is. To be honest, armoryd basically won't work out of the box if you download the latest version. I had to fix at least two or three bugs before armoryd even ran at all, and I think other team members fixed a bug or two. I don't know what happened. It just fell out of sync with the rest of Armory, I guess.

That being said, the latest version works great. There are a few rough edges and a couple of bugs that need to fixed before it gets released, but trust me, it'll be a much smoother experience. Smiley

Senior Developer -  Armory Technologies, Inc.
mtdox
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
September 22, 2014, 02:34:01 PM
 #87

Hi everyone!

I made a thread over here (click me) about getreceivedbyaddress.

In short, does getreceivedbyaddress only include confirmed transactions or also unconfirmed ones?

Looking through the source gives me the impression that it counts both confirmed and unconfirmed transactions:
Code:
   def jsonrpc_getreceivedbyaddress(self, address):
      """
      DESCRIPTION:
      Get the number of coins received by a Base58 address associated with
      the currently loaded wallet.
      PARAMETERS:
      address - The Base58 address associated with the current wallet.
      RETURN:
      The balance received from the incoming address (BTC).
      """

      if CLI_OPTIONS.offline:
         raise ValueError('Cannot get received amount when offline')
      # Only gets correct amount for addresses in the wallet, otherwise 0
      addr160 = addrStr_to_hash160(address, False)[1]

      txs = self.curWlt.getAddrTxLedger(addr160)
      balance = sum([x.getValue() for x in txs if x.getValue() > 0])
      return AmountToJSON(balance)

Also looking through Transaction.py and PyBtcWallet.py did not give me any clues on how one would add an extra check to the lambda ( something like x.getConfirmations() > minconfs ) to only include confirmed transactions.

Any advice / inputs?
CircusPeanut
Full Member
***
Offline Offline

Activity: 123
Merit: 100


View Profile
September 22, 2014, 02:48:15 PM
 #88

Thanks to Doug we actually have a new version of that method with an optional minconf argument  on the "dev" branch:

Code:
   #############################################################################
   @catchErrsForJSON
   def jsonrpc_getreceivedbyaddress(self, address, minconf=0):
      """
      DESCRIPTION:
      Get the number of coins received by a Base58 address associated with
      the currently loaded wallet.
      PARAMETERS:
      address - The Base58 address associated with the current wallet.
      minconf - (Default=0) The minimum number of confirmations required for a
                TX to be included in the final balance.
      RETURN:
      The balance received from the incoming address (BTC).
      """

      if CLI_OPTIONS.offline:
         raise ValueError('Cannot get received amount when offline')
      # Only gets correct amount for addresses in the wallet, otherwise 0
      addr160 = addrStr_to_hash160(address, False)[1]

      # Iterate through the address in our wallet. Include coins only if values
      # are positive and the number of confirmations is high enough.
      txs = self.curWlt.getAddrTxLedger(addr160)
      balance = 0
      for curTX in txs:
         nconf = (TheBDM.getTopBlockHeader().getBlockHeight() - \
                  curTX.getBlockNum()) + 1
         if (nconf >= minconf) and (curTX.getValue() > 0):
            balance += curTX.getValue()

      return AmountToJSON(balance)
mtdox
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
September 22, 2014, 03:11:24 PM
 #89

Awesome, thanks to everyone involved!
Pages: « 1 2 3 4 [5]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!