Commit Graph

16876 Commits

Author SHA1 Message Date
gregorycoppola
b40679cd51 added to NOTES 2022-07-20 19:39:05 +00:00
Greg Coppola
3c7000ef16 add more logs for the reading of a block 2022-07-20 14:20:05 -05:00
Greg Coppola
e8c7fd6ed3 Merge branch 'draft/marf-profiling' of github.com:gregorycoppola/stacks-blockchain into draft/marf-profiling 2022-07-20 11:02:09 -05:00
gregorycoppola
451434e89c comment some logs 2022-07-20 16:01:52 +00:00
Greg Coppola
5f8b08776c remove some more logs 2022-07-20 11:00:30 -05:00
gregorycoppola
fdafc500da changing file 2022-07-20 15:37:55 +00:00
Greg Coppola
d0f7d0a8ca big fmt 2022-07-20 10:10:50 -05:00
Greg Coppola
c8425e4235 comment out the checks 2022-07-20 10:10:38 -05:00
Greg Coppola
4c06efb502 inner block reads are in the microseconds
INFO [1658292261.956522] [src/chainstate/stacks/index/storage.rs:143] [main] get_block_hash_caching: result=miss, id=4445, time_cost=4.379µs
INFO [1658292261.956613] [src/chainstate/stacks/index/storage.rs:143] [main] get_block_hash_caching: result=miss, id=11738, time_cost=4.369µs
INFO [1658292261.956677] [src/chainstate/stacks/index/storage.rs:143] [main] get_block_hash_caching: result=miss, id=1248, time_cost=5.04µs
INFO [1658292261.956711] [src/chainstate/stacks/index/storage.rs:143] [main] get_block_hash_caching: result=miss, id=18742, time_cost=4.71µs
INFO [1658292261.956763] [src/chainstate/stacks/index/storage.rs:143] [main] get_block_hash_caching: result=miss, id=65676, time_cost=4.388µs
INFO [1658292261.959331] [src/chainstate/stacks/index/storage.rs:184] [main] get_block_hash_caching: result=miss, time_cost=24.985µs
INFO [1658292261.959584] [src/chainstate/stacks/index/storage.rs:143] [main] get_block_hash_caching: result=miss, id=79551, time_cost=8.464µs
INFO [1658292261.959928] [src/chainstate/stacks/index/storage.rs:184] [main] get_block_hash_caching: result=miss, time_cost=15.654µs
2022-07-19 23:45:48 -05:00
Greg Coppola
d2e8c00995 added in more logs
note: need to figure out when the marf gets reset...

to do this, put a backtrace in the place where the marf connection is reset
2022-07-19 22:29:59 -05:00
Greg Coppola
40efc81e0f right now the cache numbers are the same:
greg@home-base:~/main1$ grep result=hit /log/inspect0 | wc
 265094 1855658 32295293
greg@home-base:~/main1$ grep result=miss /log/inspect0 | wc
  24492  171444 3010839
greg@home-base:~/main1$ grep result=hit /log/inspect1 | wc
 265094 1855658 32295293
greg@home-base:~/main1$ grep result=miss /log/inspect1 | wc
  24492  171444 3010839

questions:
1) why are there are so many hits the first time?
2) why are there not l hits the second time?
  i.e., the state seems to reset
2022-07-19 22:19:38 -05:00
Greg Coppola
79854bc9c8 new comment 2022-07-19 22:02:17 -05:00
Greg Coppola
58259b4b81 logging the with_conn part 2022-07-19 21:56:30 -05:00
Greg Coppola
9b94a7ca96 good
INFO [1658284643.026413] [src/chainstate/stacks/index/marf.rs:1140] [main] cur_block_hash b40ffa12cd6cdec17a0cf0231bffb40d9271c319a5113e88792a3488765e6c6b cur_block_id None

vs

bad
INFO [1658284541.255263] [src/chainstate/stacks/index/marf.rs:1140] [main] cur_block_hash ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff cur_block_id None
2022-07-19 21:42:14 -05:00
Greg Coppola
304c2a5eea logging the marf path, but still can't figure out the difference
inspect
INFO [1658281765.924128] [src/chainstate/stacks/index/marf.rs:1121] [main] MARF::from_path path [/home/greg/spaces/d1/mainnet/chainstate/vm/clarity/marf.sqlite] open_opts [MARFOpenOpts { hash_calculation_mode: Deferred, cache_strategy: "noop", external_blobs: true, force_db_migrate: false }]

marf-get
INFO [1658281889.151867] [src/chainstate/stacks/index/marf.rs:1121] [main] MARF::from_path path [/home/greg/spaces/d1/mainnet/chainstate/vm/index.sqlite] open_opts [MARFOpenOpts { hash_calculation_mode: Deferred, cache_strategy: "noop", external_blobs: false, force_db_migrate: false }]
2022-07-19 20:53:19 -05:00
Greg Coppola
3c9de7f38c read is none, even though we have teh same data as the output
greg@home-base:~/main1$ cargo build --bin stacks-inspect --release && ./target/release/stacks-inspect marf-get ~/spaces/d1 vm::SP000000000000000000002Q6VF78.cost-voting::1::confirmed-proposal-count b40ffa12cd6cdec17a0cf0231bffb40d9271c319a5113e88792a3488765e6c6b
warning: unused variable: `sort_db_path`
   --> src/main.rs:827:13
    |
