-
Notifications
You must be signed in to change notification settings - Fork 631
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
refactor: Upgraded all the dependencies #3869
Conversation
Nayduck link: http://nayduck.eastus.cloudapp.azure.com:3000/#/run/1064 |
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.
Amazing! 🥇
Of note: fixes #3868
chain/jsonrpc/Cargo.toml
Outdated
tokio = { version = "0.2", features = ["full"] } | ||
actix = "0.11.0-beta.1" | ||
actix-web = "4.0.0-beta.1" | ||
actix-cors = { git = "https://github.com/andy128k/actix-extras.git", branch="update-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.
Depending on a random branch seems brittle to me. What happens if the user deletes the branch? Further down you list the dependency as 0.5.4
; is there something in particular we need here that is not needed there? If so, maybe we should make our own fork of actix-extras
where we can keep this branch around until we are able to upgrade to the next release of actix-cors
.
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.
I need beta versions of actix with tokio 1.x support, and actix-cors has not been released with the version bump yet. Forking to our guthub org makes perfect sense, I will do that 👍
Extra bonuses:
|
It passed initial checks locally, but I expected it to fail somewhere anyway. I left my home office for a walk, and I will be back in 4-5 hours. If you have a bandwidth to work on it before I get back, go for it, otherwise, I was going to address CI issues during the weekend to minimize interruption and have a chance to run full nayduck test |
I investigated the CI failure and realized that it is not very easy to fix:
I am not sure how to best proceed at this point. I feel like we can either pin some syn dependency or try having two different ethereum-types version in the same crate. @frol @artob any suggestions? |
@frol also looks like there is some change to maybe actix runtime that causes trouble when we start a node:
|
I made some changes to diff --git a/neard/src/lib.rs b/neard/src/lib.rs
index 92c3db80..18deb412 100644
--- a/neard/src/lib.rs
+++ b/neard/src/lib.rs
@@ -214,7 +214,6 @@ pub fn start_with_config(
config: NearConfig,
) -> (Addr<ClientActor>, Addr<ViewClientActor>, Vec<Arbiter>) {
let store = init_and_migrate_store(home_dir, &config);
- near_actix_utils::init_stop_on_panic();
let runtime = Arc::new(NightshadeRuntime::new(
home_dir,
diff --git a/neard/src/main.rs b/neard/src/main.rs
index 814dfeb5..41ae7ce9 100644
--- a/neard/src/main.rs
+++ b/neard/src/main.rs
@@ -232,10 +232,11 @@ fn main() {
near_config.client_config.archive = true;
}
- let system = System::new("NEAR");
- let (_, _, arbiters) = start_with_config(home_dir, near_config);
- system.run().unwrap();
- arbiters.into_iter().for_each(|mut a| a.join().unwrap());
+ System::builder().name("NEAR").stop_on_panic(true).run(move || {
+ start_with_config(home_dir, near_config);
+ }).unwrap();
}
("unsafe_reset_data", Some(_args)) => {
let store_path = get_store_path(home_dir); |
@bowenwang1996 I forked openethereum and upgraded the dependencies. I had also forked actix-extras and paperclip (we use it for RosettaRPC). Now, we have a single version of actix (0.11.0-beta.1), actix-web (4.0.0-beta.1), and tokio (1.1.1)! @birchmd Thanks for the patch! I haven't yet confirmed if that fixes the issue, but it looks reasonable to me. |
…, but once we confirm the tests pass)
New nayduck link: http://nayduck.eastus.cloudapp.azure.com:3000/#/run/1098 |
The main goal is to get the latest actix/actix-web along with tokio 1.x. Fixes #3868
Extra bonuses:
syn
andserde
crates in our code-base