Skip to content
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

Commitment mechanism change #343

Merged

Conversation

dusannosovic-ethernal
Copy link

@dusannosovic-ethernal dusannosovic-ethernal commented Aug 27, 2024

Description

This PR introduces the following changes:

  1. Validator Set Changes: Validator set changes are now sent as state transactions to the BridgeStorage contract at the end of each epoch.
  2. Batch Transactions: Batches are sent as state transactions to the BridgeStorage contract at the end of each sprint.
  3. Signature Mechanism Update: The signature mechanism has been updated so that validators now sign batches.

BridgeMessageStore Bucket Organization Changes:

bridgeMsgEvents

  • chainId/ → bridgeMessageEvent.Id/ → *BridgeMsgEvent (JSON marshalled)

bridgeBatch

  • chainId/ → bridgeBatches.Message[last].Id/ → *BridgeBatchSigned (JSON marshalled)

relayerEvents

  • chainId/ → RelayerEventData.EventID/ → *RelayerEventData (JSON marshalled)

Struct Name Changes:

  • PendingCommitment → PendingBridgeBatch
  • CommitmentMessageSigned → BridgeBatchSigned

File Name Changes:

  • state_sync_manager.go → bridge_events_manager.go
  • state_sync_commitment.go → bridge_batch.go
  • state_sync_state_store.go → state_sync_bridge_store.go

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

consensus/polybft/bridge_batch.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_batch.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_batch.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_batch.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_batch.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_event_manager.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_event_manager.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_event_manager.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_event_manager.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_event_manager.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_batch.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_batch_test.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_batch_test.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_manager.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_manager.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_manager.go Show resolved Hide resolved
consensus/polybft/bridge_manager.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_event_manager.go Show resolved Hide resolved
consensus/polybft/bridge_event_manager.go Show resolved Hide resolved
consensus/polybft/bridge_event_manager.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_event_manager.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_event_manager.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_event_manager.go Show resolved Hide resolved
consensus/polybft/bridge_event_manager.go Show resolved Hide resolved
consensus/polybft/state_store_epoch.go Outdated Show resolved Hide resolved
consensus/polybft/system_state.go Outdated Show resolved Hide resolved
consensus/polybft/system_state.go Outdated Show resolved Hide resolved
consensus/polybft/system_state.go Outdated Show resolved Hide resolved
consensus/polybft/system_state.go Outdated Show resolved Hide resolved
consensus/polybft/state_store_epoch.go Show resolved Hide resolved
consensus/polybft/state_store_epoch.go Show resolved Hide resolved
consensus/polybft/state_store_epoch.go Show resolved Hide resolved
consensus/polybft/state_store_epoch.go Show resolved Hide resolved
@oliverbundalo oliverbundalo self-requested a review August 30, 2024 14:50
@dusannosovic-ethernal dusannosovic-ethernal self-assigned this Sep 2, 2024
consensus/polybft/bridge_batch.go Show resolved Hide resolved
consensus/polybft/bridge_batch.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_batch.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_batch.go Show resolved Hide resolved
consensus/polybft/bridge_batch.go Outdated Show resolved Hide resolved
consensus/polybft/bridge_manager.go Show resolved Hide resolved
consensus/polybft/bridge_manager.go Outdated Show resolved Hide resolved
consensus/polybft/state_store_bridge_message.go Outdated Show resolved Hide resolved
consensus/polybft/state_sync_relayer.go Show resolved Hide resolved
@dusannosovic-ethernal dusannosovic-ethernal merged commit 495b1fd into feat/bridge Sep 2, 2024
9 of 10 checks passed
@goran-ethernal goran-ethernal deleted the BLADE-208-change-commitment-mechanism branch September 2, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants