Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

Update runtime to use new rustc #199

Merged
merged 4 commits into from
Sep 23, 2018
Merged

Update runtime to use new rustc #199

merged 4 commits into from
Sep 23, 2018

Conversation

nhynes
Copy link
Contributor

@nhynes nhynes commented Sep 23, 2018

#198 but with a bit extra to keep the gateway happy

@nhynes
Copy link
Contributor Author

nhynes commented Sep 23, 2018

tf?

screen shot 2018-09-23 at 11 22 21 am

Copy link
Contributor

@willscott willscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the to_le_bytes over copying in the to_bytes method.

api/src/state.rs Outdated
@@ -30,15 +30,15 @@ pub struct Log {
pub transaction_log_index: Option<U256>,
}

#[derive(Serialize, Deserialize, Debug)]
#[derive(Serialize, Deserialize, Debug, Clone)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What changed that makes us need Clone?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error[E0277]: the trait bound `ethereum_api::AccountState: std::clone::Clone` is not satisfied
   --> src/lib.rs:109:1
    |
109 | / with_api! {
110 | |     create_contract_client!(runtime_ethereum, ethereum_api, api);
111 | | }
    | |_^ the trait `std::clone::Clone` is not implemented for `ethereum_api::AccountState`
    |
    = note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<ethereum_api::AccountState>`
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, this build worked fine without it: https://circleci.com/gh/oasislabs/runtime-ethereum/1436

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What changed that makes us need Clone?

No idea. I just do what cargo tells me to do.

error[E0277]: the trait bound `ethereum_api::AccountState: std::clone::Clone` is not satisfied
   --> src/lib.rs:109:1
    |
109 | / with_api! {
110 | |     create_contract_client!(runtime_ethereum, ethereum_api, api);
111 | | }
    | |_^ the trait `std::clone::Clone` is not implemented for `ethereum_api::AccountState`
    = note: you can solve this by selling your soul to the Rust developers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll see if I can revert and rebuild.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope. still getting the error

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the gateway?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@peterjgilbert
Copy link
Member

Yep, to_le_bytes is better

@peterjgilbert
Copy link
Member

IDK what's going on with build_go

@peterjgilbert
Copy link
Member

Also can remove #![feature(use_extern_macros)] in benchmark, genesis, and playback

@nhynes nhynes merged commit 3535d88 into master Sep 23, 2018
@nhynes nhynes deleted the new-rustc branch September 23, 2018 22:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants