-
Notifications
You must be signed in to change notification settings - Fork 11
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 2.0 #383
base: dev
Are you sure you want to change the base?
Conversation
…s read. It will be stored in the event_log table. (#244) Co-authored-by: Jakub Zajkowski <[email protected]>
* Moving rpc sidecar to event sidecar workspace. Both og those servers will work on one binary * Updating schemars version because the old one is having bugs (if there is a name collision for components schema only one will be saved) * Copying casper_types to this project. The reason is that casper_types in release <= 4.0.1 depends on old schemars * Copying casper_types for 2.0 release to this project. The reason is that rpc sidecar has to use the new types definitions, but for now they are not released (and it's not clear if they will be released prior to node 2.0 release). * Changing RpcError implementation to fix tests. Some alignments of codestyle to make clippy happy. * Moving casper-types dependencies to workspace level * Sync changes from node branch * Update the schema file * Delete protocol.md * Move a DbId fix * Change error message * Changes to versioning * Sync changes to types * Switch to having a single binary * Moving config files, fixing compilation issues * bump 'juliet' to '0.2.1' * Sync casper-types changes * Changing RPC sidecar config so that the rpc_server.node_client.exponential_backoff will take a new parameter called max_attempts. I tcan be either "infinite" or a positive, non-zero number. * Storing ApiVersion in event_log table. Removing is_big_integer_id config from DDLConfiguration because it's no longer needed (new version of sea_query handles the situation of defining big_integer and autoincrement) * Revert "Storing ApiVersion in event_log table. Removing is_big_integer_id con…" * Update for node review changes (#15) * Update for node changes * Fix lints * Cleanup * Cover all values in tag roundtrip tests * Moving admin server out from the sse sidecar. They are spinned up separately from sse events server. Also the database initialization happens separetely. Is sse events server is defined a storage definition is required. If rest api server is defined a storage definition is required. * Fix GlobalStateRequest::random * Changes explicit BoxFuture casting to calling 'boxed()' method --------- Co-authored-by: Jakub Zajkowski <[email protected]> Co-authored-by: Rafał Chabowski <[email protected]> Co-authored-by: Rafał Chabowski <[email protected]> Co-authored-by: zajko <[email protected]>
…REST API endpoint with /transaction/deploy/(...) and /transaction/version1/(...) endpoints. (#245) Co-authored-by: Jakub Zajkowski <[email protected]>
* Move merkle proof to casper-types and cleanup * Remove casper types stuff
* Update for InformationRequest::Transaction change * Fix test failures due to version mismatches * Run formatter * Bump commit
#248) * Adding network_name as a field in event_log. It is fetched from `/status` endpoint of the node to which sidecar connects to. --------- Co-authored-by: Jakub Zajkowski <[email protected]>
… event. Instead we wrap the sse events in an envelope which looks like: (#252) ``` { "header": { "api_version": "2.0.0", "network_name": "casper" }, "payload": {(...)} } ``` Events in endpoints that return lists (like signatures for block) will also have each individual element of the list wrapped in such envelope. In the above the header fields: * "api_version" is the api version which was reported in the ApiVersion message for the node that we fetched the event from. * "network_name" is the "chainspec_name" field that was returned in the "/status" endpoint for the node that we fetched the event from. Co-authored-by: Jakub Zajkowski <[email protected]>
* Update usage of ReactorState * Update schema
In Condor, we introduced new bid records in global state that are stored under the `Key::BidAddr` key type. We need to include these records when creating the auction info. Signed-off-by: Alexandru Sardan <[email protected]>
rpc-sidecar: include new style bid records in auction info
* restructured metrics (moved to separate module) * added rest-api specific metrics (current connections, response times) * added db specific metrics (amount of data fetched from "raw" fields for events) * added rpc specific metrics Co-authored-by: Jakub Zajkowski <[email protected]>
* Fix auction state tests * Fix a clippy lint * Disable part of the workflow for now * Workaround for non-PRs
…so it's easier to fine-tune what should actually run. If configuration for all components is either missing or has `enable_server = false`, sidecar exits since it has nothing to do. Also did some refactoring of initialization code. (#262) Co-authored-by: Jakub Zajkowski <[email protected]>
* Bump casper types and refresh schema file * Fix test data
* Switch block reporting changes * Correct typo in name * Bump types
…ntation. (#264) Co-authored-by: Jakub Zajkowski <[email protected]>
… a package to fail (#265) * Removing lingering references to "casper-event-sidecar". The whole project should now be called "casper-sidecar" * Moving packaging configuration from "event-sidecar" module to "sidecar" which aggrgates the final binary Co-authored-by: Jakub Zajkowski <[email protected]>
… sidecar after 2.0 update (#266) Co-authored-by: Jakub Zajkowski <[email protected]>
Co-authored-by: Jakub Zajkowski <[email protected]>
…o tests (#366) Co-authored-by: Jakub Zajkowski <[email protected]>
* Aligning sidecar to latest changes in casper-node * Fixing schema tests --------- Co-authored-by: Jakub Zajkowski <[email protected]>
Implement keepalive checks
Co-authored-by: Jakub Zajkowski <[email protected]>
Validate network name if specified
Use local duplicate of `AuctionState` struct
Co-authored-by: Jakub Zajkowski <[email protected]>
Handle standard interrupt signals
* Bumping dependencies --------- Co-authored-by: Jakub Zajkowski <[email protected]>
* aligning with node changes --------- Co-authored-by: Jakub Zajkowski <[email protected]>
…d with newest node code (#385) Co-authored-by: Jakub Zajkowski <[email protected]>
* Introduced "state_get_auction_info_v2" json rpc method. --------- Co-authored-by: Jakub Zajkowski <[email protected]>
#393) * Refactoring "state_get_auction_info" and "state_get_auction_info_v2" to make less binary port requests --------- Co-authored-by: Jakub Zajkowski <[email protected]>
@@ -13,6 +13,7 @@ on: | |||
pull_request: | |||
branches: | |||
- "dev" | |||
- "feat-*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "feat-*" |
tracing = { version = "0", default-features = false } | ||
tracing-subscriber = "0" | ||
serde = { version = "1", default-features = false } | ||
jsonschema = "0.26.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jsonschema = "0.26.2" | |
jsonschema = "0.26.2" | |
colored = "2.0.0" | ||
futures-util = { workspace = true } | ||
once_cell = { workspace = true } | ||
pg-embed = { git = "https://github.com/zajko/pg-embed", branch = "bump_dependencies" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a "release" of this before merging?
@@ -1,11 +1,13 @@ | |||
use crate::types::config::AdminServerConfig; | |||
use crate::types::config::AdminApiServerConfig; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combine imports here and below
@@ -28,7 +30,7 @@ impl AdminServer { | |||
.concurrency_limit(self.max_concurrent_requests as usize) | |||
.rate_limit(self.max_requests_per_second as u64, Duration::from_secs(1)) | |||
.service(warp_service); | |||
|
|||
info!(address = %address, "started {} server", "Admin API"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the purpose of this string formatting.
sidecar/src/run.rs
Outdated
Ok(ExitCode::SUCCESS) | ||
}, | ||
res = do_run(config, components) => res.map_err(|component_error| { | ||
error!("The server has exited with an error: {}", component_error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error!("The server has exited with an error: {}", component_error); | |
error!("The server has exited with an error: {component_error}"); |
@@ -0,0 +1,893 @@ | |||
use std::collections::{BTreeMap, BTreeSet}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imports can be cleaned up
|
||
fn map_transform_v2(ex_ef: &TransformV2) -> Option<TransformKindV1> { | ||
let maybe_transform_kind = match ex_ef.kind() { | ||
casper_types::execution::TransformKindV2::Identity => Some(TransformKindV1::Identity), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probalby just import TransformKindV2
} | ||
} | ||
// following variants will not be understood by old clients since they were introduced in 2.x | ||
StoredValue::AddressableEntity(_) => None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combine those into a single match arm
types/src/sse_data.rs
Outdated
pub fn should_include(&self, filter: &[EventFilter]) -> bool { | ||
match self { | ||
SseData::Shutdown => true, | ||
SseData::ApiVersion(_) => filter.contains(&EventFilter::ApiVersion), | ||
//Keeping the rest part as explicit match so that if a new variant is added, it will be caught by the compiler SseData::Shutdown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//Keeping the rest part as explicit match so that if a new variant is added, it will be caught by the compiler SseData::Shutdown | |
// Keeping the rest part as explicit match so that if a new variant is added, it will be caught by the compiler |
Merging condor feature branch to dev