Bitcoin Forum
May 25, 2024, 06:09:00 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 [27] 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 ... 233 »
521  Bitcoin / Armory / Re: Using Armory on the BCH chain on: November 22, 2018, 02:17:24 PM
Hah, you learn something new everyday.

In c++, variables can be changed by passing them to functions, thanks to the reference notation.

This is something you need to pay attention to when reading the method declaration. const& is used to avoid copies when passing arguments, and means the arg is an "in". Plain & implies the method is supposed to modify this reference, in which case it's considered an "out" argument.

This is common practice when you want to use the return value of the method as a status report. Typically your return an int, with 0 for success and negative values for error codes. You can also use this approach if the method has to provide several results, but that style is mostly for C. In C++ you tend to report errors by throwing, and write a class/struct for return types that require several members.

As seen in the code you linked to, the style is actually confusing: the semantics do not outright suggest ReadLastBlockFile takes a reference, as it is not being checked for a status return. This kind of semantics suggest you are setting some internal value for object pblocktree instead. The following snippet would be a little easier to read:

Code:
int result = pblocktree->ReadLastBlockFile(nLastBlockFile)
if(result != 0)
{
   //error handling
}

//do something with nLastBlockFile


With that in mind, the change in BU could very well be a mistake that led to a benign change in behavior, assuming the author of the change did not bother to acquire a broad understanding of this code before modifying it. He possibly saw a global variable changed by a local object and figured that's bad style, correcting for style without caring for the substance.
522  Bitcoin / Armory / Re: Logs Posted. Can't get Armory to use Blockchain on External Hard Drive...Either! on: November 21, 2018, 11:35:54 PM
Not sure where that 71t5T98T wallet came from or why I recognize it and why it has the same root key.

With 1.35, the chaincode is not related to the root key. This is why it is added to the backup string. With 1.35c, the chaincode is a HMAC of the root key, therefor only the root key is necessary. The Wallet ID is derived from the first key pair, which is computed from the root key and the chaincode. Different chaincode, different ID, different address chain.

Quote
So "Total leaving wallet" is unsettling to say the least, but I suspect this is just a change address and it's really the total leaving the address where this bitcoin is.  Correct?  That 3Btalvivm... address is unsettling too, because I can't see all of it!   It's also concerning because I have more than x btc in the wallet, but I guess they are associated with other addresses?

