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

feat(settlement): added DRS version to MsgUpdateState #1086

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

keruch
Copy link
Contributor

@keruch keruch commented Sep 19, 2024

PR Standards

This PR implements https://www.notion.so/dymension/DRS-Vulnerability-Recovery-5b42195818264165aa72718e0e173f5b

Closes dymensionxyz/dymension#1207


For Author:

  • Targeted PR against correct branch
  • included the correct type prefix in the PR title
  • Linked to Github issue with discussion and accepted design
  • Targets only one github issue
  • Wrote unit and integration tests
  • All CI checks have passed
  • Added relevant godoc comments

For Reviewer:

  • confirmed the correct type prefix in the PR title
  • Reviewers assigned
  • confirmed all author checklist items have been addressed

After reviewer approval:

  • In case targets main branch, PR should be squashed and merged.
  • In case PR targets a release branch, PR should be rebased.

@keruch keruch self-assigned this Sep 19, 2024
@keruch keruch requested a review from a team as a code owner September 19, 2024 16:03
@@ -502,6 +503,7 @@ func (c *Client) convertBatchToMsgUpdateState(batch *types.Batch, daResult *da.R
DAPath: daResult.SubmitMetaData.ToPath(),
BDs: rollapptypes.BlockDescriptors{BD: blockDescriptors},
Last: batch.LastBatch,
DrsVersion: version.Commit,
Copy link
Contributor

Choose a reason for hiding this comment

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

@keruch where is this value validated across the L2?
what prevents the sequencer from lying?

Copy link
Contributor

Choose a reason for hiding this comment

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

I see that each node validates his own version vs the rollapp params

if version.Commit != m.State.RollappParams.Version {
    return fmt.Errorf("binary version mismatch. rollapp param: %s binary used:%s", m.State.RollappParams.Version, version.Commit)
}

but I don't see where it's validated in regard with the state updates.

let's assume L2 runs version 8.
but the sequencer sets DrsVersion: 9 in the state update (e.g to bypass the DRS check)

Copy link
Contributor

Choose a reason for hiding this comment

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

@danwt as discussed, this scenario should be fraud provable
pls link the related research/ADR/issue

@mtsitrin mtsitrin merged commit f3e6bfe into main Sep 25, 2024
7 checks passed
@mtsitrin mtsitrin deleted the kirill/1021-delayedack-dos branch September 25, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DRS Vulnerability recovery at scale - Impl
3 participants