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

fix: da handling & da status enum #181

Merged
merged 17 commits into from
Jan 29, 2025
Merged

fix: da handling & da status enum #181

merged 17 commits into from
Jan 29, 2025

Conversation

Senna46
Copy link
Contributor

@Senna46 Senna46 commented Jan 23, 2025

Overview

Fix some test
Implement enum for DA published data status

// PublishedDataStatus
enum Status {
  // Default value
  STATUS_UNSPECIFIED = 0;
  // Verified
  STATUS_VERIFIED = 1;
  // Rejected
  STATUS_REJECTED = 2;
  // after processing in the msg_server
  STATUS_MSG_SERVER = 3;
  // accept the votes from the validators (after preBlocker)
  STATUS_VOTE_EXTENSION = 4;
  // reported as fraud (after received ChallengeForFraud tx)
  STATUS_CHALLENGE_FOR_FRAUD = 5;
}

Fixed unverified data handling with 4e6e139

Base automatically changed from x/selfdelegation to v0.52 January 24, 2025 01:24
@Senna46 Senna46 changed the title fix: da test fix: da test & da status Jan 24, 2025
@Senna46 Senna46 changed the title fix: da test & da status fix: da test & da status enum Jan 24, 2025
@Senna46 Senna46 requested a review from kimurayu45z January 24, 2025 15:57
@Senna46
Copy link
Contributor Author

Senna46 commented Jan 28, 2025

Please review the 3 parts

  • IsValidData field of Proof
    This is not used for any handling; there is no need for the validator to send tx that it is Invalid. So, it should be removed.
  • ChallengeForFraud collateral
    MsgChallengeForFraud tx can be sent by anyone with collateral coins. This should be handled by the value in PublishedData structure, not param.
    https://github.com/sunriselayer/sunrise/blob/fix/da-test/x/da/keeper/msg_server_challenge_for_fraud.go#L35-L41
  • SubmitProof
    MsgSubmitProof tx can be sent by anyone (not validator). I think this differs from the spec; anything that is not from the validator at the time in the EndBlocker should be excluded.

@Senna46
Copy link
Contributor Author

Senna46 commented Jan 29, 2025

Changed status names

// PublishedDataStatus
enum Status {
  // Default value
  STATUS_UNSPECIFIED = 0;
  // Verified
  STATUS_VERIFIED = 1;
  // Rejected
  STATUS_REJECTED = 2;
  // After processing in the msg_server
  STATUS_VOTING = 3;
  // Verified the votes from the validators. Challenge can be received (after preBlocker)
  STATUS_CHALLENGE_PERIOD = 4;
  // reported as fraud. SubmitProof tx can be received (after received ChallengeForFraud tx)
  STATUS_CHALLENGING = 5;
}

@Senna46 Senna46 changed the title fix: da test & da status enum fix: da handling & da status enum Jan 29, 2025
@Senna46 Senna46 merged commit da76007 into v0.52 Jan 29, 2025
@Senna46 Senna46 deleted the fix/da-test branch January 29, 2025 14:11
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.

1 participant