In Bitcoin, you spend whole coins, which is why there is a change mechanism to begin with. This dialog is telling how much in coins are being used in this transaction. From your perspective, it doesn't mean you're spending that much (since you're receiving coins back in the change output), what it means is that this much value is tied up in this transaction.

Think about it terms of cash. If you're buying a $1 candy bar with a $10 bill, $10 is leaving your wallet. Your $10 is tied up in the transaction to buy the candy bar. Once the transaction is over, you're getting $9 back in change.

Quote
If I don't hear back today, have a Happy Thanksgiving!

Time to find a turkey sammish hmm
523  Bitcoin / Armory / Re: Armory 0.96.5 RC1 on: November 21, 2018, 11:29:13 PM
works on mainnet, but ArmoryDB doesn't connect to testnet bitcoin nodes. Maybe something to do with the satoshi-port option?

Botched the defaults for testnet/regtest, you'd have to force the proper port with the new cli arg.
524  Bitcoin / Armory / Re: Logs Posted. Can't get Armory to use Blockchain on External Hard Drive...Either! on: November 21, 2018, 01:22:42 PM
71t5T98T cannot sign for 2cP2BUXi7. Restore 2cP2BUXi7 on your laptop.
525  Bitcoin / Armory / Re: Logs Posted. Can't get Armory to use Blockchain on External Hard Drive...Either! on: November 21, 2018, 11:41:55 AM
Do not delete anything. Does 71t5T98T show balance? What are you trying to do by restoring 2cP2BUXi7? Get something else than a watching only wallet?
526  Bitcoin / Armory / Re: Using Armory on the BCH chain on: November 20, 2018, 10:44:25 PM
Blocks over P2P would actually fix this, because it would get the longest chain from your node, then grab block data by hash from that chain of headers, all over the P2P socket, completely ignoring the on disk file structure. I initially wanted this change for security reasons: Core needs to be exposed to the WAN but Armory does not need the WAN unless you want to connect to the DB remotely, and even then you could tunnel to it or put it behind a daemon. Limiting ArmoryDB's interactions with Core to just a couple sockets (P2P and RPC) would make way for more secure setups. Dodging this edge case is an added bonus now.
527  Bitcoin / Armory / Re: Logs Posted. Can't get Armory to use Blockchain on External Hard Drive...Either! on: November 20, 2018, 10:38:26 PM
Sounds like you mixed and matched the restore types. From the looks of it, you mistakenly restored your wallet as a 1.35c on your laptop. This is probably what is confusing you atm.

The most important question at the moment is which wallet shows your coins?
528  Bitcoin / Armory / Re: Logs Posted. Can't get Armory to use Blockchain on External Hard Drive...Either! on: November 20, 2018, 06:33:57 PM
Are you using SecurePrint?
529  Bitcoin / Armory / Re: Using Armory on the BCH chain on: November 20, 2018, 06:30:42 PM
Quote
A solution would be to keep a record of "last-checked time" and then re-scan any old blk files that have a modified time greater or equal to the last-checked time.  This check could be run any time a new block notification is received.

Quote
Once it writes to a blk file, it never checks files lower than that anymore.  That is a RAM variable though, so it gets set back to zero each time a node is restarted.

Why would it need to check for previous files appends on new blocks? If the issue only happens on fresh node start (when free space in older block files is eligible), as long as Armory sees that one new block, it will work.

Armory does not expect blocks to appear in order in files. It will check block data on disk from the last known block to have extended the chain. Therefor if you have up to blk01000.dat and the last top is in blk00997.dat, it will check #977 to #1000 on every new block notifications until it finds a block that extends the chain again.

Quote
Would re-scanning already scanned blk files cause problems for Armory?

DB is designed to whistand being written over. Rescanning is fine. As a matter of fact, on each start Armory rewinds back 100 blocks from the last known top to account for long reorgs occuring while it wasn't running. You can see it here: https://github.com/goatpig/BitcoinArmory/blob/master/cppForSwig/DatabaseBuilder.cpp#L55

Code:
      //rewind the top block offset to catch on missed blocks for db init
      auto topBlock = blockchain_->top();
      auto rewindHeight = topBlock->getBlockHeight();
      if (rewindHeight > 100)
         rewindHeight -= 100;
      else
         rewindHeight = 1;

      auto rewindBlock = blockchain_->getHeaderByHeight(rewindHeight);
      topBlockOffset_.fileID_ = rewindBlock->getBlockFileNum();
      topBlockOffset_.offset_ = rewindBlock->getOffset();

      LOGINFO << "Rewinding 100 blocks";

You can increase this value to try and confirm your theory. On Bitcoin a blk file is ~100 blocks, on BCH idk, try much larger stuff.

The ultimate solution would be blocks over P2P, but idk what kind of mess BCH will be by the time I'm done with that. Chances are Armory won't be compatible anymore at that point.
530  Bitcoin / Armory / Re: Logs Posted. Can't get Armory to use Blockchain on External Hard Drive...Either! on: November 20, 2018, 12:15:15 PM
You have to use the restore version that is indicated on your wallet. If it says 1.35, that's the only restore version you can use.
531  Bitcoin / Armory / Re: Node is offline, cannot broadcast on: November 19, 2018, 11:37:15 PM
Start BitcoinQt manually.
532  Bitcoin / Armory / Armory 0.96.5 RC1 on: November 19, 2018, 02:42:52 PM
This is a minor release with a lot of bug fixes and a couple new features:
    - Spend to bech32 addresses
    - Set DB dir in GUI (File > Settings menu)

Note
   Recent updates to the MSVC compiler broke CryptoPP's AES-CBC optimized decryption. This affects restoring SecurePrint backups on Windows with 0.96.4 only. All backups made with 0.96.4 are valid. Optimizations for CryptoPP have been disabled on Windows. I'm looking to replace it with libbtc sooner rather than later as a result.

Changelog

Code:
v0.96.5
== Added ==
   - You can now set the database path from the Settings menu.
   - You can now spend to bech32 addresses.
   - Added support for satoshi-port CLI argument in ArmoryDB.

== Fixes ==
   - Improved bitcoind path detection.
   - Properly carry thread-count and ram-usage command line arguments from client to automated db process.
   - Custom paths set in the GUI will now properly overrule custom paths from armoryqt.conf.
   - Fixed spending from lockboxes.
   - Fixed deleting lockboxes.
   - Fixed Simulfund promisory note creation and signing.
   - Fixed preview dialog for unconfirmed transactions.
   - Fixed previewing unsigned transactions in offline mode.
   - Fixed SecurePrint decryption on Windows.

   - Recent updates to the MSVC compiler resulted in invalid decryption of AES-CBC packets. This issue only
     affects the decryption of SecurePrint encrypted backups. Encryption still operates as expected, no
     SecurePrint backups created with the incriminated builds are faulty. Wallets are not concerned, as they
     use AES-CFB.
    
     The solution was to turn off all optimizations in MSVC when buidling CryptoPP. This may impact DB boostrapping
     performance.

     This issue affects all Windows builds of 0.96.4.

Binaries:

https://github.com/goatpig/BitcoinArmory/releases/tag/v0.96.4.99

Test away!
533  Bitcoin / Armory / Re: Errors on creating transactions on: November 15, 2018, 08:47:42 PM
First, you should try the current state of the testing branch. If that fails, I can at least fix the errors at tx creation with the WO wallet or the public keys for the relevant outputs. Otherwise try to these tx without using the MAX feature.
534  Bitcoin / Armory / Re: (Minor) Bug report: cannot delete lockbox from GUI on: November 15, 2018, 04:05:13 PM
Fixed in testing, will be in the RC for 0.96.5
535  Bitcoin / Armory / Re: Bug report: Simulfund not working on: November 15, 2018, 04:05:07 PM
Fixed in testing, will be in the RC for 0.96.5
536  Bitcoin / Armory / Re: Errors on creating transactions on: November 15, 2018, 04:03:42 PM
1) When are these tx failing? At signing? At creation? Are these offline transactions?

2) The second error seems to have to do with the use of the MAX feature. Try turning that off, see if you can create the tx.

Quote
I'm still receiving on that wallet else I would be okay to send it to you so you could easier debug

Depending on when the bugs occur, I could possibly fix this with just a watching only wallet.

Quote
I could try to import the privkeys in a new armory wallet and see if it will work then, but not sure if armory would "create" the p2sh version then or just p2pkh...

Import aren't scanned for p2sh schemes, only p2pkh.
537  Bitcoin / Armory / Re: Errors on creating transactions on: November 15, 2018, 12:21:08 PM
You are showing 2 errors, are both of these happening together?
538  Bitcoin / Armory / Re: Errors on creating transactions on: November 15, 2018, 08:14:36 AM
What version are you using?
539  Bitcoin / Armory / Re: Is the --satoshi-port command line argument disabled? on: November 14, 2018, 08:31:39 PM
I wanted the logs to see if the client was forwarding the argument to the db to begin with.

A quick look at the db code shows this argument is ignored as a whole. I'm about to push the RC for 0.96.5, I'll add it in there.
540  Bitcoin / Armory / Re: Is the --satoshi-port command line argument disabled? on: November 13, 2018, 08:07:35 AM
Post your logs.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 [27] 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 ... 233 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!