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

broadcast_tx via grpc #255

Merged
merged 3 commits into from
Dec 2, 2016
Merged

broadcast_tx via grpc #255

merged 3 commits into from
Dec 2, 2016

Conversation

ebuchman
Copy link
Contributor

It's nice to have a broadcast_tx available over grpc so app devs can get started with nothing but a grpc lib for both tmsp and sending txs.

That said, grpc is a bit of a headache. It breaks the semantics of BroadcastTxCommit because it doesn't allow you to return a result and an error (eg. CheckTx result but error because it doesn't get committed). It's also not playing nice with glide for unknown reasons.

@ebuchman ebuchman mentioned this pull request Aug 11, 2016
3 tasks
@tomtruitt
Copy link

tendermint/abci@3329868 did you fix this issue with returning results?

@ebuchman
Copy link
Contributor Author

not sure what you're asking here

@tomtruitt
Copy link

In this issue you said;

"grpc is a bit of a headache. It breaks the semantics of BroadcastTxCommit because it doesn't allow you to return a result and an error (eg. CheckTx result but error because it doesn't get committed)."

In the commit I referenced I see addition of:
return types.Result{}
To grpc_client.

So I thought maybe you came up with a fix or a new way to do it. And since we are building on grpc I've been curious about the implications of this issue for us

@ebuchman
Copy link
Contributor Author

Oh no. That commit is just fixing a compile error. Does not address the problems mentioned in the opening comment

@mdyring
Copy link
Contributor

mdyring commented Aug 27, 2016

Why not just populate ResponseBroadcastTx with the values from the step that fails (be it CheckTx or AppendTx).

I don't think from a BroadcastTx user perspective it matters much if it failed in CheckTx or AppendTx, and the response structures are compatible

message ResponseBroadcastTx{
uint64 code = 1; // TODO: import tmsp ...
bytes data = 2;
string log = 3;
}

message ResponseAppendTx{
CodeType code = 1;
bytes data = 2;
string log = 3;
}

message ResponseCheckTx{
CodeType code = 1;
bytes data = 2;
string log = 3;
}

@ebuchman
Copy link
Contributor Author

ebuchman commented Aug 27, 2016

So you don't think it matters if the caller knows whether it failed in CheckTx or AppendTx?

It could pass CheckTx then fail in AppendTx, or it could just fail in CheckTx, and caller won't know the difference. I don't think that's right because failing in AppendTx should have some kind of effect on the state, someone ought to pay for it, but we haven't really worked out what that might look like.

@ebuchman
Copy link
Contributor Author

This is now a breaking change since it changes the response struct for BroadcastTxCommit, but I think that's for the best.

@jaekwon
Copy link
Contributor

jaekwon commented Sep 7, 2016

StartGRPCClient might eventually need to be refactored out so the client doesn't require importing tendermint/rpc/core and thus the whole kitchen sink. But otherwise LGTM. We can merge this in.

@tomtruitt
Copy link

@Jae just a reminder the TMSP bindings need to be upgraded for compatibility with GRPC 1.0

@tomtruitt
Copy link

Sorry i guess that is a separate issue

@tomtruitt
Copy link

tomtruitt commented Sep 14, 2016

i just now realized this isn't grpc_fix branch.. is that branch still relevant? I'm going with no right? Does this branch just need to be rebased?

@ebuchman
Copy link
Contributor Author

this branch just needs to be rebased and then it should get merged into develop

@ebuchman ebuchman mentioned this pull request Oct 12, 2016
11 tasks
@ebuchman ebuchman merged commit dc436e7 into develop Dec 2, 2016
@ebuchman ebuchman deleted the broadcast_tx_grpc branch April 19, 2017 02:36
ebuchman added a commit that referenced this pull request Jun 20, 2018
Revert "Merge pull request #247 from tendermint/bucky/no-gogo"
troian pushed a commit to akash-network/tendermint that referenced this pull request Mar 11, 2023
…ermint#224) (tendermint#255)

