Skip to content

[DRAFT] chore(framework): Remove the Bridge package and all its functionalities #6863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 30 commits into
base: develop
Choose a base branch
from

Conversation

nonast
Copy link
Contributor

@nonast nonast commented May 14, 2025

[run-ci]

Description of change

Please write a summary of your changes and why you made them.

Links to any relevant issues

fixes #6847

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

How the change has been tested

Describe the tests that you ran to verify your changes.

Make sure to provide instructions for the maintainer as well as any relevant configurations.

  • Basic tests (linting, compilation, formatting, unit/integration tests)
  • Patch-specific tests (correctness, functionality coverage)

Infrastructure QA (only required for crates that are maintained by @iotaledger/infrastructure)

  • Synchronization of the indexer from genesis for a network including migration objects.
  • Restart of indexer synchronization locally without resetting the database.
  • Restart of indexer synchronization on a production-like database.
  • Deployment of services using Docker.
  • Verification of API backward compatibility.

Change checklist

Tick the boxes that are relevant to your changes, and delete any items that are not.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

Release Notes

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • REST API:

Copy link

vercel bot commented May 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
apps-backend ⬜️ Ignored (Inspect) Visit Preview May 20, 2025 1:16pm
apps-ui-kit ⬜️ Ignored (Inspect) Visit Preview May 20, 2025 1:16pm
rebased-explorer ⬜️ Ignored (Inspect) Visit Preview May 20, 2025 1:16pm
wallet-dashboard ⬜️ Ignored (Inspect) Visit Preview May 20, 2025 1:16pm

@nonast nonast self-assigned this May 14, 2025
@github-actions github-actions bot added the ci Issues related to our CI pipeline label May 14, 2025
@iota-ci iota-ci added sc-platform Issues related to the Smart Contract Platform group. vm-language Issues related to the VM & Language Team labels May 14, 2025
@alexsporn alexsporn added this to the v1.3.x - protocol v9 milestone May 19, 2025
@@ -1540,24 +1534,6 @@ pub fn generate_genesis_system_object(
vec![],
)?;

if protocol_config.enable_bridge() {
Copy link
Contributor

@miker83z miker83z May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment for other reviewers:

  • we are safe when removing this here because in both Mainnet and Testnet genesis processes enable_bridge was false

@@ -47,7 +47,6 @@ impl From<ProtocolConfigValue> for IotaProtocolConfigValue {
ProtocolConfigValue::u16(y) => IotaProtocolConfigValue::U16(y),
ProtocolConfigValue::u32(y) => IotaProtocolConfigValue::U32(y),
ProtocolConfigValue::u64(x) => IotaProtocolConfigValue::U64(x),
ProtocolConfigValue::bool(z) => IotaProtocolConfigValue::Bool(z),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this was removed.
@Dkwcs let's try to revert the commit 161fa52

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted

@@ -161,10 +161,6 @@ struct FeatureFlags {
#[serde(skip_serializing_if = "is_false")]
enable_jwk_consensus_updates: bool,

// Enable bridge protocol
#[serde(skip_serializing_if = "is_false")]
bridge: bool,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@muXxer @alexsporn is it safe to be completely removed even though it is not used anymore?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK we can remove protocol feature flags without problems if the snapshot files don't change. And the bridge was never enabled, so the snapshot files should be the same.

@@ -632,16 +632,6 @@ impl From<crate::transaction::EndOfEpochTransactionKind> for EndOfEpochTransacti
.authenticator_obj_initial_shared_version
.value(),
}),
crate::transaction::EndOfEpochTransactionKind::BridgeStateCreate(chain_identifier) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: update the sdk2 repo once this PR is merged

@Dkwcs Dkwcs marked this pull request as ready for review May 19, 2025 16:44
@Dkwcs Dkwcs requested review from luca-moser, lzpap, alexsporn and a team as code owners May 19, 2025 16:44
@Dkwcs Dkwcs marked this pull request as draft May 19, 2025 16:45
Comment on lines -717 to -725
EndOfEpochTransactionKind::BridgeStateCreate(chain_id) => {
assert!(protocol_config.enable_bridge());
builder = setup_bridge_create(builder, chain_id)
}
EndOfEpochTransactionKind::BridgeCommitteeInit(bridge_shared_version) => {
assert!(protocol_config.enable_bridge());
assert!(protocol_config.should_try_to_finalize_bridge_committee());
builder = setup_bridge_committee_update(builder, bridge_shared_version)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment for other reviewers:

  • should be safe to completely remove this without adding a new cut because this transaction Kind was never executed in both Mainnet and Testnet.

@@ -161,10 +161,6 @@ struct FeatureFlags {
#[serde(skip_serializing_if = "is_false")]
enable_jwk_consensus_updates: bool,

// Enable bridge protocol
#[serde(skip_serializing_if = "is_false")]
bridge: bool,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK we can remove protocol feature flags without problems if the snapshot files don't change. And the bridge was never enabled, so the snapshot files should be the same.

/// Whether to try to form bridge committee
// Note: this is not a feature flag because we want to distinguish between
// `None` and `Some(false)`, as committee was already finalized on Testnet.
bridge_should_try_to_finalize_committee: Option<bool>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure we can remove this one.... the snapshot files seem to change. Is this allowed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Issues related to our CI pipeline sc-platform Issues related to the Smart Contract Platform group. vm-language Issues related to the VM & Language Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[framework] Remove the Bridge package and all its functionalities
6 participants