Permalink
Commits on Apr 22, 2018
  1. Catch invalid query params (#267)

    Lvl4Sword authored and dermoth committed Apr 22, 2018
    - Catch negative count -  prevents a server error when trying negative counts ( ?count=-1 for example )
    - Catch invalid count or hi parameters (string or float) and force default
  2. Merge pull request #261 from dermoth/master

    dermoth committed Apr 22, 2018
    Persistent mempool cache
Commits on Mar 17, 2018
  1. Persistent mempool cache

    dermoth committed May 19, 2017
    Mempool cache used to be reset on each pass to ensure we don't cache
    forever tx gone from mempool (this was particularly a concern when Abe
    cannot process the full mempool between blocks).
    
    Since we already know from unlinked_tx what should be in the cache, load
    it on startup then clean up local cache+db on completed mempool runs.
Commits on Nov 18, 2017
  1. Merge pull request #240 from maffelux/limit-count-param

    dermoth committed Nov 18, 2017
    Stops a potential DoS by limiting maximum count to
  2. Stops a potential DoS by limiting maximum count to

    Lvl4Sword authored and maffelux committed Nov 17, 2017
    2016 or less. This way, you're not having memory exhausted by someone trying to load information on all of your blocks.
Commits on Nov 6, 2017
  1. Merge pull request #235 from maffelux/master

    dermoth committed Nov 6, 2017
    Add Californium
Commits on Nov 5, 2017
  1. Add Californium

    maffelux committed Nov 5, 2017
Commits on Aug 31, 2017
  1. Merge pull request #229 from dermoth/mysql_varbinary_fix

    dermoth committed 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 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 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 Sep 19, 2016
    Add block statistics check
  2. Merge pull request #205 from dermoth/fix_rounding_errror

    dermoth committed 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. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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