* Rename Tendermint to CometBFT: further actions (tendermint#224)

* rename: Tendermint -> CometBFT in README files

* rename: Tendermint -> CometBFT in doc.go files

* rename: Tendermint -> CometBFT in Go documentation

* Removing unused/outdated CHANGELOGs

* rename: using CometBFT in issues and PR templates

* rename: references to tendermin in libs/events

* rename: renaming on text files under rpc/ dir

* rename: Tendermint-go -> CometBFT in proto docs

* rename: Tendermint -> CometBFT in generated go docs

* rename: renaming Tendermint -> CometBFT in scripts

* rename: renaming to CometBFT in code comments

* rename: general script files on repository root

* rename: using CometBFT in github config files

* rename: Go docs in .proto files, pb.go regenerated

* rename: toml config file generated content

* rename: avoiding unnecessary TM entries in comments

* rename: renaming in log messages and strings

* rename: upgrading instructions renamed, needs review

* rename: fixing generated protobuf files

* rename: fixing generated protobuf files

* rename: fixing broken test, renamed string

* Apply suggestions from code review

* Update .github/PULL_REQUEST_TEMPLATE.md

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* Update abci/README.md

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* Update proto/README.md

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* rename: removing unused files on repo root

---------

Co-authored-by: Daniel Cason <cason@gandria>
Co-authored-by: Thane Thomson <connect@thanethomson.com>
(cherry picked from commit 1cb55d4)

# Conflicts:
#	.github/ISSUE_TEMPLATE/bug-report.md
#	.github/ISSUE_TEMPLATE/config.yml
#	.github/PULL_REQUEST_TEMPLATE.md
#	.github/issue_template.md
#	.github/workflows/janitor.yml
#	.github/workflows/lint.yml
#	.gitignore
#	.goreleaser.yml
#	UPGRADING.md
#	abci/README.md
#	abci/types/application.go
#	abci/types/mocks/base.go
#	cmd/cometbft/commands/version.go
#	config/config.go
#	config/toml.go
#	consensus/README.md
#	consensus/replay.go
#	consensus/replay_test.go
#	consensus/state.go
#	crypto/README.md
#	crypto/ed25519/ed25519.go
#	inspect/doc.go
#	inspect/inspect.go
#	internal/test/doc.go
#	libs/pubsub/query/query.go
#	libs/pubsub/query/syntax/doc.go
#	light/doc.go
#	networks/local/README.md
#	node/node.go
#	node/setup.go
#	p2p/README.md
#	proto/README.md
#	rpc/core/abci.go
#	rpc/core/blocks.go
#	rpc/core/consensus.go
#	rpc/core/doc.go
#	rpc/core/events.go
#	rpc/core/evidence.go
#	rpc/core/health.go
#	rpc/core/mempool.go
#	rpc/core/net.go
#	rpc/core/status.go
#	rpc/core/tx.go
#	rpc/jsonrpc/doc.go
#	rpc/openapi/openapi.yaml
#	scripts/metricsgen/metricsgen.go
#	test/fuzz/README.md
#	test/fuzz/oss-fuzz-build.sh
#	test/loadtime/cmd/load/main.go
#	tools/README.md
#	version/version.go

* rename: fixing cherry-pick conflicts

* rename: fixing cherry-pick conflicts

Co-authored-by:  Jasmina Malicevic <jasmina@informal.systems>

* rename: fixing cherry-pick conflicts

Co-authored-by:  Jasmina Malicevic <jasmina@informal.systems>

* rename: reverted changes on UPGRADING.md

* rename: Tendermint Core -> CometBFT on intro

* rename: further renaming Tendermint -> CometBFT

* rename: Tendermint -> CometBFT under test/maverick/

* rename: further renaming Tendermint -> CometBFT

* rename: removing copyright from internal package

* rename: Tendermint -> CometBFT in /spec/abci

* rename: further renaming Tendermint -> CometBFT

* rename: undoing renaming of jTendermint

* rename: removing reference to tendermint/go-amino

* rename: tendermint -> cometbft on .circleci/

---------

Co-authored-by: Daniel <daniel.cason@informal.systems>
Co-authored-by: Jasmina Malicevic <jasmina@informal.systems>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants