generated from PaulRBerg/hardhat-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start ciphernode binary example first commit (wip) (#20)
* Create a ciphernode binary example * Logging was not accurate
- Loading branch information
Showing
6 changed files
with
72 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use std::error::Error; | ||
|
||
use enclave_core::Actor; | ||
use enclave_core::Ciphernode; | ||
use enclave_core::Data; | ||
use enclave_core::EventBus; | ||
use enclave_core::Fhe; | ||
use enclave_core::P2p; | ||
|
||
#[actix_rt::main] | ||
async fn main() -> Result<(), Box<dyn Error>> { | ||
let fhe = Fhe::try_default()?.start(); | ||
let bus = EventBus::new(true).start(); | ||
let data = Data::new(true).start(); // TODO: Use a sled backed Data Actor | ||
let _node = Ciphernode::new(bus.clone(), fhe.clone(), data.clone()).start(); | ||
let (_, h) = P2p::spawn_libp2p(bus.clone())?; | ||
println!("Ciphernode"); | ||
let _ = tokio::join!(h); | ||
Ok(()) | ||
} |