feat(rs-drive-abci)!: direct communication between Tenderdash and rs-drive-abci#842
Merged
Conversation
QuantumExplorer
requested changes
Mar 23, 2023
QuantumExplorer
approved these changes
Mar 24, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
Communication between Tenderdash and Drive is passed through deprecated
js-drive, using javascript bindings inrs-drive-nodejs. The control flow between these modules look as follows:tenderdash -> js-drive -> rs-drive-nodejs -> rs-drive-abci.This adds unnecessary complexity, and introduces additional maintenance effort.
In order to simplify this, we plan to deprecate
js-driveandrs-drive-nodejsand replace it with an ABCI server, built into rs-drive-abci.What was done?
main()function inrs-drive-abcithat starts the ABCI server and accepts connections from Tenderdash.envfiles and environment variablesNote:
abci/handlers.tsandabci/messages.rsare deprecated, but not removed yet. Main logic is inabci/server.rsandabci/proposal.rs.How Has This Been Tested?
docker logs tenderdash 2>&1 | less; note that:infowas executed correctly, and software version was received by Tenderdash:INFO ABCI Handshake App Info hash= height=0 module=handshaker protocol-version=1 software-version=0.1.0INFO Stopping abci.socketClient reason="read message: EOFdocker logs drive-abci 2>&1 | less; note that:infowas executed correctly:INFO drive_abci::abci::server: info received method="info" method="info" request=RequestInfo { version: "0.12.0-dev.1", block_version: 12, p2p_version: 8, abci_version: "0.20.0" } response=ResponseInfo { data: "", version: "0.1.0", app_version: 1, last_block_height: 0, last_block_app_hash: [] }init chainwas executed correctly:INFO drive_abci::abci::server: init chain executed method="init_chain"prepare proposalfailed:ERROR drive_abci: panic panic=panicked at 'failed to prepare proposal: Execution(CorruptedCodeExecution("could not get block by height"))', packages/rs-drive-abci/src/abci/server.rs:134:14Note: you need to delete drive-abci and recreate it in order to retry the test. Otherwise
init chainwill fail.Breaking Changes
Checklist:
For repository code-owners and collaborators only