mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Warn operators about upcoming unknown amendments:
* When an unknown amendment reaches majority, log an error-level message, and return a `warnings` array on all successful admin-level RPC calls to `server_info` and `server_state` with a message describing the problem, and the expected deadline. * In addition to the `amendment_blocked` flag returned by `server_info` and `server_state`, return a warning with a more verbose description when the server is amendment blocked. * Check on every flag ledger to see if the amendment(s) lose majority. Logs again if they don't, resumes normal operations if they did. The intention is to give operators earlier warning that their instances are in danger of being amendment blocked, which will hopefully motivate them to update ahead of time.
This commit is contained in:
committed by
Manoj doshi
parent
4315913a5d
commit
5ff23f8f31
@@ -138,6 +138,16 @@ enum error_code_i
|
||||
rpcLAST = rpcINVALID_LGR_RANGE // rpcLAST should always equal the last code.=
|
||||
};
|
||||
|
||||
/** Codes returned in the `warnings` array of certain RPC commands.
|
||||
|
||||
These values need to remain stable.
|
||||
*/
|
||||
enum warning_code_i
|
||||
{
|
||||
warnRPC_UNSUPPORTED_MAJORITY = 1001,
|
||||
warnRPC_AMENDMENT_BLOCKED = 1002,
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// VFALCO NOTE these should probably not be in the RPC namespace.
|
||||
|
||||
@@ -202,7 +202,7 @@ JSS ( destination_amount ); // in: PathRequest, RipplePathFind
|
||||
JSS ( destination_currencies ); // in: PathRequest, RipplePathFind
|
||||
JSS ( destination_tag ); // in: PathRequest
|
||||
// out: AccountChannels
|
||||
JSS ( details ); // out: Manifest
|
||||
JSS ( details ); // out: Manifest, server_info
|
||||
JSS ( dir_entry ); // out: DirectoryEntryIterator
|
||||
JSS ( dir_index ); // out: DirectoryEntryIterator
|
||||
JSS ( dir_root ); // out: DirectoryEntryIterator
|
||||
@@ -223,6 +223,8 @@ JSS ( error_exception ); // out: Submit
|
||||
JSS ( error_message ); // out: error
|
||||
JSS ( escrow ); // in: LedgerEntry
|
||||
JSS ( expand ); // in: handler/Ledger
|
||||
JSS ( expected_date ); // out: any (warnings)
|
||||
JSS ( expected_date_UTC ); // out: any (warnings)
|
||||
JSS ( expected_ledger_size ); // out: TxQ
|
||||
JSS ( expiration ); // out: AccountOffers, AccountChannels,
|
||||
// ValidatorList
|
||||
@@ -573,6 +575,7 @@ JSS ( version ); // out: RPCVersion
|
||||
JSS ( vetoed ); // out: AmendmentTableImpl
|
||||
JSS ( vote ); // in: Feature
|
||||
JSS ( warning ); // rpc:
|
||||
JSS ( warnings ); // out: server_info, server_state
|
||||
JSS ( workers );
|
||||
JSS ( write_load ); // out: GetCounts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user