-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8307170
commit edf0803
Showing
24 changed files
with
854 additions
and
162 deletions.
There are no files selected for viewing
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,19 @@ | ||
FROM rust:latest AS builder | ||
|
||
WORKDIR /usr/src/nebula | ||
|
||
COPY . . | ||
|
||
RUN cargo build --release | ||
|
||
FROM debian:bullseye-slim AS runtime | ||
|
||
RUN apt-get update && apt-get install -y libssl-dev ca-certificates && rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /usr/src/nebula | ||
|
||
COPY --from=builder /usr/src/nebula/target/release/nebulacrypto /usr/bin/nebula | ||
|
||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ["nebula"] |
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 @@ | ||
pub mod v1; |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use ed25519_dalek::SigningKey; | ||
use crate::core::canister::canister::{Canister, CanisterFunctionPayload}; | ||
use crate::core::consensus::model::ConsensusEngine; | ||
|
||
pub fn produce_block( | ||
canister: &mut Canister, | ||
consensus_engine: &mut ConsensusEngine, | ||
signing_key: &SigningKey, | ||
) -> Result<String, String> { | ||
canister.execute_function(CanisterFunctionPayload::ProduceBlock { | ||
consensus_engine, | ||
signing_key, | ||
}) | ||
} | ||
|
||
pub fn select_next_validator( | ||
canister: &mut Canister, | ||
consensus_engine: &mut ConsensusEngine, | ||
) -> Result<String, String> { | ||
canister.execute_function(CanisterFunctionPayload::SelectValidator { | ||
consensus_engine, | ||
}) | ||
} |
Oops, something went wrong.