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

Remove VRF Proof from header for compatibility #554

Closed
4 tasks
ulbqb opened this issue Feb 1, 2023 · 1 comment · Fixed by #559
Closed
4 tasks

Remove VRF Proof from header for compatibility #554

ulbqb opened this issue Feb 1, 2023 · 1 comment · Fixed by #559
Assignees
Labels
C: discussion Classification: Discuss something

Comments

@ulbqb
Copy link
Member

ulbqb commented Feb 1, 2023

Summary

I want to move Block.Header.Proof and Block.Header.Round from Block.Header to Block.VRFParams.

Problem Definition

Like #543 #546, Ostracon should be as compatible as possible with IBC and Cosmos-SDK. Howerver the compatibility is low for light client, since Ostracon's header structure is different from Tendermint's one.

Proposal

I would propose the following fixes:

message Block {
  Header                      header          = 1 [(gogoproto.nullable) = false];
  Data                        data            = 2 [(gogoproto.nullable) = false];
  ostracon.types.EvidenceList evidence        = 3 [(gogoproto.nullable) = false];
  Commit                      last_commit     = 4;
  VRFParams                   vrf_params      = 5; // new field!!
}

// new message!!
message VRFParams {
  int32 round = 1;
  bytes proof = 2;
}

// Header defines the structure of an Ostracon block header.
message Header {
  ...
  // *** Ostracon Extended Fields ***
  // Note that MaxHeaderSize must be modified when adding/removing fields.

  // vrf info
  // int32 round = 1000; // remove this field!!
  // bytes proof = 1001; // remove this field!!
}

proof and round are just moved from header to vrf_params. Keeping the header and commit structure the same as tendermint is compatible with tendermint for light client.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@ulbqb ulbqb changed the title Remove VRF Proof from header Remove VRF Proof from header for compatibility Feb 1, 2023
@ulbqb ulbqb self-assigned this Feb 1, 2023
@torao torao added the C: discussion Classification: Discuss something label Feb 1, 2023
@tnasu
Copy link
Member

tnasu commented Feb 6, 2023

I agree with you. In addition, if you make the improvement, would you re-consider Validation/Verification with the below:

  • BlockExectutor.ValidateBlock
  • Block.Header.ValidateBasic
  • LightBlock.ValidateBasic
  • ValidatorSet.VerifyCommit
  • ValidatorSet.VerifyCommitLight
  • ValidatorSet.VerifyCommitLightTrusting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: discussion Classification: Discuss something
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants