Adapt proxy heuristic to context flattening
Context
The structure of the storage in alpha
was changed by !2771 (merged). This flattening had to be reflected in the --mode proxy
and tezos-proxy-server
heuristics for getting a parent piece of the context (aka the split_key
heuristic). For some paths within the low-level storage, this heuristic makes the proxy mode requests /A/B/C
instead of /A/B/C/x
, in order to batch requests (supposing that, in this example, there will be a sequence of requests of the form /A/B/C/x
, /A/B/C/y
, /A/B/C/z
; so better request /A/B/C
at once).
This MR adapts the heuristic and adds a tezt
that the heuristic works for big_maps
requests of tezos-proxy-server
. I did not add correspondig tests for --mode proxy
of tezos-client
because it required more work (as the client doesn't have the support for events logging in tezt
).
Manually testing the MR
- Check that the changes to
src/proto_alpha/lib_client/proxy.ml
match the changes to paths described in !2771 (merged). alias tezt='dune exec tezt/tests/main.exe --'
tezt --file proxy_server_test.ml --test 'Alpha: big_map_perf (proxy_server)' --verbose
tezt --file proxy.ml --test 'Alpha: (Proxy) split_key heuristic' --verbose
Checklist
- NA Document the interface of any function added or modified (see the coding guidelines)
- NA Document any change to the user interface, including configuration parameters (see node configuration)
-
Provide automatic testing (see the testing guide). - NA For new features and bug fixes, add an item in the appropriate changelog (
docs/protocols/alpha.rst
for the protocol and the environment, theDevelopment Version
section ofCHANGES.md
for everything else). -
Select suitable reviewers using the Reviewers
field below. -
Select as Assignee
the next person who should take action on that MR