Permalink
Commits on Aug 31, 2017
  1. Merge pull request #229 from dermoth/mysql_varbinary_fix

    dermoth committed on GitHub Aug 31, 2017
    Fix MySQL VARBINARY column creation
Commits on Aug 15, 2017
  1. Fix MySQL VARBINARY column creation

    dermoth committed Aug 15, 2017
    Some versions of MySQL/MariaDB auto-convert large VARBINARY() to BLOB,
    others return errors. Knowing current MAX_SCRIPT gets converted to
    MEDIUMBLOB, explicitly convert VARBINARY(MAX_SCRIPT) to MEDIUMBLOB.
    
    Fixes #227
Commits on Apr 25, 2017
  1. Merge pull request #217 from dermoth/master

    dermoth committed on GitHub Apr 25, 2017
    RPC loader speedup and fixes
Commits on Apr 19, 2017
  1. Fix sql parameters

    dermoth committed Apr 19, 2017
    All SQL parameters should be using tuples.
Commits on Dec 6, 2016
  1. Get transactions from raw block rather than getrawtx

    dermoth committed Dec 3, 2016
    Setting verbose=false, getblock returns raw block data including all
    transactions it contains. This removes the need for getrawtransaction
    rpc which requires txindex=1. It's also much faster on blocks with many
    transactions.
Commits on Nov 28, 2016
  1. Merge pull request #209 from dermoth/master

    dermoth committed on GitHub Nov 28, 2016
    Fix stats computation bug caused by missing block_txin links
Commits on Nov 7, 2016
  1. Commit every block, fixes lock timeouts

    dermoth committed Nov 7, 2016
    The long commit cycle was used to avoid slowdown with smaller blocks,
    but can cause lock timeouts later in the blockchain if the repair and
    import jobs are run on the same database NB: Running both should be
    fine as long as we're not verifying the tip while it's being imported.
  2. Remove extra commit, update repair messages

    dermoth committed Nov 2, 2016
    Commit is handled by procstats every 1000 blocks; remove the extra
    commit in block-txins check. Update logging of repaired data.
Commits on Oct 31, 2016
  1. Fix check in stats check

    dermoth committed Oct 29, 2016
    Although very unlikely, there's a check to ensure we don't have any
    undefined value in the block stats check. The check was looking at keys
    instead of values.
  2. Insert block_txin's by block_height, finish tests

    dermoth committed Oct 29, 2016
    block_txin's candidates are now ordered by height. Tests ensure the
    right block ID's are linked too.
Commits on Oct 29, 2016
  1. Fix stats computation bug

    dermoth committed Oct 26, 2016
    The block_txin table stores output block for a block's txins, which is
    then used to find the age of coins being spent. With multiple sibling
    blocks containing the same transactions, we sometimes tried linking
    against blocks that aren't our ancestors and silently skipped them.
    
    This patch fixes that by trying all possible candidates and using the
    first successful one. This also paves the way to using smallest
    block_height rather than smallest block_id.
    
    The tests in verify.py will find any unlinked txin and restore the
    links.
  2. Print type in type assertions

    dermoth committed Oct 26, 2016
  3. Cleanups...

    dermoth committed Oct 22, 2016
    - Fully dissociate from DataStore logic code
    - Add comments to point at the original code locations
    - Order tx'es by tx_pos position during check
    - Use a single dict for stats, simplify adding more checks
Commits on Sep 19, 2016
  1. Merge pull request #203 from dermoth/master

    dermoth committed on GitHub Sep 19, 2016
    Add block statistics check
  2. Merge pull request #205 from dermoth/fix_rounding_errror

    dermoth committed on GitHub Sep 19, 2016
    Fix rounding errors in block's ss_destroyed and ss stats
Commits on Sep 16, 2016
  1. Fix calculation of destroyed coins in Abe.verify

    dermoth committed Sep 12, 2016
    As per the fix for calculation of destroyed coins in
    tx_find_id_and_value, make the same change to the verify.py code.
  2. Log starting height in check

    dermoth committed Aug 26, 2016
  3. Loop through blocks once running all checks

    dermoth committed Aug 26, 2016
    Loop once through the entire blockchain, running each check along the
    way.
    
    Also many improvements: chain selection, check stats for block 0,
    cleaner output (assuming this is a one-off command-line thing using
    abe's logging config is pointless).
  4. Move check functions to a class

    dermoth committed Aug 24, 2016
  5. Order blocks properly for repair, add sanity tests

    dermoth committed Aug 20, 2016
    Order blocks so we repair in block height order to prevent repairing
    blocks out of order, causing computation errors.
    
    Also raise exceptions in something looks fishy before we compute or
    update the block.
  6. Add block repair option

    dermoth committed Aug 19, 2016
    Allow repairing blocks. In order to support incremental repair (rather
    than repairing against old, broken data) I needed to get only block_id
    in the main look and fetch block data on each pass.
    
    Since each block stats is based on the previous block's data, repairing
    all stats likely will involve repairing *all* blocks from the first
    broken one.
  7. Add block statistics check

    dermoth committed Aug 18, 2016
    Add block statistics check, re-computing all stats from block
    transactions.
    
    Along with it, options to check specific block height ranges makes it
    easier to debug and perform spot-checks. Tests can now be selected
    individually too.
  8. Fix rounding errors in block's ss_destroyed and ss stats

    dermoth committed Sep 15, 2016
    block_ss_destroyed and block_satoshi_seconds relied on SQL
    multiplication. It was noticed on MySQL that because the nTime value
    part of the expression was passed as decimal.Decimal(n) to the MySQL
    driver it ended up using floating point math instead of precision math.
    
    The fix could have been to cast nTime to integer, however to ensure the
    most consistent and correct behavior regardless of the driver the
    multiplication is now done in Python.
  9. Fix calculation of destroyed coins in tx_find_id_and_value

    dermoth committed Sep 12, 2016
    Hard to tell which method is right, but this change at least makes sure
    import_tx() and tx_find_id_and_value() agrees on how destroyed coins
    are calculated. Basically consider non-standard TX with no pubkey to be
    destroyed as well.
Commits on Aug 26, 2016
  1. Fix reference to NULL_HASH

    dermoth committed Aug 26, 2016
  2. Fix off by one in argument parsing

    dermoth committed Aug 25, 2016
    When the first non-abe option on the array is in the form of
    ['--arg' 'val'], the parser eats --arg to consume val and return args
    starting at val. The fix is to increment i only at the end of the loop.
Commits on Aug 24, 2016
  1. Update MySQL README

    dermoth committed Aug 24, 2016
Commits on Aug 21, 2016
Commits on Aug 20, 2016
  1. Fix excessive looping on queued data

    dermoth committed Aug 20, 2016
    Let's say you need to catch up blocks for a few days, on completion
    abe_loader will keep trying to load every single block that came in
    between, causing excessive looping even once all blocks got imported.
    
    This patch flushes all lines after returning from Abe's load run, yet in
    ensures any block that came in while loading won't be missed (at the
    possible cost of doing just one extra load).
    
    Timeout also been increased to 15 minutes. No point in trying every 30
    seconds, and this could hide an actual issue with the block regex.
  2. Fix error with broken stats

    dermoth committed Aug 20, 2016
    Although not a normal situation, when stats gets broken and return null
    values we shouldn't fail to display the blocks.
Commits on Aug 18, 2016
  1. Fix Merkle tree verify check

    dermoth committed Aug 18, 2016
Commits on May 6, 2016
  1. Merge pull request #198 from dermoth/master

    dermoth committed May 6, 2016
    Clean up transaction imported during mempool loads