Remove shards (#5066)

This commit is contained in:
John Freeman
2024-08-02 19:03:05 -05:00
committed by tequ
parent 16b4550d93
commit d27bc94249
111 changed files with 128 additions and 17228 deletions

View File

@@ -1,63 +0,0 @@
#ifndef RIPPLE_BASICS_THREAD_SAFTY_ANALYSIS_H_INCLUDED
#define RIPPLE_BASICS_THREAD_SAFTY_ANALYSIS_H_INCLUDED
#ifdef RIPPLE_ENABLE_THREAD_SAFETY_ANNOTATIONS
#define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x))
#else
#define THREAD_ANNOTATION_ATTRIBUTE__(x) // no-op
#endif
#define CAPABILITY(x) THREAD_ANNOTATION_ATTRIBUTE__(capability(x))
#define SCOPED_CAPABILITY THREAD_ANNOTATION_ATTRIBUTE__(scoped_lockable)
#define GUARDED_BY(x) THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x))
#define PT_GUARDED_BY(x) THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x))
#define ACQUIRED_BEFORE(...) \
THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(__VA_ARGS__))
#define ACQUIRED_AFTER(...) \
THREAD_ANNOTATION_ATTRIBUTE__(acquired_after(__VA_ARGS__))
#define REQUIRES(...) \
THREAD_ANNOTATION_ATTRIBUTE__(requires_capability(__VA_ARGS__))
#define REQUIRES_SHARED(...) \
THREAD_ANNOTATION_ATTRIBUTE__(requires_shared_capability(__VA_ARGS__))
#define ACQUIRE(...) \
THREAD_ANNOTATION_ATTRIBUTE__(acquire_capability(__VA_ARGS__))
#define ACQUIRE_SHARED(...) \
THREAD_ANNOTATION_ATTRIBUTE__(acquire_shared_capability(__VA_ARGS__))
#define RELEASE(...) \
THREAD_ANNOTATION_ATTRIBUTE__(release_capability(__VA_ARGS__))
#define RELEASE_SHARED(...) \
THREAD_ANNOTATION_ATTRIBUTE__(release_shared_capability(__VA_ARGS__))
#define RELEASE_GENERIC(...) \
THREAD_ANNOTATION_ATTRIBUTE__(release_generic_capability(__VA_ARGS__))
#define TRY_ACQUIRE(...) \
THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_capability(__VA_ARGS__))
#define TRY_ACQUIRE_SHARED(...) \
THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_shared_capability(__VA_ARGS__))
#define EXCLUDES(...) THREAD_ANNOTATION_ATTRIBUTE__(locks_excluded(__VA_ARGS__))
#define ASSERT_CAPABILITY(x) THREAD_ANNOTATION_ATTRIBUTE__(assert_capability(x))
#define ASSERT_SHARED_CAPABILITY(x) \
THREAD_ANNOTATION_ATTRIBUTE__(assert_shared_capability(x))
#define RETURN_CAPABILITY(x) THREAD_ANNOTATION_ATTRIBUTE__(lock_returned(x))
#define NO_THREAD_SAFETY_ANALYSIS \
THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis)
#endif

View File

@@ -18,10 +18,6 @@ enum MessageType
mtHAVE_SET = 35;
mtVALIDATION = 41;
mtGET_OBJECTS = 42;
mtGET_SHARD_INFO = 50;
mtSHARD_INFO = 51;
mtGET_PEER_SHARD_INFO = 52;
mtPEER_SHARD_INFO = 53;
mtVALIDATORLIST = 54;
mtSQUELCH = 55;
mtVALIDATORLISTCOLLECTION = 56;
@@ -29,8 +25,6 @@ enum MessageType
mtPROOF_PATH_RESPONSE = 58;
mtREPLAY_DELTA_REQ = 59;
mtREPLAY_DELTA_RESPONSE = 60;
mtGET_PEER_SHARD_INFO_V2 = 61;
mtPEER_SHARD_INFO_V2 = 62;
mtHAVE_TRANSACTIONS = 63;
mtTRANSACTIONS = 64;
}
@@ -89,71 +83,12 @@ message TMLink
required bytes nodePubKey = 1 [deprecated=true]; // node public key
}
// Request info on shards held
message TMGetPeerShardInfo
{
required uint32 hops = 1 [deprecated=true]; // number of hops to travel
optional bool lastLink = 2 [deprecated=true]; // true if last link in the peer chain
repeated TMLink peerChain = 3 [deprecated=true]; // public keys used to route messages
}
// Info about shards held
message TMPeerShardInfo
{
required string shardIndexes = 1 [deprecated=true]; // rangeSet of shard indexes
optional bytes nodePubKey = 2 [deprecated=true]; // node public key
optional string endpoint = 3 [deprecated=true]; // ipv6 or ipv4 address
optional bool lastLink = 4 [deprecated=true]; // true if last link in the peer chain
repeated TMLink peerChain = 5 [deprecated=true]; // public keys used to route messages
}
// Peer public key
message TMPublicKey
{
required bytes publicKey = 1;
}
// Request peer shard information
message TMGetPeerShardInfoV2
{
// Peer public keys used to route messages
repeated TMPublicKey peerChain = 1;
// Remaining times to relay
required uint32 relays = 2;
}
// Peer shard information
message TMPeerShardInfoV2
{
message TMIncomplete
{
required uint32 shardIndex = 1;
required uint32 state = 2;
// State completion percent, 1 - 100
optional uint32 progress = 3;
}
// Message creation time
required uint32 timestamp = 1;
// Incomplete shards being acquired or verified
repeated TMIncomplete incomplete = 2;
// Verified immutable shards (RangeSet)
optional string finalized = 3;
// Public key of node that authored the shard info
required bytes publicKey = 4;
// Digital signature of node that authored the shard info
required bytes signature = 5;
// Peer public keys used to route messages
repeated TMPublicKey peerChain = 6;
}
// A transaction can have only one input and one output.
// If you want to send an amount that is greater than any single address of yours
// you must first combine coins from one address to another.

