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

Initialization of a PoS blockchain #959

Closed
adrianbrink opened this issue May 7, 2018 · 5 comments
Closed

Initialization of a PoS blockchain #959

adrianbrink opened this issue May 7, 2018 · 5 comments
Assignees
Labels

Comments

@adrianbrink
Copy link
Contributor

adrianbrink commented May 7, 2018

Step 1

Currently, RequestInitChain passes in the validator set from the tendermint/genesis.json file and ResponseInitChain is an empty struct.

message RequestInitChain {
  repeated Validator validators = 1 [(gogoproto.nullable)=false];
  bytes app_state_bytes = 2;
}

ResponseInitChain should return Validator, a set of validators to start Tendermint consensus with.

message ResponseInitChain {
  repeated Validator validators = 1 [(gogoproto.nullable)=false];
}

Step 2

Furthermore, the field validators in both should not be nullable. InitChain should be a pure function, that takes a validator set and returns a validator set. Of course the RequestInitChain.validators field can be an empty array.

message RequestInitChain {
  repeated Validator validators =1 [(gogoproto.nullable)=false];
  bytes app_state_bytes = 2;
}

message ResponseInitChain {
  repeated Validator validators = 1 [(gogoproto.nullable)=false];
}

This allows the ABCI protocol to easily support Proof of Stake as well as Proof of Authority (or some other not yet known Proof of XXX).

ref #230

@sunnya97 @jaekwon

@cwgoes cwgoes changed the title Initialiation of a PoS blockchain Initialization of a PoS blockchain May 7, 2018
@adrianbrink
Copy link
Contributor Author

ABCI: tendermint/abci#233

@ebuchman
Copy link
Member

ABCI now supports this. Need to use it in the app

@mossid
Copy link
Contributor

mossid commented Jun 21, 2018

Is there anybody already working on it?

@mossid mossid self-assigned this Jun 21, 2018
@mossid
Copy link
Contributor

mossid commented Jun 25, 2018

What happens when RequestInitChain.Validators is empty struct?

@ebuchman
Copy link
Member

If it's empty, and the app has no information about the validators from another source, then we basically just need to panic. Eventually this should be a case for ResponseException but that hasn't really been setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants