Open MaksymZavershynskyi opened 4 years ago
For the record. @evgenykuzyakov reported the following error:
Apr 01 22:40:16.205 ERROR sync: Cannot build sync header (get_state_response_header): DB Not Found Error: BLOCK: sWLzUyRwQeXiASrgZbSTvPaULCauqJBoZCX61aVGaVQ
Cause: Unknown
Backtrace: stack backtrace:
0: failure::backtrace::Backtrace::new
1: <near_chain::store::ChainStore as near_chain::store::ChainStoreAccess>::get_block
2: <near_client::view_client::ViewClientActor as actix::handler::Handler<near_network::types::NetworkViewClientMessages>>::handle
3: <actix::address::envelope::SyncEnvelopeProxy<A,M> as actix::address::envelope::EnvelopeProxy>::handle
4: <actix::contextimpl::ContextFut<A,C> as core::future::future::Future>::poll
5: tokio::task::raw::poll
6: <std::future::GenFuture<T> as core::future::future::Future>::poll
7: actix_rt::runtime::Runtime::block_on
8: near::main
9: std::rt::lang_start_internal::{{closure}}::{{closure}}
at src/libstd/rt.rs:52
std::sys_common::backtrace::__rust_begin_short_backtrace
at src/libstd/sys_common/backtrace.rs:130
10: main
11: __libc_start_main
12: _start
With this layer we would've been able to track what invariant was broken relatively easy.
This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Currently we have the following issues:
ColBlock
,ColBlockHeight
,ColBlockMisc
. Also we many columns are used to created DB indices, likeColNextBlockWithNewChunk
,ColReceiptIdToShardId
, etc. Currently we have 38 columns and this mapping is not specified anywhere which makes it really hard to maintain;The proposed solution is to have an explicit layer that every component in our system would use to interface with the storage. The advantages:
Arc
orWeak
. Most of the objects living in ORM will be immutable);For the record, this was already proposed one year ago: https://github.com/nearprotocol/nearcore/issues/575#issuecomment-463841872 .