Closed such closed 6 years ago
the pre-commits of a block, containing the validators public keys and signatures, are not currently available in the ABCI (only the LastCommitHash contained in the header passed to BeginBlock is). A discussion is taking place on tendermint's forum (https://cosmos.rocket.chat/channel/development?msg=pQByczFAAAQZsRtDY).
I was thinking that maybe we should not store anything like the block header and the block pre commit signatures since they are already stored by Tendermint Core. We could only store the block height and enrich segments in tmstore with the header and the signatures when they are requested. What do you think?
I thought the goal of an evidence was to make it possible to verify the validity of a segment independently from the tendermint network. However, without an access to the blockchain, there is no way of telling if the evidence was made up or not, so you have a good point. Technically, the block height is not even needed to recover the block in which a segment was included though, why do we need it for ?
What I meant was: If we know the block height then anytime a segment is retrieved all proofs we're interested in to independently validate it was included in the blockchain can be added to it. A complete segment, with a full evidence, can then be provided to anyone that has no access to the blockchain.
Therefore we have to decide between :
"light evidence" option : when saving a segment, only the block height is stored ; proof data (original header and merkle proof + current header and merkle proof + validators signatures for both blocks) will be added to the evidence when querying this segment. This option will cause a loss of performance for segment queries and some savings in terms of storage. To implement this, we have to wait till this is merged and released (EDIT: historical queries are now available on the 'develop' branch of tendermint/iavl).
"full evidence" option : corresponds to what is currently implemented, except that the validators signatures for the original header will be added when saving a segment. Current proof (signatures, header, merkle proof) will obviously still be added at query time. To implement this, we need to wait till evidence/voteInfo is passed to the ABCI through BeginBlock (currently on the roadmap, @ebuchman said it was coming soon
This will probably be addressed in stratumn/sdk#191
Tendermint recommends using their lite package that gets all the signature data and validates it. We should investigate this (it requires updating our Tendermint version).
Expected behavior
The evidence of a Segment should be enough to allow a complete validation.
Actual behavior
The only missing piece are the signatures of the validator nodes on the block.