Skip to content

Commit cab4274

Browse files
authored
sui-rpc,sui-sdk-types: rename shared -> consensus (#131)
1 parent 2b37ade commit cab4274

File tree

16 files changed

+204
-201
lines changed

16 files changed

+204
-201
lines changed
33 Bytes
Binary file not shown.

crates/sui-rpc/src/proto/generated/sui.rpc.v2beta2.field_info.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -402,11 +402,11 @@ mod _field_impls {
402402
number: 12i32,
403403
message_fields: Some(ChangedObject::FIELDS),
404404
};
405-
pub const UNCHANGED_SHARED_OBJECTS_FIELD: &'static MessageField = &MessageField {
406-
name: "unchanged_shared_objects",
407-
json_name: "unchangedSharedObjects",
405+
pub const UNCHANGED_CONSENSUS_OBJECTS_FIELD: &'static MessageField = &MessageField {
406+
name: "unchanged_consensus_objects",
407+
json_name: "unchangedConsensusObjects",
408408
number: 13i32,
409-
message_fields: Some(UnchangedSharedObject::FIELDS),
409+
message_fields: Some(UnchangedConsensusObject::FIELDS),
410410
};
411411
pub const AUXILIARY_DATA_DIGEST_FIELD: &'static MessageField = &MessageField {
412412
name: "auxiliary_data_digest",
@@ -429,7 +429,7 @@ mod _field_impls {
429429
Self::DEPENDENCIES_FIELD,
430430
Self::LAMPORT_VERSION_FIELD,
431431
Self::CHANGED_OBJECTS_FIELD,
432-
Self::UNCHANGED_SHARED_OBJECTS_FIELD,
432+
Self::UNCHANGED_CONSENSUS_OBJECTS_FIELD,
433433
Self::AUXILIARY_DATA_DIGEST_FIELD,
434434
];
435435
}
@@ -516,7 +516,7 @@ mod _field_impls {
516516
Self::OBJECT_TYPE_FIELD,
517517
];
518518
}
519-
impl UnchangedSharedObject {
519+
impl UnchangedConsensusObject {
520520
pub const KIND_FIELD: &'static MessageField = &MessageField {
521521
name: "kind",
522522
json_name: "kind",
@@ -548,7 +548,7 @@ mod _field_impls {
548548
message_fields: None,
549549
};
550550
}
551-
impl MessageFields for UnchangedSharedObject {
551+
impl MessageFields for UnchangedConsensusObject {
552552
const FIELDS: &'static [&'static MessageField] = &[
553553
Self::KIND_FIELD,
554554
Self::OBJECT_ID_FIELD,

crates/sui-rpc/src/proto/generated/sui.rpc.v2beta2.rs

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,12 @@ pub struct TransactionEffects {
314314
/// Objects whose state are changed by this transaction.
315315
#[prost(message, repeated, tag = "12")]
316316
pub changed_objects: ::prost::alloc::vec::Vec<ChangedObject>,
317-
/// Shared objects that are not mutated in this transaction. Unlike owned objects,
318-
/// read-only shared objects' version are not committed in the transaction,
317+
/// Consensus objects that are not mutated in this transaction. Unlike owned objects,
318+
/// read-only consensus objects' version are not committed in the transaction,
319319
/// and in order for a node to catch up and execute it without consensus sequencing,
320320
/// the version needs to be committed in the effects.
321321
#[prost(message, repeated, tag = "13")]
322-
pub unchanged_shared_objects: ::prost::alloc::vec::Vec<UnchangedSharedObject>,
322+
pub unchanged_consensus_objects: ::prost::alloc::vec::Vec<UnchangedConsensusObject>,
323323
/// Auxiliary data that are not protocol-critical, generated as part of the effects but are stored separately.
324324
/// Storing it separately allows us to avoid bloating the effects with data that are not critical.
325325
/// It also provides more flexibility on the format and type of the data.
@@ -488,31 +488,31 @@ pub mod changed_object {
488488
}
489489
}
490490
}
491-
/// A shared object that wasn't changed during execution.
491+
/// A consensus object that wasn't changed during execution.
492492
#[derive(Clone, PartialEq, ::prost::Message)]
493-
pub struct UnchangedSharedObject {
493+
pub struct UnchangedConsensusObject {
494494
#[prost(
495-
enumeration = "unchanged_shared_object::UnchangedSharedObjectKind",
495+
enumeration = "unchanged_consensus_object::UnchangedConsensusObjectKind",
496496
optional,
497497
tag = "1"
498498
)]
499499
pub kind: ::core::option::Option<i32>,
500-
/// ObjectId of the shared object.
500+
/// ObjectId of the consensus object.
501501
#[prost(string, optional, tag = "2")]
502502
pub object_id: ::core::option::Option<::prost::alloc::string::String>,
503-
/// Version of the shared object.
503+
/// Version of the consensus object.
504504
#[prost(uint64, optional, tag = "3")]
505505
pub version: ::core::option::Option<u64>,
506-
/// Digest of the shared object.
506+
/// Digest of the consensus object.
507507
#[prost(string, optional, tag = "4")]
508508
pub digest: ::core::option::Option<::prost::alloc::string::String>,
509509
/// Type information is not provided by the effects structure but is instead
510510
/// provided by an indexing layer
511511
#[prost(string, optional, tag = "5")]
512512
pub object_type: ::core::option::Option<::prost::alloc::string::String>,
513513
}
514-
/// Nested message and enum types in `UnchangedSharedObject`.
515-
pub mod unchanged_shared_object {
514+
/// Nested message and enum types in `UnchangedConsensusObject`.
515+
pub mod unchanged_consensus_object {
516516
#[derive(
517517
Clone,
518518
Copy,
@@ -525,9 +525,9 @@ pub mod unchanged_shared_object {
525525
::prost::Enumeration
526526
)]
527527
#[repr(i32)]
528-
pub enum UnchangedSharedObjectKind {
528+
pub enum UnchangedConsensusObjectKind {
529529
Unknown = 0,
530-
/// Read-only shared object from the input.
530+
/// Read-only consensus object from the input.
531531
ReadOnlyRoot = 1,
532532
/// Objects with ended consensus streams that appear mutably/owned in the input.
533533
MutateConsensusStreamEnded = 2,
@@ -541,14 +541,14 @@ pub mod unchanged_shared_object {
541541
/// object at the start of the epoch.
542542
PerEpochConfig = 5,
543543
}
544-
impl UnchangedSharedObjectKind {
544+
impl UnchangedConsensusObjectKind {
545545
/// String value of the enum field names used in the ProtoBuf definition.
546546
///
547547
/// The values are not transformed in any way and thus are considered stable
548548
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
549549
pub fn as_str_name(&self) -> &'static str {
550550
match self {
551-
Self::Unknown => "UNCHANGED_SHARED_OBJECT_KIND_UNKNOWN",
551+
Self::Unknown => "UNCHANGED_CONSENSUS_OBJECT_KIND_UNKNOWN",
552552
Self::ReadOnlyRoot => "READ_ONLY_ROOT",
553553
Self::MutateConsensusStreamEnded => "MUTATE_CONSENSUS_STREAM_ENDED",
554554
Self::ReadConsensusStreamEnded => "READ_CONSENSUS_STREAM_ENDED",
@@ -559,7 +559,7 @@ pub mod unchanged_shared_object {
559559
/// Creates an enum from field names used in the ProtoBuf definition.
560560
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
561561
match value {
562-
"UNCHANGED_SHARED_OBJECT_KIND_UNKNOWN" => Some(Self::Unknown),
562+
"UNCHANGED_CONSENSUS_OBJECT_KIND_UNKNOWN" => Some(Self::Unknown),
563563
"READ_ONLY_ROOT" => Some(Self::ReadOnlyRoot),
564564
"MUTATE_CONSENSUS_STREAM_ENDED" => Some(Self::MutateConsensusStreamEnded),
565565
"READ_CONSENSUS_STREAM_ENDED" => Some(Self::ReadConsensusStreamEnded),
@@ -815,12 +815,12 @@ pub mod execution_error {
815815
CertificateDenied = 30,
816816
/// Sui Move bytecode verification timed out.
817817
SuiMoveVerificationTimedout = 31,
818-
/// The requested shared object operation is not allowed.
819-
SharedObjectOperationNotAllowed = 32,
820-
/// Requested shared object has been deleted.
818+
/// The requested consensus object operation is not allowed.
819+
ConsensusObjectOperationNotAllowed = 32,
820+
/// Requested consensus object has been deleted.
821821
InputObjectDeleted = 33,
822-
/// Certificate is canceled due to congestion on shared objects.
823-
ExecutionCanceledDueToSharedObjectCongestion = 34,
822+
/// Certificate is canceled due to congestion on consensus objects.
823+
ExecutionCanceledDueToConsensusObjectCongestion = 34,
824824
/// Address is denied for this coin type.
825825
AddressDeniedForCoin = 35,
826826
/// Coin type is globally paused for use.
@@ -878,12 +878,12 @@ pub mod execution_error {
878878
Self::WrittenObjectsTooLarge => "WRITTEN_OBJECTS_TOO_LARGE",
879879
Self::CertificateDenied => "CERTIFICATE_DENIED",
880880
Self::SuiMoveVerificationTimedout => "SUI_MOVE_VERIFICATION_TIMEDOUT",
881-
Self::SharedObjectOperationNotAllowed => {
882-
"SHARED_OBJECT_OPERATION_NOT_ALLOWED"
881+
Self::ConsensusObjectOperationNotAllowed => {
882+
"CONSENSUS_OBJECT_OPERATION_NOT_ALLOWED"
883883
}
884884
Self::InputObjectDeleted => "INPUT_OBJECT_DELETED",
885-
Self::ExecutionCanceledDueToSharedObjectCongestion => {
886-
"EXECUTION_CANCELED_DUE_TO_SHARED_OBJECT_CONGESTION"
885+
Self::ExecutionCanceledDueToConsensusObjectCongestion => {
886+
"EXECUTION_CANCELED_DUE_TO_CONSENSUS_OBJECT_CONGESTION"
887887
}
888888
Self::AddressDeniedForCoin => "ADDRESS_DENIED_FOR_COIN",
889889
Self::CoinTypeGlobalPause => "COIN_TYPE_GLOBAL_PAUSE",
@@ -942,12 +942,12 @@ pub mod execution_error {
942942
"SUI_MOVE_VERIFICATION_TIMEDOUT" => {
943943
Some(Self::SuiMoveVerificationTimedout)
944944
}
945-
"SHARED_OBJECT_OPERATION_NOT_ALLOWED" => {
946-
Some(Self::SharedObjectOperationNotAllowed)
945+
"CONSENSUS_OBJECT_OPERATION_NOT_ALLOWED" => {
946+
Some(Self::ConsensusObjectOperationNotAllowed)
947947
}
948948
"INPUT_OBJECT_DELETED" => Some(Self::InputObjectDeleted),
949-
"EXECUTION_CANCELED_DUE_TO_SHARED_OBJECT_CONGESTION" => {
950-
Some(Self::ExecutionCanceledDueToSharedObjectCongestion)
949+
"EXECUTION_CANCELED_DUE_TO_CONSENSUS_OBJECT_CONGESTION" => {
950+
Some(Self::ExecutionCanceledDueToConsensusObjectCongestion)
951951
}
952952
"ADDRESS_DENIED_FOR_COIN" => Some(Self::AddressDeniedForCoin),
953953
"COIN_TYPE_GLOBAL_PAUSE" => Some(Self::CoinTypeGlobalPause),
@@ -1135,9 +1135,9 @@ pub mod command_argument_error {
11351135
InvalidObjectByValue = 10,
11361136
/// Immutable objects cannot be passed by mutable reference, `&mut`.
11371137
InvalidObjectByMutRef = 11,
1138-
/// Shared object operations such as wrapping, freezing, or converting to owned are not
1138+
/// Consensus object operations such as wrapping, freezing, or converting to owned are not
11391139
/// allowed.
1140-
SharedObjectOperationNotAllowed = 12,
1140+
ConsensusObjectOperationNotAllowed = 12,
11411141
/// Invalid argument arity. Expected a single argument but found a result that expanded to
11421142
/// multiple arguments.
11431143
InvalidArgumentArity = 13,
@@ -1163,8 +1163,8 @@ pub mod command_argument_error {
11631163
Self::InvalidValueUsage => "INVALID_VALUE_USAGE",
11641164
Self::InvalidObjectByValue => "INVALID_OBJECT_BY_VALUE",
11651165
Self::InvalidObjectByMutRef => "INVALID_OBJECT_BY_MUT_REF",
1166-
Self::SharedObjectOperationNotAllowed => {
1167-
"SHARED_OBJECT_OPERATION_NOT_ALLOWED"
1166+
Self::ConsensusObjectOperationNotAllowed => {
1167+
"CONSENSUS_OBJECT_OPERATION_NOT_ALLOWED"
11681168
}
11691169
Self::InvalidArgumentArity => "INVALID_ARGUMENT_ARITY",
11701170
}
@@ -1188,8 +1188,8 @@ pub mod command_argument_error {
11881188
"INVALID_VALUE_USAGE" => Some(Self::InvalidValueUsage),
11891189
"INVALID_OBJECT_BY_VALUE" => Some(Self::InvalidObjectByValue),
11901190
"INVALID_OBJECT_BY_MUT_REF" => Some(Self::InvalidObjectByMutRef),
1191-
"SHARED_OBJECT_OPERATION_NOT_ALLOWED" => {
1192-
Some(Self::SharedObjectOperationNotAllowed)
1191+
"CONSENSUS_OBJECT_OPERATION_NOT_ALLOWED" => {
1192+
Some(Self::ConsensusObjectOperationNotAllowed)
11931193
}
11941194
"INVALID_ARGUMENT_ARITY" => Some(Self::InvalidArgumentArity),
11951195
_ => None,
@@ -6488,7 +6488,7 @@ pub struct ConsensusCommitPrologue {
64886488
/// Present in V3, V4.
64896489
#[prost(uint64, optional, tag = "5")]
64906490
pub sub_dag_index: ::core::option::Option<u64>,
6491-
/// Stores consensus handler determined shared object version assignments.
6491+
/// Stores consensus handler determined consensus object version assignments.
64926492
///
64936493
/// Present in V3, V4.
64946494
#[prost(message, optional, tag = "6")]

0 commit comments

Comments
 (0)