View File

@@ -85,9 +85,6 @@ enum class HashPrefix : std::uint32_t {
/** Payment Channel Claim */
paymentChannelClaim = detail::make_hash_prefix('C', 'L', 'M'),
/** shard info for signing */
shardInfo = detail::make_hash_prefix('S', 'H', 'D'),
/** Emit Transaction Nonce */
emitTxnNonce = detail::make_hash_prefix('E', 'T', 'X'),

View File

@@ -68,9 +68,6 @@ systemCurrencyCode()
/** The XRP ledger network's earliest allowed sequence */
static constexpr std::uint32_t XRP_LEDGER_EARLIEST_SEQ{1U};
/** The number of ledgers in a shard */
static constexpr std::uint32_t DEFAULT_LEDGERS_PER_SHARD{16384u};
/** The minimum amount of support an amendment should have.
@note This value is used by legacy code and will become obsolete

View File

@@ -95,7 +95,6 @@ JSS(Fee); // in/out: TransactionSign; field.
JSS(FeeSettings); // ledger type.
JSS(FIELDS); // out: RPC server_definitions
JSS(Flags); // in/out: TransactionSign; field.
JSS(incomplete_shards); // out: OverlayImpl, PeerImp
JSS(GenesisMint); // tt
JSS(GenesisMints);
JSS(GovernanceMarks);
@@ -314,7 +313,6 @@ JSS(command); // in: RPCHandler
JSS(complete); // out: NetworkOPs, InboundLedger
JSS(complete_ledgers); // out: NetworkOPs, PeerImp
JSS(complete_ledgers_pinned);
JSS(complete_shards); // out: OverlayImpl, PeerImp
JSS(compression_level);
JSS(consensus); // out: NetworkOPs, LedgerConsensus
JSS(converge_time); // out: NetworkOPs
@@ -328,8 +326,6 @@ JSS(ctid); // in/out: Tx RPC
JSS(cres);
JSS(currency_a); // out: BookChanges
JSS(currency_b); // out: BookChanges
JSS(currentShard); // out: NodeToShardStatus
JSS(currentShardIndex); // out: NodeToShardStatus
JSS(currency); // in: paths/PathRequest, STAmount
// out: STPathSet, STAmount,
// AccountLines
@@ -406,8 +402,6 @@ JSS(fee_mult_max); // in: TransactionSign
JSS(fee_ref); // out: NetworkOPs, DEPRECATED
JSS(fetch_pack); // out: NetworkOPs
JSS(first); // out: rpc/Version
JSS(firstSequence); // out: NodeToShardStatus
JSS(firstShardIndex); // out: NodeToShardStatus
JSS(finished);
JSS(fix_txns); // in: LedgerCleaner
JSS(file);
@@ -451,7 +445,7 @@ JSS(imported); // out: catalogue
JSS(inLedger); // out: tx/Transaction
JSS(in_queue);
JSS(inbound); // out: PeerImp
JSS(index); // in: LedgerEntry, DownloadShard
JSS(index); // in: LedgerEntry,
// out: STLedgerEntry,
// LedgerEntry, TxHistory, LedgerData
JSS(info); // out: ServerInfo, ConsensusInfo, FetchInfo
@@ -477,8 +471,6 @@ JSS(key); // out
JSS(key_type); // in/out: WalletPropose, TransactionSign
JSS(latency); // out: PeerImp
JSS(last); // out: RPCVersion
JSS(lastSequence); // out: NodeToShardStatus
JSS(lastShardIndex); // out: NodeToShardStatus
JSS(last_close); // out: NetworkOPs
JSS(last_refresh_time); // out: ValidatorSite
JSS(last_refresh_status); // out: ValidatorSite
@@ -722,7 +714,6 @@ JSS(server_status); // out: NetworkOPs
JSS(server_version); // out: NetworkOPs
JSS(settle_delay); // out: AccountChannels
JSS(severity); // in: LogLevel
JSS(shards); // in/out: GetCounts, DownloadShard
JSS(signature); // out: NetworkOPs, ChannelAuthorize
JSS(signature_verified); // out: ChannelVerify
JSS(signing_key); // out: NetworkOPs
@@ -747,7 +738,6 @@ JSS(state_now); // in: Subscribe
JSS(status); // error
JSS(stop); // in: LedgerCleaner
JSS(stop_history_tx_only); // in: Unsubscribe, stop history tx stream
JSS(storedSeqs); // out: NodeToShardStatus
JSS(streams); // in: Subscribe, Unsubscribe
JSS(strict); // in: AccountCurrencies, AccountInfo
JSS(sub_index); // in: LedgerEntry