827 |         let sort_db_path = format!("{}/mainnet/burnchain/sortition", &mainnet_path);
    |             ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_sort_db_path`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `start`
   --> src/main.rs:850:13
    |
850 |         let start = time::Instant::now();
    |             ^^^^^ help: if this is intentional, prefix it with an underscore: `_start`

warning: unused variable: `end`
   --> src/main.rs:853:13
    |
853 |         let end = time::Instant::now();
    |             ^^^ help: if this is intentional, prefix it with an underscore: `_end`

warning: `blockstack-core` (bin "stacks-inspect") generated 3 warnings
    Finished release [optimized + debuginfo] target(s) in 0.09s
DEBG [1658281112.103291] [src/chainstate/stacks/index/trie_sql.rs:166] [main] Migrated MARF data to schema 2
DEBG [1658281112.103327] [src/chainstate/stacks/index/storage.rs:1453] [main] Opened TrieFileStorage /home/greg/spaces/d1/mainnet/chainstate/vm/index.sqlite; external blobs: false
INFO [1658281112.103336] [src/chainstate/stacks/index/storage.rs:1461] [main] check: setting strategy
INFO [1658281112.103339] [src/chainstate/stacks/index/cache.rs:211] [main] check, strategy everything
INFO [1658281112.103358] [src/chainstate/stacks/index/marf.rs:135] [main] MarfConnection::get(b40ffa12cd6cdec17a0cf0231bffb40d9271c319a5113e88792a3488765e6c6b, 'vm::SP000000000000000000002Q6VF78.cost-voting::1::confirmed-proposal-count')
INFO [1658281112.103377] [src/chainstate/stacks/index/cache.rs:396] [main] check
INFO [1658281112.103382] [src/chainstate/stacks/index/cache.rs:229] [main] check
INFO [1658281112.103385] [src/chainstate/stacks/index/cache.rs:177] [main] check
INFO [1658281112.103387] [src/chainstate/stacks/index/cache.rs:179] [main] load_block_id None
INFO [1658281112.103442] [src/chainstate/stacks/index/cache.rs:396] [main] check
INFO [1658281112.103447] [src/chainstate/stacks/index/cache.rs:229] [main] check
INFO [1658281112.103451] [src/chainstate/stacks/index/cache.rs:177] [main] check
INFO [1658281112.103455] [src/chainstate/stacks/index/cache.rs:179] [main] load_block_id None
None
2022-07-19 20:39:09 -05:00
Greg Coppola
bc91710df9 adding data 2022-07-19 20:08:39 -05:00
Greg Coppola
923f0a41f1 marf-read tool is running but not doing anything huge 2022-07-08 21:03:12 -05:00
Greg Coppola
5cf94ff5f1 compiles but problem opening marf db
INFO [1657300950.403021] [src/chainstate/stacks/index/storage.rs:1461] [main] check: setting strategy
INFO [1657300950.403038] [src/chainstate/stacks/index/cache.rs:211] [main] check, strategy everything
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: SQLError(SqliteFailure(Error { code: CannotOpen, extended_code: 14 }, Some("unable to open database file: /home/greg/spaces/d1")))', src/main.rs:951:57
stack backtrace:
   0: rust_begin_unwind
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:143:14
   2: core::result::unwrap_failed
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/result.rs:1785:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/result.rs:1078:23
   4: stacks_inspect::main
             at ./src/main.rs:951:24
   5: core::ops::function::FnOnce::call_once
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
2022-07-08 12:26:59 -05:00
Greg Coppola
e4c610f678 start logging marf calls.. have things like
INFO [1657298390.173602] [src/chainstate/stacks/index/marf.rs:135] [main] MarfConnection::get(b40ffa12cd6cdec17a0cf0231bffb40d9271c319a5113e88792a3488765e6c6b, 'clarity-contract::SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.fixed-weight-pool-v1-01')
2022-07-08 11:41:59 -05:00
Greg Coppola
761cfcd889 added the backtrace...
INFO [1657243661.041139] [src/chainstate/stacks/index/cache.rs:236] [main] everything check    0: blockstack_lib::chainstate::stacks::index::cache::TrieCache<T>::state_ref
             at src/chainstate/stacks/index/cache.rs:235:26
   1: blockstack_lib::chainstate::stacks::index::cache::TrieCache<T>::ref_block_hash
             at src/chainstate/stacks/index/cache.rs:391:9
   2: <blockstack_lib::chainstate::stacks::index::storage::TrieStorageConnection<T> as blockstack_lib::chainstate::stacks::index::BlockMap>::get_block_hash_caching
             at src/chainstate/stacks/index/storage.rs:132:9
   3: blockstack_lib::chainstate::stacks::index::storage::TrieStorageConnection<T>::get_block_from_local_id
             at src/chainstate/stacks/index/storage.rs:2290:19
      blockstack_lib::chainstate::stacks::index::trie::Trie::walk_backptr
             at src/chainstate/stacks/index/trie.rs:224:35
   4: blockstack_lib::chainstate::stacks::index::marf::MARF<T>::walk_backptr
             at src/chainstate/stacks/index/marf.rs:645:51
   5: blockstack_lib::chainstate::stacks::index::marf::MARF<T>::walk
             at src/chainstate/stacks/index/marf.rs:954:41
      blockstack_lib::chainstate::stacks::index::marf::MARF<T>::get_path
             at src/chainstate/stacks/index/marf.rs:1014:30
      blockstack_lib::chainstate::stacks::index::marf::MARF<T>::get_by_key
             at src/chainstate/stacks/index/marf.rs:1141:22
   6: blockstack_lib::chainstate::stacks::index::marf::MarfConnection::get::{{closure}}
             at src/chainstate/stacks/index/marf.rs:135:28
      <blockstack_lib::chainstate::stacks::index::marf::MarfTransaction<T> as blockstack_lib::chainstate::stacks::index::marf::MarfConnection<T>>::with_conn
             at src/chainstate/stacks/index/marf.rs:212:9
      blockstack_lib::chainstate::stacks::index::marf::MarfConnection::get
             at src/chainstate/stacks/index/marf.rs:135:9
      <blockstack_lib::clarity_vm::database::marf::WritableMarfStore as clarity::vm::database::clarity_store::ClarityBackingStore>::get
             at src/clarity_vm/database/marf.rs:545:9
   7: clarity::vm::database::key_value_wrapper::RollbackWrapper::get_value::{{closure}}
             at clarity/./src/vm/database/key_value_wrapper.rs:388:13
      core::option::Option<T>::or_else
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/option.rs:1364:21
      clarity::vm::database::key_value_wrapper::RollbackWrapper::get_value
             at clarity/./src/vm/database/key_value_wrapper.rs:387:9
   8: clarity::vm::database::clarity_db::ClarityDatabase::get_value
             at clarity/./src/vm/database/clarity_db.rs:314:9
      clarity::vm::database::clarity_db::ClarityDatabase::fetch_entry_with_size
             at clarity/./src/vm/database/clarity_db.rs:1005:22
   9: clarity::vm::functions::database::special_fetch_entry_v205
             at clarity/./src/vm/functions/database.rs:401:18
      clarity::vm::functions::database::special_fetch_entry
             at clarity/./src/vm/functions/mod.rs:53:45
  10: core::ops::function::Fn::call
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:70:5
  11: core::ops::function::impls::<impl core::ops::function::Fn<A> for &F>::call
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:237:13
      clarity::vm::apply
             at clarity/./src/vm/mod.rs:166:24
  12: clarity::vm::eval
             at clarity/./src/vm/mod.rs:256:13
  13: clarity::vm::apply
             at clarity/./src/vm/mod.rs:175:35
  14: clarity::vm::eval
             at clarity/./src/vm/mod.rs:256:13
  15: clarity::vm::callables::DefinedFunction::execute_apply
             at clarity/./src/vm/callables.rs:198:22
  16: clarity::vm::contexts::Environment::execute_function_as_transaction
             at clarity/./src/vm/contexts.rs:1021:13
  17: clarity::vm::callables::DefinedFunction::apply
             at clarity/./src/vm/callables.rs:246:37
      clarity::vm::apply
             at clarity/./src/vm/mod.rs:214:53
  18: clarity::vm::eval
             at clarity/./src/vm/mod.rs:256:13
  19: clarity::vm::apply
             at clarity/./src/vm/mod.rs:175:35
  20: clarity::vm::eval
             at clarity/./src/vm/mod.rs:256:13
  21: clarity::vm::functions::special_asserts
             at clarity/./src/vm/functions/mod.rs:508:23
  22: core::ops::function::Fn::call
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:70:5
  23: core::ops::function::impls::<impl core::ops::function::Fn<A> for &F>::call
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:237:13
      clarity::vm::apply
             at clarity/./src/vm/mod.rs:166:24
  24: clarity::vm::eval
             at clarity/./src/vm/mod.rs:256:13
  25: clarity::vm::functions::special_let::{{closure}}
             at clarity/./src/vm/functions/mod.rs:602:31
      clarity::vm::functions::special_let
             at clarity/./src/vm/functions/mod.rs:582:5
  26: core::ops::function::Fn::call
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:70:5
  27: core::ops::function::impls::<impl core::ops::function::Fn<A> for &F>::call
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:237:13
      clarity::vm::apply
             at clarity/./src/vm/mod.rs:166:24
  28: clarity::vm::eval
             at clarity/./src/vm/mod.rs:256:13
  29: clarity::vm::functions::options::eval_with_new_binding
             at clarity/./src/vm/functions/options.rs:128:18
  30: clarity::vm::functions::options::special_match_resp
             at clarity/./src/vm/functions/options.rs:184:9
      clarity::vm::functions::options::special_match
             at clarity/./src/vm/functions/options.rs:202:34
  31: core::ops::function::Fn::call
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:70:5
  32: core::ops::function::impls::<impl core::ops::function::Fn<A> for &F>::call
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:237:13
      clarity::vm::apply
             at clarity/./src/vm/mod.rs:166:24
  33: clarity::vm::eval
             at clarity/./src/vm/mod.rs:256:13
  34: clarity::vm::callables::DefinedFunction::execute_apply
             at clarity/./src/vm/callables.rs:198:22
  35: clarity::vm::callables::DefinedFunction::apply
             at clarity/./src/vm/callables.rs:244:36
      clarity::vm::apply
             at clarity/./src/vm/mod.rs:214:53
  36: clarity::vm::functions::sequences::special_fold::{{closure}}
             at clarity/./src/vm/functions/sequences.rs:103:21
      core::iter::traits::iterator::Iterator::try_fold
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/iter/traits/iterator.rs:2186:21
  37: clarity::vm::functions::sequences::special_fold
             at clarity/./src/vm/functions/sequences.rs:99:13
  38: core::ops::function::Fn::call
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:70:5
  39: core::ops::function::impls::<impl core::ops::function::Fn<A> for &F>::call
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:237:13
      clarity::vm::apply
             at clarity/./src/vm/mod.rs:166:24
  40: clarity::vm::eval
             at clarity/./src/vm/mod.rs:256:13
  41: clarity::vm::functions::options::special_match
             at clarity/./src/vm/functions/options.rs:197:17
  42: core::ops::function::Fn::call
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:70:5
  43: core::ops::function::impls::<impl core::ops::function::Fn<A> for &F>::call
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:237:13
      clarity::vm::apply
             at clarity/./src/vm/mod.rs:166:24
  44: clarity::vm::eval
             at clarity/./src/vm/mod.rs:256:13
  45: clarity::vm::apply
             at clarity/./src/vm/mod.rs:175:35
  46: clarity::vm::eval
             at clarity/./src/vm/mod.rs:256:13
  47: clarity::vm::callables::DefinedFunction::execute_apply
             at clarity/./src/vm/callables.rs:198:22
  48: clarity::vm::contexts::Environment::execute_function_as_transaction
             at clarity/./src/vm/contexts.rs:1021:13
  49: clarity::vm::contexts::Environment::execute_contract::{{closure}}
             at clarity/./src/vm/contexts.rs:981:23
      clarity::vm::contexts::Environment::execute_contract
             at clarity/./src/vm/contexts.rs:954:9
  50: clarity::vm::contexts::OwnedEnvironment::execute_transaction::{{closure}}
             at clarity/./src/vm/contexts.rs:667:13
      clarity::vm::contexts::OwnedEnvironment::execute_in_env
             at clarity/./src/vm/contexts.rs:619:13
      clarity::vm::contexts::OwnedEnvironment::execute_transaction
             at clarity/./src/vm/contexts.rs:666:9
  51: clarity::vm::clarity::TransactionConnection::run_contract_call::{{closure}}
             at clarity/./src/vm/clarity.rs:256:17
      <blockstack_lib::clarity_vm::clarity::ClarityTransactionConnection as clarity::vm::clarity::TransactionConnection>::with_abort_callback::{{closure}}::{{closure}}
             at src/clarity_vm/clarity.rs:848:30
      <blockstack_lib::clarity_vm::clarity::ClarityTransactionConnection as clarity::vm::clarity::TransactionConnection>::with_abort_callback::{{closure}}
             at src/clarity_vm/clarity.rs:835:13
      <blockstack_lib::clarity_vm::clarity::ClarityTransactionConnection as clarity::vm::clarity::TransactionConnection>::with_abort_callback
             at src/clarity_vm/clarity.rs:834:9
      clarity::vm::clarity::TransactionConnection::run_contract_call
             at clarity/./src/vm/clarity.rs:254:9
  52: blockstack_lib::chainstate::stacks::db::transactions::<impl blockstack_lib::chainstate::stacks::db::StacksChainState>::process_transaction_payload
             at src/chainstate/stacks/db/transactions.rs:872:42
  53: blockstack_lib::chainstate::stacks::db::transactions::<impl blockstack_lib::chainstate::stacks::db::StacksChainState>::process_transaction
             at src/chainstate/stacks/db/transactions.rs:1143:13
  54: blockstack_lib::chainstate::stacks::db::blocks::<impl blockstack_lib::chainstate::stacks::db::StacksChainState>::process_microblocks_transactions
             at src/chainstate/stacks/db/blocks.rs:4482:21
  55: blockstack_lib::chainstate::stacks::db::blocks::<impl blockstack_lib::chainstate::stacks::db::StacksChainState>::setup_block
             at src/chainstate/stacks/db/blocks.rs:4950:19
  56: blockstack_lib::chainstate::stacks::miner::<impl blockstack_lib::chainstate::stacks::StacksBlockBuilder>::epoch_begin
             at src/chainstate/stacks/miner.rs:1722:13
  57: blockstack_lib::chainstate::stacks::miner::<impl blockstack_lib::chainstate::stacks::StacksBlockBuilder>::build_anchored_block
             at src/chainstate/stacks/miner.rs:1955:13
  58: stacks_inspect::main
             at src/main.rs:771:26
  59: core::ops::function::FnOnce::call_once
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:227:5
      std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:122:18
  60: std::rt::lang_start::{{closure}}
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/rt.rs:145:18
  61: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:259:13
      std::panicking::try::do_call
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:492:40
      std::panicking::try
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:456:19
      std::panic::catch_unwind
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panic.rs:137:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/rt.rs:128:48
      std::panicking::try::do_call
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:492:40
      std::panicking::try
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:456:19
      std::panic::catch_unwind
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panic.rs:137:14
      std::rt::lang_start_internal
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/rt.rs:128:20
  62: main
  63: __libc_start_main
  64: _start
2022-07-07 21:35:42 -05:00
Greg Coppola
9fca28b4f6 got everythign check data
1158296 [src/chainstate/stacks/index/cache.rs:233] [main] everything check
 115114 [src/chainstate/stacks/index/cache.rs:247] [main] everything check
  18256 [src/chainstate/stacks/index/cache.rs:307] [main] everything check
  12094 [src/chainstate/stacks/index/cache.rs:328] [main] everything check
     30 [src/chainstate/stacks/index/cache.rs:356] [main] everything check
2022-07-07 20:14:11 -05:00
Greg Coppola
34379c7cf9 added more everythign checks 2022-07-07 20:05:55 -05:00
Greg Coppola
23d4441bd2 checking everything 2022-07-07 19:50:50 -05:00
Greg Coppola
b7fafb6863 strategy right now is noop 2022-07-07 19:35:46 -05:00
Greg Coppola
4e33e4f92c added this data of the occurrences of lines 2022-07-07 19:30:02 -05:00
Greg Coppola
973e412c57 marf hit locations seem to hit all of them
[src/chainstate/stacks/index/cache.rs:160] [main] check
[src/chainstate/stacks/index/cache.rs:168] [main] check
[src/chainstate/stacks/index/cache.rs:174] [main] check
[src/chainstate/stacks/index/cache.rs:204] [main] check
[src/chainstate/stacks/index/cache.rs:222] [main] check
[src/chainstate/stacks/index/cache.rs:233] [main] check
[src/chainstate/stacks/index/cache.rs:244] [main] check
[src/chainstate/stacks/index/cache.rs:260] [main] check
[src/chainstate/stacks/index/cache.rs:271] [main] check
[src/chainstate/stacks/index/cache.rs:288] [main] check
[src/chainstate/stacks/index/cache.rs:308] [main] check
[src/chainstate/stacks/index/cache.rs:326] [main] check
[src/chainstate/stacks/index/cache.rs:359] [main] check
[src/chainstate/stacks/index/cache.rs:366] [main] check
[src/chainstate/stacks/index/cache.rs:373] [main] check
2022-07-07 18:02:12 -05:00
Greg Coppola
ac15d28371 making two identical blocks!
Successfully mined block @ height = 65116 off of 09304ec17191a6302db0e5eca98b793ce2ea84f1067ec6e3a6bb4c08eb56e8f1 (631e31885a2b043cc5089bbac80cec98e3cf4df3/05eeea820cb6283bfe5cdc34db756236eb0f47610a246fc995808a5641f3d7f4) in 61701ms. Min-fee: 18446744073709551615, Max-time: 18446744073709551615
Block dabfd6026b8d83b5583545ac6604c7e021505c49646560f0fbb23afcc6b3cfe2: 180 uSTX, 575 bytes, cost ExecutionCost { write_length: 689, write_count: 9, read_length: 441018, read_count: 79, runtime: 1326849 }
Successfully mined block @ height = 65116 off of 09304ec17191a6302db0e5eca98b793ce2ea84f1067ec6e3a6bb4c08eb56e8f1 (631e31885a2b043cc5089bbac80cec98e3cf4df3/05eeea820cb6283bfe5cdc34db756236eb0f47610a246fc995808a5641f3d7f4) in 118295ms. Min-fee: 18446744073709551615, Max-time: 18446744073709551615
Block dabfd6026b8d83b5583545ac6604c7e021505c49646560f0fbb23afcc6b3cfe2: 180 uSTX, 575 bytes, cost ExecutionCost { write_length: 689, write_count: 9, read_length: 441018, read_count: 79, runtime: 1326849 }
2022-07-07 17:07:16 -05:00
Greg Coppola
c566656830 looping twice over block, let's see what the logs say 2022-07-07 16:55:33 -05:00
Greg Coppola
33372af5c0 add some comments 2022-07-07 11:16:36 -05:00
Jude Nelson
08c163bab4 Merge pull request #3174 from stacks-network/feat/unwrap-to-error
replace unwrap with error
2022-06-17 17:25:47 +00:00
Aaron Blankstein
db3c7a233e replace unwrap with error 2.05.0.2.2 2.05.0.2.2-rc1 2022-06-12 10:05:14 -05:00
Jude Nelson
38aa968d7e Merge pull request #3152 from stacks-network/fix/spv
Release 2.05.0.2.1 (hotfix: check chain work when processing reorgs)
2.05.0.2.1
2022-06-03 14:57:05 +00:00
Jude Nelson
762e007caf chore: add changelog for SPV chain work fix 2.05.0.2.1-rc1 2022-05-31 12:08:22 -04:00
Jude Nelson
5b326f9d35 chore: cargo fmt 2022-05-28 22:45:44 -04:00
Jude Nelson
e1319a9e81 fix: compile-time error 2022-05-28 22:45:19 -04:00
Jude Nelson
9f510fd594 fix: use .saturating_sub() when determining the header range to copy over to the .reorg DB, and use K/V logging. Also, add multi-word test vectors to hex codec for uint256 2022-05-28 22:21:03 -04:00
Jude Nelson
1cc98b552f fix: prime the .reorg DB with the parent of the first header we expect to download (off-by-one error) 2022-05-26 21:35:12 -04:00
Jude Nelson
debf40c35c refactor: better name 2022-05-26 15:44:34 -04:00
Jude Nelson
437381e339 fix: test that the SPV chain tip is within 2 hours of now 2022-05-26 15:43:56 -04:00
Jude Nelson
7670d02acd chore: add big-endian code for uint256, which is easier to read 2022-05-26 13:58:12 -04:00
Jude Nelson
6c9221aa7a fix: update sync_with_indexer() to assume that find_chain_reorg() does the bookkeeping on the SPV DB, so it doesn't have to 2022-05-26 13:57:39 -04:00
Jude Nelson
4721f67078 fix: use the correct chainwork calculation by summing over individual headers 2022-05-26 13:57:14 -04:00
Jude Nelson
fcbc660608 chore: s/InvalidDifficulty/InvalidChainWork/g 2022-05-26 13:56:55 -04:00
Jude Nelson
c6ac355f34 feat: have find_bitcoin_reorg() actually merge the reorg headers and chainwork into the original SPV database, instead of re-downloading the same headers and hoping for the best. Also, update the mainnet unit test to compare chainwork against known chainwork from bitcoind 2022-05-26 13:55:54 -04:00
Jude Nelson
e8b2cecee9 chore: add uint256 codec to/from hex strings 2022-05-26 00:13:45 -04:00
Jude Nelson
9425a39ff7 feat: add static method to convert a bitcoin target to a compact target, which is what gets used in the difficulty comparison 2022-05-26 00:13:24 -04:00
Jude Nelson
11f6d7ee16 chore: unused mut 2022-05-26 00:13:11 -04:00
Jude Nelson
998b9b73d8 feat: update the SPV client to track the total chain work over time. BUT, right now the work calculation for a difficulty adjustment interval is getting the wrong answers and I don't know why. 2022-05-26 00:12:39 -04:00
Jude Nelson
04d2275aa0 chore: add InvalidDifficulty variant 2022-05-26 00:12:26 -04:00