Skip to content

rpc: fix check_tx cache problem#9690

Merged
thanethomson merged 1 commit intotendermint:mainfrom
JayT106:uncache-checkTx
Nov 9, 2022
Merged

rpc: fix check_tx cache problem#9690
thanethomson merged 1 commit intotendermint:mainfrom
JayT106:uncache-checkTx

Conversation

@JayT106
Copy link
Contributor

@JayT106 JayT106 commented Nov 9, 2022

close #9689

Please backport it to v0.34/v0.37, thanks

@JayT106 JayT106 requested a review from a team November 9, 2022 23:31
@JayT106 JayT106 changed the title fix check_tx cache problem rpc: fix check_tx cache problem Nov 9, 2022
@thanethomson thanethomson added S:backport-to-v0.34.x Tell mergify to backport the PR to v0.34.x S:backport-to-v0.37.x Tell mergify to backport the PR to v0.37.x labels Nov 9, 2022
Copy link
Contributor

@thanethomson thanethomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking up on this @JayT106!

@thanethomson thanethomson merged commit ffae184 into tendermint:main Nov 9, 2022
mergify bot pushed a commit that referenced this pull request Nov 9, 2022
(cherry picked from commit ffae184)

# Conflicts:
#	rpc/core/routes.go
mergify bot pushed a commit that referenced this pull request Nov 9, 2022
(cherry picked from commit ffae184)

# Conflicts:
#	rpc/core/routes.go
samricotta pushed a commit that referenced this pull request Nov 10, 2022
thanethomson pushed a commit that referenced this pull request Nov 10, 2022
thanethomson added a commit that referenced this pull request Nov 10, 2022
* fix check_tx cache problem (#9690)

(cherry picked from commit ffae184)

# Conflicts:
#	rpc/core/routes.go

* Resolve conflicts

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add changelog entry

Signed-off-by: Thane Thomson <connect@thanethomson.com>

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: JayT106 <JayT106@users.noreply.github.com>
Co-authored-by: Thane Thomson <connect@thanethomson.com>
adrianbrink pushed a commit to heliaxdev/tendermint that referenced this pull request May 23, 2023
* rpc: Add caching support (tendermint#9650)

* Set cache control in the HTTP-RPC response header

* Add a simply cache policy to the RPC routes

* add a condition to check the RPC request has default height settings

* fix cherry pick error

* update pending log

* use options struct intead of single parameter

* refacor FuncOptions to functional options

* add functional options in WebSocket RPC function

* revert doc

* replace deprecated function call

* revise functional options

* remove unuse comment

* fix revised error

* adjust cache-control settings

* Update rpc/jsonrpc/server/http_json_handler.go

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

* linter: Fix false positive

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* rpc: Separate cacheable and non-cacheable HTTP response writers

Allows us to roll this change out in a non-API-breaking way, since this
is an additive change.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* rpc: Ensure consistent caching strategy

Ensure a consistent caching strategy across both JSONRPC- and URI-based
requests.

This requires a bit of a refactor of the previous caching logic, which
is complicated a little by the complex reflection-based approach taken
in the Tendermint RPC.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* rpc: Add more tests for caching

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update CHANGELOG_PENDING

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* light: Sync routes config with RPC core

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* rpc: Update OpenAPI docs

Signed-off-by: Thane Thomson <connect@thanethomson.com>

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: jayt106 <jaytseng106@gmail.com>
Co-authored-by: jay tseng <jay.tseng@crypto.com>
Co-authored-by: JayT106 <JayT106@users.noreply.github.com>
(cherry picked from commit 816c6ba)

# Conflicts:
#	CHANGELOG_PENDING.md
#	test/fuzz/tests/rpc_jsonrpc_server_test.go

* Resolve conflicts

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* fix check_tx cache problem (tendermint#9690)

* Fixed missing package

---------

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: JayT106 <JayT106@users.noreply.github.com>
@Exkaleburix
Copy link

Siktim sizi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S:backport-to-v0.34.x Tell mergify to backport the PR to v0.34.x S:backport-to-v0.37.x Tell mergify to backport the PR to v0.37.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rpc: should not cache check-tx result

3 participants