Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ FD --> END6
- [fork_database.hpp:1-144](file://libraries/chain/include/graphene/chain/fork_database.hpp#L1-L144)
- [fork_database.cpp:1-278](file://libraries/chain/fork_database.cpp#L1-L278)
- [database.hpp:1-200](file://libraries/chain/include/graphene/chain/database.hpp#L1-L200)
- [database.cpp:1-6480](file://libraries/chain/database.cpp#L1-L6480)
- [database.cpp:1-6506](file://libraries/chain/database.cpp#L1-L6506)
- [dlt_block_log.hpp:1-76](file://libraries/chain/include/graphene/chain/dlt_block_log.hpp#L1-L76)
- [dlt_block_log.cpp:1-454](file://libraries/chain/dlt_block_log.cpp#L1-L454)
- [witness.cpp:1-695](file://plugins/witness/witness.cpp#L1-L695)
- [witness.cpp:1-697](file://plugins/witness/witness.cpp#L1-L697)
- [config.hpp:110-124](file://libraries/protocol/include/graphene/protocol/config.hpp#L110-L124)
- [12.hf:1-7](file://libraries/chain/hardfork.d/12.hf#L1-L7)

Expand Down Expand Up @@ -866,17 +866,17 @@ PRUNE["remove_blocks_by_number()"] --> FDB

**Diagram sources**
- [fork_database.cpp:1-278](file://libraries/chain/fork_database.cpp#L1-L278)
- [database.cpp:1-6480](file://libraries/chain/database.cpp#L1-L6480)
- [database.cpp:1-6506](file://libraries/chain/database.cpp#L1-L6506)
- [dlt_block_log.cpp:1-454](file://libraries/chain/dlt_block_log.cpp#L1-L454)
- [witness.cpp:1-695](file://plugins/witness/witness.cpp#L1-L695)
- [witness.cpp:1-697](file://plugins/witness/witness.cpp#L1-L697)
- [config.hpp:110-124](file://libraries/protocol/include/graphene/protocol/config.hpp#L110-L124)
- [12.hf:1-7](file://libraries/chain/hardfork.d/12.hf#L1-L7)

**Section sources**
- [fork_database.cpp:1-278](file://libraries/chain/fork_database.cpp#L1-L278)
- [database.cpp:1-6480](file://libraries/chain/database.cpp#L1-L6480)
- [database.cpp:1-6506](file://libraries/chain/database.cpp#L1-L6506)
- [dlt_block_log.cpp:1-454](file://libraries/chain/dlt_block_log.cpp#L1-L454)
- [witness.cpp:1-695](file://plugins/witness/witness.cpp#L1-L695)
- [witness.cpp:1-697](file://plugins/witness/witness.cpp#L1-L697)
- [config.hpp:110-124](file://libraries/protocol/include/graphene/protocol/config.hpp#L110-L124)
- [12.hf:1-7](file://libraries/chain/hardfork.d/12.hf#L1-L7)

Expand Down
313 changes: 186 additions & 127 deletions .qoder/repowiki/en/content/Core Libraries/Emergency Consensus System.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .qoder/repowiki/en/meta/repowiki-metadata.json

Large diffs are not rendered by default.

230 changes: 124 additions & 106 deletions libraries/chain/database.cpp

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions libraries/chain/include/graphene/chain/database.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,11 @@ namespace graphene { namespace chain {
bool _skip_virtual_ops = false;
bool _enable_plugins_on_push_transaction = false;

/// Wall-clock time when the database was opened (node startup).
/// Used to delay emergency consensus activation until the node
/// has had time to sync with peers.
fc::time_point _node_startup_time;

flat_map<std::string, std::shared_ptr<custom_operation_interpreter>> _custom_operation_interpreters;
std::string _json_schema;
};
Expand Down
5 changes: 5 additions & 0 deletions libraries/protocol/include/graphene/protocol/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@
/// this many seconds since the last irreversible block.
#define CHAIN_EMERGENCY_CONSENSUS_TIMEOUT_SEC 3600 // 1 hour

/// Minimum wall-clock time (seconds) after node startup before emergency
/// consensus mode may be activated. This gives the node time to sync
/// with peers before considering the network stalled.
#define CHAIN_EMERGENCY_STARTUP_DELAY_SEC 600 // 10 minutes

/// The witness account name that produces blocks during emergency mode
#define CHAIN_EMERGENCY_WITNESS_ACCOUNT CHAIN_COMMITTEE_ACCOUNT // "committee"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@
/// this many seconds since the last irreversible block.
#define CHAIN_EMERGENCY_CONSENSUS_TIMEOUT_SEC 3600 // 1 hour

/// Minimum wall-clock time (seconds) after node startup before emergency
/// consensus mode may be activated. This gives the node time to sync
/// with peers before considering the network stalled.
#define CHAIN_EMERGENCY_STARTUP_DELAY_SEC 600 // 10 minutes

/// The witness account name that produces blocks during emergency mode
#define CHAIN_EMERGENCY_WITNESS_ACCOUNT CHAIN_COMMITTEE_ACCOUNT // "committee"

Expand Down
Loading