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
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ anemo-build = { git = "https://github.com/mystenlabs/anemo.git", rev = "dbb5a074
anemo-tower = { git = "https://github.com/mystenlabs/anemo.git", rev = "dbb5a074c2d25660525ab5d36d65ff0cb8051949" }

# core-types with json format for REST api
iota-sdk2 = { package = "iota-rust-sdk", git = "ssh://[email protected]/iotaledger/iota-rust-sdk.git", rev = "2beb281b535ec78f6a4f88ced02ae3d8540eb318", features = ["hash", "serde", "schemars"] }
iota-sdk2 = { package = "iota-rust-sdk", git = "ssh://[email protected]/iotaledger/iota-rust-sdk.git", rev = "014c8880820fbeab1a47552939facc275116a0a5", features = ["hash", "serde", "schemars"] }

### Workspace Members ###
bin-version = { path = "crates/bin-version" }
Expand Down
35 changes: 6 additions & 29 deletions crates/iota-core/src/authority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -883,14 +883,12 @@ impl AuthorityState {
&self.metrics.bytecode_verifier_metrics,
)?;

if epoch_store.coin_deny_list_v2_enabled() {
check_coin_deny_list_v2_during_signing(
tx_data.sender(),
&checked_input_objects,
&receiving_objects,
&self.get_object_store(),
)?;
}
check_coin_deny_list_v2_during_signing(
tx_data.sender(),
&checked_input_objects,
&receiving_objects,
&self.get_object_store(),
)?;

let owned_objects = checked_input_objects.inner().filter_owned_objects();

Expand Down Expand Up @@ -4678,24 +4676,6 @@ impl AuthorityState {
Some(tx)
}

#[instrument(level = "debug", skip_all)]
fn create_deny_list_state_tx(
&self,
epoch_store: &Arc<AuthorityPerEpochStore>,
) -> Option<EndOfEpochTransactionKind> {
if !epoch_store.protocol_config().enable_coin_deny_list_v2() {
return None;
}

if epoch_store.coin_deny_list_state_exists() {
return None;
}

let tx = EndOfEpochTransactionKind::new_deny_list_state_create();
info!("Creating DenyListStateCreate tx");
Some(tx)
}

/// 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
Expand Down Expand Up @@ -4727,9 +4707,6 @@ impl AuthorityState {
if let Some(tx) = self.init_bridge_committee_tx(epoch_store) {
txns.push(tx);
}
if let Some(tx) = self.create_deny_list_state_tx(epoch_store) {
txns.push(tx);
}

let next_epoch = epoch_store.epoch() + 1;

Expand Down
4 changes: 0 additions & 4 deletions crates/iota-core/src/authority/authority_per_epoch_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1001,10 +1001,6 @@ impl AuthorityPerEpochStore {
.is_some()
}

pub fn coin_deny_list_v2_enabled(&self) -> bool {
self.protocol_config().enable_coin_deny_list_v2() && self.coin_deny_list_state_exists()
}

pub fn bridge_exists(&self) -> bool {
self.epoch_start_configuration
.bridge_obj_initial_shared_version()
Expand Down
4 changes: 1 addition & 3 deletions crates/iota-core/tests/staged/iota.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,10 @@ EndOfEpochTransactionKind:
NEWTYPE:
TYPENAME: AuthenticatorStateExpire
3:
DenyListStateCreate: UNIT
4:
BridgeStateCreate:
NEWTYPE:
TYPENAME: ChainIdentifier
5:
4:
BridgeCommitteeInit:
NEWTYPE:
TYPENAME: SequenceNumber
Expand Down
22 changes: 9 additions & 13 deletions crates/iota-genesis-builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,7 @@ impl Builder {
unsigned_genesis.has_bridge_object()
);

assert_eq!(
protocol_config.enable_coin_deny_list_v2(),
unsigned_genesis.has_coin_deny_list_object(),
);
assert!(unsigned_genesis.has_coin_deny_list_object());

assert_eq!(
self.validators.len(),
Expand Down Expand Up @@ -1425,15 +1422,14 @@ pub fn generate_genesis_system_object(
vec![],
)?;

if protocol_config.enable_coin_deny_list_v2() {
builder.move_call(
IOTA_FRAMEWORK_PACKAGE_ID,
DENY_LIST_MODULE.to_owned(),
DENY_LIST_CREATE_FUNC.to_owned(),
vec![],
vec![],
)?;
}
// Create the deny list
builder.move_call(
IOTA_FRAMEWORK_PACKAGE_ID,
DENY_LIST_MODULE.to_owned(),
DENY_LIST_CREATE_FUNC.to_owned(),
vec![],
vec![],
)?;

if protocol_config.enable_bridge() {
let bridge_uid = builder
Expand Down
9 changes: 1 addition & 8 deletions crates/iota-graphql-rpc/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -663,13 +663,6 @@ type CoinConnection {
nodes: [Coin!]!
}

type CoinDenyListStateCreateTransaction {
"""
A workaround to define an empty variant of a GraphQL union.
"""
_: Boolean
}

"""
An edge in a connection.
"""
Expand Down Expand Up @@ -1050,7 +1043,7 @@ type EndOfEpochTransaction {
transactions(first: Int, before: String, last: Int, after: String): EndOfEpochTransactionKindConnection!
}

union EndOfEpochTransactionKind = ChangeEpochTransaction | AuthenticatorStateCreateTransaction | AuthenticatorStateExpireTransaction | CoinDenyListStateCreateTransaction | BridgeStateCreateTransaction | BridgeCommitteeInitTransaction
union EndOfEpochTransactionKind = ChangeEpochTransaction | AuthenticatorStateCreateTransaction | AuthenticatorStateExpireTransaction | BridgeStateCreateTransaction | BridgeCommitteeInitTransaction

type EndOfEpochTransactionKindConnection {
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ pub(crate) enum EndOfEpochTransactionKind {
ChangeEpoch(ChangeEpochTransaction),
AuthenticatorStateCreate(AuthenticatorStateCreateTransaction),
AuthenticatorStateExpire(AuthenticatorStateExpireTransaction),
CoinDenyListStateCreate(CoinDenyListStateCreateTransaction),
BridgeStateCreate(BridgeStateCreateTransaction),
BridgeCommitteeInit(BridgeCommitteeInitTransaction),
}
Expand All @@ -72,13 +71,6 @@ pub(crate) struct AuthenticatorStateExpireTransaction {
pub checkpoint_viewed_at: u64,
}

#[derive(SimpleObject, Clone, PartialEq, Eq)]
pub(crate) struct CoinDenyListStateCreateTransaction {
/// A workaround to define an empty variant of a GraphQL union.
#[graphql(name = "_")]
dummy: Option<bool>,
}

#[derive(Clone, PartialEq, Eq)]
pub(crate) struct BridgeStateCreateTransaction {
pub native: IotaChainIdentifier,
Expand Down Expand Up @@ -285,9 +277,6 @@ impl EndOfEpochTransactionKind {
checkpoint_viewed_at,
})
}
N::DenyListStateCreate => {
K::CoinDenyListStateCreate(CoinDenyListStateCreateTransaction { dummy: None })
}
N::BridgeStateCreate(chain_id) => K::BridgeStateCreate(BridgeStateCreateTransaction {
native: chain_id,
checkpoint_viewed_at,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -667,13 +667,6 @@ type CoinConnection {
nodes: [Coin!]!
}

type CoinDenyListStateCreateTransaction {
"""
A workaround to define an empty variant of a GraphQL union.
"""
_: Boolean
}

"""
An edge in a connection.
"""
Expand Down Expand Up @@ -1054,7 +1047,7 @@ type EndOfEpochTransaction {
transactions(first: Int, before: String, last: Int, after: String): EndOfEpochTransactionKindConnection!
}

union EndOfEpochTransactionKind = ChangeEpochTransaction | AuthenticatorStateCreateTransaction | AuthenticatorStateExpireTransaction | CoinDenyListStateCreateTransaction | BridgeStateCreateTransaction | BridgeCommitteeInitTransaction
union EndOfEpochTransactionKind = ChangeEpochTransaction | AuthenticatorStateCreateTransaction | AuthenticatorStateExpireTransaction | BridgeStateCreateTransaction | BridgeCommitteeInitTransaction

type EndOfEpochTransactionKindConnection {
"""
Expand Down
7 changes: 0 additions & 7 deletions crates/iota-json-rpc-types/src/iota_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,6 @@ impl IotaTransactionBlockKind {
},
)
}
EndOfEpochTransactionKind::DenyListStateCreate => {
IotaEndOfEpochTransactionKind::CoinDenyListStateCreate
}
EndOfEpochTransactionKind::BridgeStateCreate(chain_id) => {
IotaEndOfEpochTransactionKind::BridgeStateCreate(
(*chain_id.as_bytes()).into(),
Expand Down Expand Up @@ -615,9 +612,6 @@ impl IotaTransactionBlockKind {
},
)
}
EndOfEpochTransactionKind::DenyListStateCreate => {
IotaEndOfEpochTransactionKind::CoinDenyListStateCreate
}
EndOfEpochTransactionKind::BridgeStateCreate(id) => {
IotaEndOfEpochTransactionKind::BridgeStateCreate(
(*id.as_bytes()).into(),
Expand Down Expand Up @@ -1627,7 +1621,6 @@ pub enum IotaEndOfEpochTransactionKind {
ChangeEpoch(IotaChangeEpoch),
AuthenticatorStateCreate,
AuthenticatorStateExpire(IotaAuthenticatorStateExpire),
CoinDenyListStateCreate,
BridgeStateCreate(CheckpointDigest),
BridgeCommitteeUpdate(SequenceNumber),
}
Expand Down
4 changes: 1 addition & 3 deletions crates/iota-open-rpc/spec/openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,6 @@
"authority_capabilities_v2": true,
"bridge": false,
"disable_invariant_violation_check_in_swap_loc": true,
"enable_coin_deny_list_v2": true,
"enable_group_ops_native_function_msm": true,
"enable_group_ops_native_functions": true,
"enable_jwk_consensus_updates": false,
Expand Down Expand Up @@ -7640,8 +7639,7 @@
{
"type": "string",
"enum": [
"AuthenticatorStateCreate",
"CoinDenyListStateCreate"
"AuthenticatorStateCreate"
]
},
{
Expand Down
10 changes: 0 additions & 10 deletions crates/iota-protocol-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,6 @@ struct FeatureFlags {
#[serde(skip_serializing_if = "Option::is_none")]
mysticeti_num_leaders_per_round: Option<usize>,

// If true, enable the coin deny list V2.
#[serde(skip_serializing_if = "is_false")]
enable_coin_deny_list_v2: bool,

// Enable passkey auth (SIP-9)
#[serde(skip_serializing_if = "is_false")]
passkey_auth: bool,
Expand Down Expand Up @@ -1056,10 +1052,6 @@ impl ProtocolConfig {
self.feature_flags.enable_poseidon
}

pub fn enable_coin_deny_list_v2(&self) -> bool {
self.feature_flags.enable_coin_deny_list_v2
}

pub fn enable_group_ops_native_functions(&self) -> bool {
self.feature_flags.enable_group_ops_native_functions
}
Expand Down Expand Up @@ -1685,8 +1677,6 @@ impl ProtocolConfig {

cfg.feature_flags.mysticeti_num_leaders_per_round = Some(1);

cfg.feature_flags.enable_coin_deny_list_v2 = true;

cfg.feature_flags.per_object_congestion_control_mode =
PerObjectCongestionControlMode::TotalTxCount;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ feature_flags:
zklogin_max_epoch_upper_bound_delta: 30
mysticeti_leader_scoring_and_schedule: true
mysticeti_num_leaders_per_round: 1
enable_coin_deny_list_v2: true
rethrow_serialization_type_layout_errors: true
max_tx_size_bytes: 131072
max_input_objects: 2048
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ feature_flags:
zklogin_max_epoch_upper_bound_delta: 30
mysticeti_leader_scoring_and_schedule: true
mysticeti_num_leaders_per_round: 1
enable_coin_deny_list_v2: true
rethrow_serialization_type_layout_errors: true
max_tx_size_bytes: 131072
max_input_objects: 2048
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ feature_flags:
mysticeti_leader_scoring_and_schedule: true
enable_vdf: true
mysticeti_num_leaders_per_round: 1
enable_coin_deny_list_v2: true
passkey_auth: true
authority_capabilities_v2: true
rethrow_serialization_type_layout_errors: true
Expand Down
14 changes: 0 additions & 14 deletions crates/iota-rest-api/openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1962,20 +1962,6 @@
}
}
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"deny_list_state_create"
]
}
}
},
{
"type": "object",
"required": [
Expand Down
14 changes: 0 additions & 14 deletions crates/iota-types/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ pub enum EndOfEpochTransactionKind {
ChangeEpoch(ChangeEpoch),
AuthenticatorStateCreate,
AuthenticatorStateExpire(AuthenticatorStateExpire),
DenyListStateCreate,
BridgeStateCreate(ChainIdentifier),
BridgeCommitteeInit(SequenceNumber),
}
Expand Down Expand Up @@ -340,10 +339,6 @@ impl EndOfEpochTransactionKind {
Self::AuthenticatorStateCreate
}

pub fn new_deny_list_state_create() -> Self {
Self::DenyListStateCreate
}

pub fn new_bridge_create(chain_identifier: ChainIdentifier) -> Self {
Self::BridgeStateCreate(chain_identifier)
}
Expand All @@ -369,7 +364,6 @@ impl EndOfEpochTransactionKind {
mutable: true,
}]
}
Self::DenyListStateCreate => vec![],
Self::BridgeStateCreate(_) => vec![],
Self::BridgeCommitteeInit(bridge_version) => vec![
InputObjectKind::SharedMoveObject {
Expand Down Expand Up @@ -400,7 +394,6 @@ impl EndOfEpochTransactionKind {
.into_iter(),
),
Self::AuthenticatorStateCreate => Either::Right(iter::empty()),
Self::DenyListStateCreate => Either::Right(iter::empty()),
Self::BridgeStateCreate(_) => Either::Right(iter::empty()),
Self::BridgeCommitteeInit(bridge_version) => Either::Left(
vec![
Expand All @@ -426,13 +419,6 @@ impl EndOfEpochTransactionKind {
));
}
}
Self::DenyListStateCreate => {
if !config.enable_coin_deny_list_v2() {
return Err(UserInputError::Unsupported(
"coin deny list not enabled".to_string(),
));
}
}
Self::BridgeStateCreate(_) => {
if !config.enable_bridge() {
return Err(UserInputError::Unsupported(
Expand Down
Loading
Loading