Merged
Conversation
olgavrou
reviewed
Nov 4, 2019
olgavrou
reviewed
Nov 4, 2019
olgavrou
reviewed
Nov 4, 2019
Member
Author
I've updated a few places in the docs that show direct JSON queries, and added a brief description in the |
jumaffre
approved these changes
Nov 4, 2019
olgavrou
approved these changes
Nov 4, 2019
eddyashton
added a commit
to eddyashton/CCF
that referenced
this pull request
Mar 24, 2020
* wip * WIP * wip * More prefixing * More prefixing * Prefixes * Formatting * Format * p * Revert cert changes * Fix error cases * wip * Pass new args to frontend process everywhere * Move detect_pack up to jsonrpc.h * Automatically prefix with sni * Extract common unpack_rpc * Don't give unpacked to pbft (yet) * Minor test fixes * Forward readonly_hint all the way * WIP * PoC: RPCContext holds everything, pre-parsed * Push even more details into RPCContext * Distinguish SessionContext * Start extending PoC into frontend_test * Combine and standardise tests * More frontend_test fixes * frontend_tests pass * Begin update of membervoting_test, remove process_json * Next test case passes * Churn * Progress * Most of membervoting_test * No more process_json * Fix luageneric_test * All compile * Re-use parsing logic in RPCEndpoint * Doh * Improve logging, serialise method for forwarded tx * Remove some unnecessary changes * Store the correct thing in voting_history * Remove more dead code * Update PBFT compilation paths * Improve logging * PR feedback * Upgrade to LOG_DEBUG * Pass actor with create request * Don't reparse * Reparse where necessary * non-None default prefices * Juggle lines * Add prefix in docs
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.






This is an extension of #422, created as a separate branch and PR as it includes additional refactoring.
It aims to separate the parsing of transport-level framing information from the semantic transaction processing. In particular extracting an actor from the transaction message data, rather than from the certificate which established the underlying channel.
In our current framed JSON-RPC protocol the actor is prefixed on the method, so
"method": "users/getCommit"will be dispatched by the endpoint to theusersfrontend, and by that frontend to itsgetCommitmethod handler. This requires a full parse of the JSON-RPC object before we can do thevalid_callercheck - in a flatbuffer or HTTP endpoint it should be possible to do a partial parse (of only the header) to extract the actor and similar framing information, and pass the remainder unprocessed data verbatim to the frontend.The key code change here is that
RpcFrontend::processnow takes a single context object, populated with parsed details. This is largely to make API changes easier, so we can tweak this struct's contents (to narrow down what the frontend requires) without altering hundreds of calling points. This context is split into a commonSessionContextwhich may persist over many transactions, and the remaining fields populated per-RPC. The unit tests callprocessrather thanprocess_json, and have a gestures towards standardisation.For future PRs:
process_forwardedandprocess_pbft