-
Notifications
You must be signed in to change notification settings - Fork 19
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
to support GetConfigBlockFromOrdererByNumber #124
Comments
I think you are mixing two separate concerns. The The genesis block is just block zero. You don't need any special admin function to get a specific block by its number. To get block zero, you can either:
Perhaps you could argue that it is convenient for the admin API to provide a |
I'll explain step by step more clearly, 1 orderer cluster create a channel, there is no org info on the configblock now. 2 org A join the channel:
3 org B join the channel:
For org B, there is no way to get the GenesisBlock from it's peer before it joined in except use an api from orderer. and
so, maybe ChannelJoin API can be designed more simpler without blockinfo or give a |
I extended a funtion
|
I agree, if the channel join API can be simplified so the caller does not need to supply genesis and/or config blocks themselves, that might be the neatest solution. |
For an exist channel , when a new org need to be added to channel:
the channel's configBlock is updated first, then the org's peers join the channel
code may like as follows
JoinChannel(...) will give an error: unsuccessful response received with status 500 (INTERNAL_SERVER_ERROR): cannot create ledger from genesis block: expected block number=0, received block number=1
So when a peer join the channl it will always need the number 0 ConfigBlock, is it correct?
but channel.GetConfigBlockFromOrderer(...) always return the latest ConfigBlock
so we need a func like channel.GetConfigBlockFromOrdererByNumber(0) or channel.GetFirstConfigBlockFromOrderer() to get the first ConfigBlock to support peer join
The text was updated successfully, but these errors were encountered: