-
Notifications
You must be signed in to change notification settings - Fork 19
remove fake networking #318
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
Conversation
62676c1
to
d5d25bb
Compare
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.
Left some comments, LMK
use tokio::sync::mpsc; | ||
|
||
mod eth; | ||
mod fakenet; |
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 this be behind a feature flag? In general, please test compiling this PR in both simulation-mode and regularly, and make sure there are no compiler warnings about unused code in either compilation
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 put it behind a flag for now even though I think there isn't a huge difference rn.
simulation-mode has a fair bit of previous and current unused variables in main.rs and register, we could do something like #![cfg_attr(feature = "simulation-mode", allow(unused))]
in main.rs to surpress them..
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.
It's best to keep unused code flagged-out for maximum clarity
I think af877a0 broke this PR. See hyperware-ai/kit#140 (comment) |
a local app_store deployment is now also used in addition to the kns_indexer on simulation mode. I added a template package to the start state, but anvil currently does not store/replay past events if starting from a previously saved state. This should happen in the future though! |
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.
Just a few final changes.
It's really exciting that any userspace program will be able to leverage the simulation-mode flag to enter a testing environment complete with their own contracts potentially.
Once you make final changes, please go in and assign flags in order to remove all unused code warnings (without using the allow-unused flag!). It helps to use mod { blocks } if there are a bunch of functions that are all sim-mode only or vice versa. I will check for this before merge
use tokio::sync::mpsc; | ||
|
||
mod eth; | ||
mod fakenet; |
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.
It's best to keep unused code flagged-out for maximum clarity
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.
Wait. Issue booting a real node.
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.
Working now for me.
Problem
kit PR
TODO:
Solution
{A brief description of how you solved the problem.}
Docs Update
Corresponding docs PR
Notes
{Any other information useful for reviewers.}