-
Notifications
You must be signed in to change notification settings - Fork 46
PoC: Broadcast blocks #277
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
…gx flag anymore. It is defined by the target_arch
…eed of sgx flag anymore. It is defined by the target_arch". Sgx conditional compilation seems to be more involed than i thought. This needs proper thinking changing this. This reverts commit 8d0400c
murerfel
left a comment
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.
Looks good to me. Quite a few questions from my side to help my understanding of the code, hope you can forgive that 😉
The one minor change I'd make, is the test comparing an entire response JSON string, using contains() instead
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.
Looks good to me, approved!
brenzi
left a comment
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 is 95% refactoring and 5% on-topic
too big for me to review in detail. but I get you can broadcast blocks and receive them (without applying them yet)
Poc of block broadcasting: Closes #244. It is only a PoC, as the workers simply broadcast blocks. There is no scheduling (aura) and received blocks by other workers are only logged to the command line without applying the state diff.
Major:
enclave-apicrate. PoC on how we can abstract the interface to the enclave.Workerstruct. PoC on how we could abstract every aspect of the worker's features.ws-serverthe worker listens for direct requests. It comes from the jsonrpsee crate - the rpc abstraction that will be successor to the current implementation in substrate. It currently coexists with the old direct_server, but I think we should replace the old one soon. It removes a lot of boilerplate code and is async. Since the introduction of theasync/awaitsyntax in rust, I believe we should go async, as it is much less verbose in general.Stf::apply_statediff()it is unit tested but not yet integrated in the enclave.Minor:
direct_clientthat actually reflects the functionality.