-
Notifications
You must be signed in to change notification settings - Fork 51
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
WIP host tracking #136
WIP host tracking #136
Conversation
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.
Looking good so far.
To get this in, we'll need to make some edits to CI that ensures that the host is not built or linted with the cannon
/asterisc
build pipelines, as it will depend on the standard library.
bin/host/Cargo.toml
Outdated
# workspace | ||
anyhow.workspace = true | ||
tracing.workspace = true | ||
alloy-primitives.workspace = true |
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.
Activate the serde
feature so that B256
and other primitives from alloy implement serde::Serialize
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.
You can do this by just follow what the other crates do by creating a "serde" feature and a default feature that automatically enables serde.
Then have that serde feature have "alloy-primitives/serde" in it's list which enables the serde feature on alloy-primitives
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.
Yeah for sure - given that this is a bin crate, think we can just always enable serde. Folks shouldn't be consuming this code downstream.
bin/host/src/main.rs
Outdated
parser::parse_b256, | ||
types::{Network, RpcKind} | ||
}; | ||
|
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.
bin/host/src/main.rs
Outdated
mod parser; | ||
mod types; |
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.
These should go below use
directives
Cargo.toml
Outdated
@@ -15,7 +15,7 @@ exclude = ["**/target", "benches/", "tests"] | |||
anyhow = { version = "1.0.79", default-features = false } | |||
tracing = { version = "0.1.40", default-features = false } | |||
cfg-if = "1.0.0" | |||
alloy-primitives = { version = "0.7.0", default-features = false } | |||
alloy-primitives = { version = "0.7.0", default-features = false, features = ["serde"] } |
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.
This shouldn't be enabled by default in the workspace dep - should be enabled in kona-host
's Cargo.toml
meant to address issue #132 Host Tracking