-
Notifications
You must be signed in to change notification settings - Fork 277
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
feat(sdk): support compressed response #469
Conversation
Are you sure this is not enabled by default? I've used queries like this before (using
|
Use |
So, we just are able to decode the compressed content if client set "Accept-Encoding: gzip". |
* enable use compression algorithm * fix ci * Just enable decode compressed content at ethclient * fix comments --------- Co-authored-by: Haichen Shen <[email protected]>
* feat: store skipped txs in local db * bump version * bump version * fix test * include L2 txs in skipped index * goimports * rename more * bump version * fix missed renames * fix the bug when calculating l2TxCount. (#479) * fix bug when calculate l2 tx count * Update version * fix: exclude L1 message from block payload size validation (#476) * fix: exclude L1 message from block payload size validation * fix the bug when calculating l2TxCount. (#479) * fix bug when calculate l2 tx count * Update version * bump version --------- Co-authored-by: maskpp <[email protected]> * fix: update row estimation with scroll-prover `v0.7.2` (#475) * Fix row estimation. * Update libzkp. * more * prepare * finish * upgrade * bump version * fix tests * Update to scroll-prover `v0.7.2`. * fix tests * Update miner/worker.go Co-authored-by: Péter Garamvölgyi <[email protected]> * Update miner/worker.go Co-authored-by: Péter Garamvölgyi <[email protected]> * Reset ccc when skips first tx. * do not unnecessarily skip L1 message * fix ccc reset and improve code readability * seal block on circuitcapacitychecker.ErrUnknown --------- Co-authored-by: HAOYUatHZ <[email protected]> Co-authored-by: Péter Garamvölgyi <[email protected]> * refactor: simplify ccc revert to snapshot (#480) * simplify ccc revert to snapshot * Update version.go --------- Co-authored-by: HAOYUatHZ <[email protected]> * feat: use --gcmode=archive and --cache.noprefetch=true by default (#482) * feat: use --gcmode=archive and --cache.noprefetch=true by default * refuse to start with invalid config * lint * lint * feat(sdk): support compressed response (#469) * enable use compression algorithm * fix ci * Just enable decode compressed content at ethclient * fix comments --------- Co-authored-by: Haichen Shen <[email protected]> * fix: disable pruning and prefetch if not flags are provided (#483) Co-authored-by: colin <[email protected]> * fix: update libzkp to use scroll-prover `v0.7.5` (#484) * Update libzkp to use scroll-prover `v0.7.5`. * Update version. * address comments * bump version * nit --------- Co-authored-by: maskpp <[email protected]> Co-authored-by: Steven <[email protected]> Co-authored-by: HAOYUatHZ <[email protected]> Co-authored-by: iczc <[email protected]> Co-authored-by: HAOYUatHZ <[email protected]> Co-authored-by: Haichen Shen <[email protected]> Co-authored-by: colin <[email protected]>
1. Purpose or design rationale of this PR
Enable use compression algorithm, support: gzip, zlib(deflate)
i.g:
curl --location 'http://localhost:8545' -H 'Content-Type: application/json' --compressed --data '{"jsonrpc": "2.0", "method": "scroll_getBlockTraceByNumberOrHash","params": ["0x2ca4"],"id": 1}' -v -w '%{size_download}'
`
client, err := ethclient.Dial("http://localhost:8545")
assert.NoError(t, err)
client.SetHeader("Accept-Encoding", "gzip")
`
2. PR title
Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:
3. Deployment tag versioning
Has the version in
params/version.go
been updated?4. Breaking change label
Does this PR have the
breaking-change
label?