pub struct AuthorityState {
pub name: AuthorityName,
pub secret: StableSyncAuthoritySigner,
pub indexes: Option<Arc<IndexStore>>,
pub rpc_index: Option<Arc<RpcIndexStore>>,
pub subscription_handler: Arc<SubscriptionHandler>,
pub checkpoint_store: Arc<CheckpointStore>,
pub metrics: Arc<AuthorityMetrics>,
pub config: NodeConfig,
pub overload_info: AuthorityOverloadInfo,
pub validator_tx_finalizer: Option<Arc<ValidatorTxFinalizer<NetworkAuthorityClient>>>,
/* private fields */
}
Fields§
§name: AuthorityName
The name of this authority.
secret: StableSyncAuthoritySigner
The signature key of the authority.
indexes: Option<Arc<IndexStore>>
§rpc_index: Option<Arc<RpcIndexStore>>
§subscription_handler: Arc<SubscriptionHandler>
§checkpoint_store: Arc<CheckpointStore>
§metrics: Arc<AuthorityMetrics>
§config: NodeConfig
§overload_info: AuthorityOverloadInfo
Current overload status in this authority. Updated periodically.
validator_tx_finalizer: Option<Arc<ValidatorTxFinalizer<NetworkAuthorityClient>>>
Implementations§
Source§impl AuthorityState
The authority state encapsulates all state, drives execution, and ensures safety.
impl AuthorityState
The authority state encapsulates all state, drives execution, and ensures safety.
Note the authority operations can be accessed through a read ref (&) and do not require &mut. Internally a database is synchronized through a mutex lock.
Repeating valid commands should produce no changes and return no error.
pub fn is_validator(&self, epoch_store: &AuthorityPerEpochStore) -> bool
pub fn is_fullnode(&self, epoch_store: &AuthorityPerEpochStore) -> bool
pub fn committee_store(&self) -> &Arc<CommitteeStore>
pub fn clone_committee_store(&self) -> Arc<CommitteeStore>
pub fn overload_config(&self) -> &AuthorityOverloadConfig
pub fn get_epoch_state_commitments( &self, epoch: EpochId, ) -> SuiResult<Option<Vec<CheckpointCommitment>>>
Sourcepub async fn handle_transaction(
&self,
epoch_store: &Arc<AuthorityPerEpochStore>,
transaction: VerifiedTransaction,
) -> SuiResult<HandleTransactionResponse>
pub async fn handle_transaction( &self, epoch_store: &Arc<AuthorityPerEpochStore>, transaction: VerifiedTransaction, ) -> SuiResult<HandleTransactionResponse>
Initiate a new transaction.
pub fn check_system_overload_at_signing(&self) -> bool
pub fn check_system_overload_at_execution(&self) -> bool
Sourcepub async fn execute_certificate(
&self,
certificate: &VerifiedCertificate,
epoch_store: &Arc<AuthorityPerEpochStore>,
) -> SuiResult<TransactionEffects>
pub async fn execute_certificate( &self, certificate: &VerifiedCertificate, epoch_store: &Arc<AuthorityPerEpochStore>, ) -> SuiResult<TransactionEffects>
Executes a certificate for its effects.
Sourcepub async fn execute_transaction(
&self,
transaction: &VerifiedExecutableTransaction,
epoch_store: &Arc<AuthorityPerEpochStore>,
) -> SuiResult<TransactionEffects>
pub async fn execute_transaction( &self, transaction: &VerifiedExecutableTransaction, epoch_store: &Arc<AuthorityPerEpochStore>, ) -> SuiResult<TransactionEffects>
Executes a certificate for its effects.
Sourcepub async fn await_transaction_effects(
&self,
digest: TransactionDigest,
epoch_store: &Arc<AuthorityPerEpochStore>,
) -> SuiResult<TransactionEffects>
pub async fn await_transaction_effects( &self, digest: TransactionDigest, epoch_store: &Arc<AuthorityPerEpochStore>, ) -> SuiResult<TransactionEffects>
Awaits the effects of executing a user transaction.
Relies on consensus to enqueue the transaction for execution.
Sourcepub async fn try_execute_immediately(
&self,
certificate: &VerifiedExecutableTransaction,
expected_effects_digest: Option<TransactionEffectsDigest>,
epoch_store: &Arc<AuthorityPerEpochStore>,
) -> SuiResult<(TransactionEffects, Option<ExecutionError>)>
pub async fn try_execute_immediately( &self, certificate: &VerifiedExecutableTransaction, expected_effects_digest: Option<TransactionEffectsDigest>, epoch_store: &Arc<AuthorityPerEpochStore>, ) -> SuiResult<(TransactionEffects, Option<ExecutionError>)>
Internal logic to execute a certificate.
Guarantees that
- If input objects are available, return no permanent failure.
- Execution and output commit are atomic. i.e. outputs are only written to storage, on successful execution; crashed execution has no observable effect and can be retried.
It is caller’s responsibility to ensure input objects are available and locks are set. If this cannot be satisfied by the caller, execute_certificate() should be called instead.
Should only be called within sui-core.
pub fn read_objects_for_execution( &self, tx_lock: &CertLockGuard, certificate: &VerifiedExecutableTransaction, epoch_store: &Arc<AuthorityPerEpochStore>, ) -> SuiResult<InputObjects>
Sourcepub async fn try_execute_for_test(
&self,
certificate: &VerifiedCertificate,
) -> SuiResult<(VerifiedSignedTransactionEffects, Option<ExecutionError>)>
pub async fn try_execute_for_test( &self, certificate: &VerifiedCertificate, ) -> SuiResult<(VerifiedSignedTransactionEffects, Option<ExecutionError>)>
Test only wrapper for try_execute_immediately()
above, useful for checking errors if the
pre-conditions are not satisfied, and executing change epoch transactions.
pub async fn notify_read_effects( &self, digest: TransactionDigest, ) -> SuiResult<TransactionEffects>
pub fn prepare_certificate_for_benchmark( &self, certificate: &VerifiedExecutableTransaction, input_objects: InputObjects, epoch_store: &Arc<AuthorityPerEpochStore>, ) -> SuiResult<(InnerTemporaryStore, TransactionEffects, Option<ExecutionError>)>
pub async fn dry_exec_transaction( &self, transaction: TransactionData, transaction_digest: TransactionDigest, ) -> SuiResult<(DryRunTransactionBlockResponse, BTreeMap<ObjectID, (ObjectRef, Object, WriteKind)>, TransactionEffects, Option<ObjectID>)>
pub fn dry_exec_transaction_for_benchmark( &self, transaction: TransactionData, transaction_digest: TransactionDigest, ) -> SuiResult<(DryRunTransactionBlockResponse, BTreeMap<ObjectID, (ObjectRef, Object, WriteKind)>, TransactionEffects, Option<ObjectID>)>
pub fn simulate_transaction( &self, transaction: TransactionData, ) -> SuiResult<SimulateTransactionResult>
Sourcepub async fn dev_inspect_transaction_block(
&self,
sender: SuiAddress,
transaction_kind: TransactionKind,
gas_price: Option<u64>,
gas_budget: Option<u64>,
gas_sponsor: Option<SuiAddress>,
gas_objects: Option<Vec<ObjectRef>>,
show_raw_txn_data_and_effects: Option<bool>,
skip_checks: Option<bool>,
) -> SuiResult<DevInspectResults>
pub async fn dev_inspect_transaction_block( &self, sender: SuiAddress, transaction_kind: TransactionKind, gas_price: Option<u64>, gas_budget: Option<u64>, gas_sponsor: Option<SuiAddress>, gas_objects: Option<Vec<ObjectRef>>, show_raw_txn_data_and_effects: Option<bool>, skip_checks: Option<bool>, ) -> SuiResult<DevInspectResults>
The object ID for gas can be any object ID, even for an uncreated object
pub fn reference_gas_price_for_testing(&self) -> Result<u64, Error>
pub fn is_tx_already_executed(&self, digest: &TransactionDigest) -> bool
pub fn unixtime_now_ms() -> u64
pub async fn handle_transaction_info_request( &self, request: TransactionInfoRequest, ) -> SuiResult<TransactionInfoResponse>
pub async fn handle_object_info_request( &self, request: ObjectInfoRequest, ) -> SuiResult<ObjectInfoResponse>
pub fn handle_checkpoint_request( &self, request: &CheckpointRequest, ) -> SuiResult<CheckpointResponse>
pub fn handle_checkpoint_request_v2( &self, request: &CheckpointRequestV2, ) -> SuiResult<CheckpointResponseV2>
pub async fn new( name: AuthorityName, secret: StableSyncAuthoritySigner, supported_protocol_versions: SupportedProtocolVersions, store: Arc<AuthorityStore>, execution_cache_trait_pointers: ExecutionCacheTraitPointers, epoch_store: Arc<AuthorityPerEpochStore>, committee_store: Arc<CommitteeStore>, indexes: Option<Arc<IndexStore>>, rpc_index: Option<Arc<RpcIndexStore>>, checkpoint_store: Arc<CheckpointStore>, prometheus_registry: &Registry, genesis_objects: &[Object], db_checkpoint_config: &DBCheckpointConfig, config: NodeConfig, archive_readers: ArchiveReaderBalancer, validator_tx_finalizer: Option<Arc<ValidatorTxFinalizer<NetworkAuthorityClient>>>, chain_identifier: ChainIdentifier, pruner_db: Option<Arc<AuthorityPrunerTables>>, ) -> Arc<Self>
pub fn get_object_cache_reader(&self) -> &Arc<dyn ObjectCacheRead>
pub fn get_transaction_cache_reader(&self) -> &Arc<dyn TransactionCacheRead>
pub fn get_cache_writer(&self) -> &Arc<dyn ExecutionCacheWrite>
pub fn get_backing_store(&self) -> &Arc<dyn BackingStore + Send + Sync>
pub fn get_backing_package_store( &self, ) -> &Arc<dyn BackingPackageStore + Send + Sync>
pub fn get_object_store(&self) -> &Arc<dyn ObjectStore + Send + Sync>
pub fn get_reconfig_api(&self) -> &Arc<dyn ExecutionCacheReconfigAPI>
pub fn get_accumulator_store(&self) -> &Arc<dyn AccumulatorStore>
pub fn get_checkpoint_cache(&self) -> &Arc<dyn CheckpointCache>
pub fn get_state_sync_store(&self) -> &Arc<dyn StateSyncAPI>
pub fn get_cache_commit(&self) -> &Arc<dyn ExecutionCacheCommit>
pub fn database_for_testing(&self) -> Arc<AuthorityStore>
pub async fn prune_checkpoints_for_eligible_epochs_for_testing( &self, config: NodeConfig, metrics: Arc<AuthorityStorePruningMetrics>, ) -> Result<()>
pub fn transaction_manager(&self) -> &Arc<TransactionManager>
Sourcepub fn enqueue_transactions_for_execution(
&self,
txns: Vec<VerifiedExecutableTransaction>,
epoch_store: &Arc<AuthorityPerEpochStore>,
)
pub fn enqueue_transactions_for_execution( &self, txns: Vec<VerifiedExecutableTransaction>, epoch_store: &Arc<AuthorityPerEpochStore>, )
Adds transactions / certificates to transaction manager for ordered execution.
pub fn enqueue_certificates_for_execution( &self, certs: Vec<VerifiedCertificate>, epoch_store: &Arc<AuthorityPerEpochStore>, )
pub fn enqueue_with_expected_effects_digest( &self, certs: Vec<(VerifiedExecutableTransaction, TransactionEffectsDigest)>, epoch_store: &AuthorityPerEpochStore, )
Sourcepub fn execution_lock_for_executable_transaction(
&self,
transaction: &VerifiedExecutableTransaction,
) -> SuiResult<RwLockReadGuard<'_, EpochId>>
pub fn execution_lock_for_executable_transaction( &self, transaction: &VerifiedExecutableTransaction, ) -> SuiResult<RwLockReadGuard<'_, EpochId>>
Attempts to acquire execution lock for an executable transaction. Returns the lock if the transaction is matching current executed epoch Returns None otherwise
Sourcepub fn execution_lock_for_signing(
&self,
) -> SuiResult<RwLockReadGuard<'_, EpochId>>
pub fn execution_lock_for_signing( &self, ) -> SuiResult<RwLockReadGuard<'_, EpochId>>
Acquires the execution lock for the duration of a transaction signing request.
This prevents reconfiguration from starting until we are finished handling the signing request.
Otherwise, in-memory lock state could be cleared (by ObjectLocks::clear_cached_locks
)
while we are attempting to acquire locks for the transaction.
pub async fn execution_lock_for_reconfiguration( &self, ) -> RwLockWriteGuard<'_, EpochId>
pub async fn reconfigure( &self, cur_epoch_store: &AuthorityPerEpochStore, supported_protocol_versions: SupportedProtocolVersions, new_committee: Committee, epoch_start_configuration: EpochStartConfiguration, accumulator: Arc<StateAccumulator>, expensive_safety_check_config: &ExpensiveSafetyCheckConfig, epoch_last_checkpoint: CheckpointSequenceNumber, ) -> SuiResult<Arc<AuthorityPerEpochStore>>
Sourcepub async fn reconfigure_for_testing(&self)
pub async fn reconfigure_for_testing(&self)
Advance the epoch store to the next epoch for testing only. This only manually sets all the places where we have the epoch number. It doesn’t properly reconfigure the node, hence should be only used for testing.
pub fn current_epoch_for_testing(&self) -> EpochId
pub fn checkpoint_all_dbs( &self, checkpoint_path: &Path, cur_epoch_store: &AuthorityPerEpochStore, checkpoint_indexes: bool, ) -> SuiResult
Sourcepub fn load_epoch_store_one_call_per_task(
&self,
) -> Guard<Arc<AuthorityPerEpochStore>>
pub fn load_epoch_store_one_call_per_task( &self, ) -> Guard<Arc<AuthorityPerEpochStore>>
Load the current epoch store. This can change during reconfiguration. To ensure that we never end up accessing different epoch stores in a single task, we need to make sure that this is called once per task. Each call needs to be carefully audited to ensure it is the case. This also means we should minimize the number of call-sites. Only call it when there is no way to obtain it from somewhere else.
pub fn epoch_store_for_testing(&self) -> Guard<Arc<AuthorityPerEpochStore>>
pub fn clone_committee_for_testing(&self) -> Committee
pub async fn get_object(&self, object_id: &ObjectID) -> Option<Object>
pub async fn get_sui_system_package_object_ref(&self) -> SuiResult<ObjectRef>
pub fn get_sui_system_state_object_for_testing( &self, ) -> SuiResult<SuiSystemState>
pub fn get_checkpoint_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> SuiResult<Option<VerifiedCheckpoint>>
pub fn get_transaction_checkpoint_for_tests( &self, digest: &TransactionDigest, epoch_store: &AuthorityPerEpochStore, ) -> SuiResult<Option<VerifiedCheckpoint>>
pub fn get_object_read(&self, object_id: &ObjectID) -> SuiResult<ObjectRead>
Sourcepub fn get_chain_identifier(&self) -> ChainIdentifier
pub fn get_chain_identifier(&self) -> ChainIdentifier
Chain Identifier is the digest of the genesis checkpoint.
pub fn get_move_object<T>(&self, object_id: &ObjectID) -> SuiResult<T>where
T: DeserializeOwned,
Sourcepub fn get_past_object_read(
&self,
object_id: &ObjectID,
version: SequenceNumber,
) -> SuiResult<PastObjectRead>
pub fn get_past_object_read( &self, object_id: &ObjectID, version: SequenceNumber, ) -> SuiResult<PastObjectRead>
This function aims to serve rpc reads on past objects and we don’t expect it to be called for other purposes. Depending on the object pruning policies that will be enforced in the future there is no software-level guarantee/SLA to retrieve an object with an old version even if it exists/existed.
pub fn get_owner_objects( &self, owner: SuiAddress, cursor: Option<ObjectID>, limit: usize, filter: Option<SuiObjectDataFilter>, ) -> SuiResult<Vec<ObjectInfo>>
pub fn get_owned_coins_iterator_with_cursor( &self, owner: SuiAddress, cursor: (String, u64, ObjectID), limit: usize, one_coin_type_only: bool, ) -> SuiResult<impl Iterator<Item = (CoinIndexKey2, CoinInfo)> + '_>
pub fn get_owner_objects_iterator( &self, owner: SuiAddress, cursor: Option<ObjectID>, filter: Option<SuiObjectDataFilter>, ) -> SuiResult<impl Iterator<Item = ObjectInfo> + '_>
pub async fn get_move_objects<T>(
&self,
owner: SuiAddress,
type_: MoveObjectType,
) -> SuiResult<Vec<T>>where
T: DeserializeOwned,
pub fn get_dynamic_fields( &self, owner: ObjectID, cursor: Option<ObjectID>, limit: usize, ) -> SuiResult<Vec<(ObjectID, DynamicFieldInfo)>>
pub fn get_dynamic_field_object_id( &self, owner: ObjectID, name_type: TypeTag, name_bcs_bytes: &[u8], ) -> SuiResult<Option<ObjectID>>
pub fn get_total_transaction_blocks(&self) -> SuiResult<u64>
pub async fn get_executed_transaction_and_effects( &self, digest: TransactionDigest, kv_store: Arc<TransactionKeyValueStore>, ) -> SuiResult<(Transaction, TransactionEffects)>
pub fn multi_get_checkpoint_by_sequence_number( &self, sequence_numbers: &[CheckpointSequenceNumber], ) -> SuiResult<Vec<Option<VerifiedCheckpoint>>>
pub fn get_transaction_events( &self, digest: &TransactionDigest, ) -> SuiResult<TransactionEvents>
pub fn get_transaction_input_objects( &self, effects: &TransactionEffects, ) -> SuiResult<Vec<Object>>
pub fn get_transaction_output_objects( &self, effects: &TransactionEffects, ) -> SuiResult<Vec<Object>>
pub async fn get_transactions_for_tests( self: &Arc<Self>, filter: Option<TransactionFilter>, cursor: Option<TransactionDigest>, limit: Option<usize>, reverse: bool, ) -> SuiResult<Vec<TransactionDigest>>
pub async fn get_transactions( &self, kv_store: &Arc<TransactionKeyValueStore>, filter: Option<TransactionFilter>, cursor: Option<TransactionDigest>, limit: Option<usize>, reverse: bool, ) -> SuiResult<Vec<TransactionDigest>>
pub fn get_checkpoint_store(&self) -> &Arc<CheckpointStore>
pub fn get_latest_checkpoint_sequence_number( &self, ) -> SuiResult<CheckpointSequenceNumber>
pub fn get_checkpoint_summary_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> SuiResult<CheckpointSummary>
pub fn get_checkpoint_summary_by_digest( &self, digest: CheckpointDigest, ) -> SuiResult<CheckpointSummary>
pub fn find_publish_txn_digest( &self, package_id: ObjectID, ) -> SuiResult<TransactionDigest>
pub fn find_genesis_txn_digest(&self) -> SuiResult<TransactionDigest>
pub fn get_verified_checkpoint_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> SuiResult<VerifiedCheckpoint>
pub fn get_verified_checkpoint_summary_by_digest( &self, digest: CheckpointDigest, ) -> SuiResult<VerifiedCheckpoint>
pub fn get_checkpoint_contents( &self, digest: CheckpointContentsDigest, ) -> SuiResult<CheckpointContents>
pub fn get_checkpoint_contents_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber, ) -> SuiResult<CheckpointContents>
pub async fn query_events( &self, kv_store: &Arc<TransactionKeyValueStore>, query: EventFilter, cursor: Option<EventID>, limit: usize, descending: bool, ) -> SuiResult<Vec<SuiEvent>>
pub async fn insert_genesis_object(&self, object: Object)
pub async fn insert_genesis_objects(&self, objects: &[Object])
Sourcepub fn get_transaction_output(
&self,
transaction_digest: &TransactionDigest,
) -> SuiResult<Option<(TransactionEffects, TransactionEvents)>>
pub fn get_transaction_output( &self, transaction_digest: &TransactionDigest, ) -> SuiResult<Option<(TransactionEffects, TransactionEvents)>>
Gets the execution outputs of a transaction if they exist
Sourcepub fn get_transaction_status(
&self,
transaction_digest: &TransactionDigest,
epoch_store: &Arc<AuthorityPerEpochStore>,
) -> SuiResult<Option<(SenderSignedData, TransactionStatus)>>
pub fn get_transaction_status( &self, transaction_digest: &TransactionDigest, epoch_store: &Arc<AuthorityPerEpochStore>, ) -> SuiResult<Option<(SenderSignedData, TransactionStatus)>>
Make a status response for a transaction
Sourcepub fn get_signed_effects_and_maybe_resign(
&self,
transaction_digest: &TransactionDigest,
epoch_store: &Arc<AuthorityPerEpochStore>,
) -> SuiResult<Option<VerifiedSignedTransactionEffects>>
pub fn get_signed_effects_and_maybe_resign( &self, transaction_digest: &TransactionDigest, epoch_store: &Arc<AuthorityPerEpochStore>, ) -> SuiResult<Option<VerifiedSignedTransactionEffects>>
Get the signed effects of the given transaction. If the effects was signed in a previous epoch, re-sign it so that the caller is able to form a cert of the effects in the current epoch.
Sourcepub async fn get_transaction_lock(
&self,
object_ref: &ObjectRef,
epoch_store: &AuthorityPerEpochStore,
) -> SuiResult<Option<VerifiedSignedTransaction>>
pub async fn get_transaction_lock( &self, object_ref: &ObjectRef, epoch_store: &AuthorityPerEpochStore, ) -> SuiResult<Option<VerifiedSignedTransaction>>
Get the TransactionEnvelope that currently locks the given object, if any. Since object locks are only valid for one epoch, we also need the epoch_id in the query. Returns UserInputError::ObjectNotFound if no lock records for the given object can be found. Returns UserInputError::ObjectVersionUnavailableForConsumption if the object record is at a different version. Returns Some(VerifiedEnvelope) if the given ObjectRef is locked by a certain transaction. Returns None if a lock record is initialized for the given ObjectRef but not yet locked by any transaction, or cannot find the transaction in transaction table, because of data race etc.
pub async fn get_objects(&self, objects: &[ObjectID]) -> Vec<Option<Object>>
pub async fn get_object_or_tombstone( &self, object_id: ObjectID, ) -> Option<ObjectRef>
Sourcepub fn set_override_protocol_upgrade_buffer_stake(
&self,
expected_epoch: EpochId,
buffer_stake_bps: u64,
) -> SuiResult
pub fn set_override_protocol_upgrade_buffer_stake( &self, expected_epoch: EpochId, buffer_stake_bps: u64, ) -> SuiResult
Ordinarily, protocol upgrades occur when 2f + 1 + (f * ProtocolConfig::buffer_stake_for_protocol_upgrade_bps) vote for the upgrade.
This method can be used to dynamic adjust the amount of buffer. If set to 0, the upgrade will go through with only 2f+1 votes.
IMPORTANT: If this is used, it must be used on >=2f+1 validators (all should have the same value), or you risk halting the chain.
pub fn clear_override_protocol_upgrade_buffer_stake( &self, expected_epoch: EpochId, ) -> SuiResult
Sourcepub async fn get_available_system_packages(
&self,
binary_config: &BinaryConfig,
) -> Vec<ObjectRef>
pub async fn get_available_system_packages( &self, binary_config: &BinaryConfig, ) -> Vec<ObjectRef>
Get the set of system packages that are compiled in to this build, if those packages are compatible with the current versions of those packages on-chain.
Sourcepub async fn create_and_execute_advance_epoch_tx(
&self,
epoch_store: &Arc<AuthorityPerEpochStore>,
gas_cost_summary: &GasCostSummary,
checkpoint: CheckpointSequenceNumber,
epoch_start_timestamp_ms: CheckpointTimestamp,
end_of_epoch_observation_keys: Vec<ExecutionTimeObservationKey>,
last_checkpoint: CheckpointSequenceNumber,
) -> Result<(SuiSystemState, TransactionEffects)>
pub async fn create_and_execute_advance_epoch_tx( &self, epoch_store: &Arc<AuthorityPerEpochStore>, gas_cost_summary: &GasCostSummary, checkpoint: CheckpointSequenceNumber, epoch_start_timestamp_ms: CheckpointTimestamp, end_of_epoch_observation_keys: Vec<ExecutionTimeObservationKey>, last_checkpoint: CheckpointSequenceNumber, ) -> Result<(SuiSystemState, TransactionEffects)>
Creates and execute the advance epoch transaction to effects without committing it to the database. The effects of the change epoch tx are only written to the database after a certified checkpoint has been formed and executed by CheckpointExecutor.
When a framework upgraded has been decided on, but the validator does not have the new versions of the packages locally, the validator cannot form the ChangeEpochTx. In this case it returns Err, indicating that the checkpoint builder should give up trying to make the final checkpoint. As long as the network is able to create a certified checkpoint (which should be ensured by the capabilities vote), it will arrive via state sync and be executed by CheckpointExecutor.
Sourcepub async fn insert_objects_unsafe_for_testing_only(
&self,
objects: &[Object],
) -> SuiResult
pub async fn insert_objects_unsafe_for_testing_only( &self, objects: &[Object], ) -> SuiResult
NOTE: this function is only to be used for fuzzing and testing. Never use in prod
Trait Implementations§
Source§impl TransactionKeyValueStoreTrait for AuthorityState
impl TransactionKeyValueStoreTrait for AuthorityState
Source§fn multi_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
transactions: &'life1 [TransactionDigest],
effects: &'life2 [TransactionDigest],
) -> Pin<Box<dyn Future<Output = SuiResult<(Vec<Option<Transaction>>, Vec<Option<TransactionEffects>>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn multi_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
transactions: &'life1 [TransactionDigest],
effects: &'life2 [TransactionDigest],
) -> Pin<Box<dyn Future<Output = SuiResult<(Vec<Option<Transaction>>, Vec<Option<TransactionEffects>>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn multi_get_checkpoints<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
checkpoint_summaries: &'life1 [CheckpointSequenceNumber],
checkpoint_contents: &'life2 [CheckpointSequenceNumber],
checkpoint_summaries_by_digest: &'life3 [CheckpointDigest],
) -> Pin<Box<dyn Future<Output = SuiResult<(Vec<Option<CertifiedCheckpointSummary>>, Vec<Option<CheckpointContents>>, Vec<Option<CertifiedCheckpointSummary>>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn multi_get_checkpoints<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
checkpoint_summaries: &'life1 [CheckpointSequenceNumber],
checkpoint_contents: &'life2 [CheckpointSequenceNumber],
checkpoint_summaries_by_digest: &'life3 [CheckpointDigest],
) -> Pin<Box<dyn Future<Output = SuiResult<(Vec<Option<CertifiedCheckpointSummary>>, Vec<Option<CheckpointContents>>, Vec<Option<CertifiedCheckpointSummary>>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn deprecated_get_transaction_checkpoint<'life0, 'async_trait>(
&'life0 self,
digest: TransactionDigest,
) -> Pin<Box<dyn Future<Output = SuiResult<Option<CheckpointSequenceNumber>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_object<'life0, 'async_trait>(
&'life0 self,
object_id: ObjectID,
version: VersionNumber,
) -> Pin<Box<dyn Future<Output = SuiResult<Option<Object>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn multi_get_transaction_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
digests: &'life1 [TransactionDigest],
) -> Pin<Box<dyn Future<Output = SuiResult<Vec<Option<CheckpointSequenceNumber>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn multi_get_events_by_tx_digests<'life0, 'life1, 'async_trait>(
&'life0 self,
digests: &'life1 [TransactionDigest],
) -> Pin<Box<dyn Future<Output = SuiResult<Vec<Option<TransactionEvents>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl !Freeze for AuthorityState
impl !RefUnwindSafe for AuthorityState
impl Send for AuthorityState
impl Sync for AuthorityState
impl Unpin for AuthorityState
impl !UnwindSafe for AuthorityState
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read more§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a Request
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered
].§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.