Skip to content

Instantly share code, notes, and snippets.

View stuff_for_dr.txt.
export NNS_URL=$(tools/host_url.sh env/consensus1/hosts nns)
ic-admin --nns-url=$NNS_URL propose-to-bless-replica-version-flexible broken_blockmaker https://blobules.dfinity.systems/dfinity-ci-build.dfinity.pr-8013/ic-replica/0.1.0/x86_64-linux/ic-replica-0.1.0.tar.gz fb62667e91f4bbf04c98d6d3dbc9da7983d004da7382577f4ddad731e8ffa4ec
cargo run -p ic-admin -- --nns-url=$NNS_URL propose-to-bless-replica-version-flexible working_blockmaker https://blobules.dfinity.systems/dfinity-ci-build.dfinity.pr-8143/ic-replica/0.1.0/x86_64-linux/ic-replica-0.1.0.tar.gz 04cd0ef0be9d379763dff66fd10209bc0cfcc422a525061b8b5c48e2cdd3ba2c
cargo run -p ic-admin -- --nns-url=$NNS_URL propose-to-bless-replica-version-flexible working_certification https://blobules.dfinity.systems/dfinity-ci-build.dfinity.pr-8149/ic-replica/0.1.0/x86_64-linux/ic-replica-0.1.0.tar.gz 9e267922820c661a3765003765c299ddefd56d2224dd8e18be61993ca57f05a5
cargo run -p ic-admin -- --nns-url=$NNS_URL propose-to-bless-replica-version-flexible wc3 https://blob
View .txt
--> detected OS: linux
--> Tearing down the network...
PLAY [localhost] *************************************************************************************************************************************************************************************************************************************************************************************************************
Thursday 17 December 2020 16:16:31 -0800 (0:00:00.095) 0:00:00.095 *****
PLAY [prometheus] ************************************************************************************************************************************************************************************************************************************************************************************************************
Thursday 17 December 2020 16:16:31 -0800 (0:00:00.022) 0:00:00.118 *****
included: /nix/store/qb5cdmvallj96b69gscwii3hs2sp0rna-prod/ansible/roles/ic_p8s_service_discovery_destroy/tasks/destroy.yml for prometheus.dfinity.systems
Thursday 17
View example.hs
do
value <- something a b
let sum = value + 1
other <- fn sum
final other
do
value <- something a b
let sum = value + 1
in do
View *scratch*.el
fn finish_execution_up_to(&self, height: Height) {
if let Some(state_manager) = &self.state_manager {
while let Some(batch) = self.batches.vec.borrow().get(self.delivery_start_index) {
if batch.batch_number > height {
break;
}
let scope = if batch.requires_full_state_hash {
CertificationScope::Full
} else {
CertificationScope::Metadata
View Temp.purs
module Dominion.Mystic.Temp where
import Data.Either as Either
import Prelude
ourDumbFunction :: Either.Either Boolean Int -> String
ourDumbFunction theValue = case theValue of
Either.Left theBoolean -> "The bool was " <> show theBoolean
Either.Right theInt ->
if theInt > 0 then
View message_maker.rs
fn matches_dkg_id_node_id_and_phase_generic<T>(
dkg_id: DkgId,
node_id: NodeId,
phase: dkg::Phase,
msg: &BasicSigned<dkg::WithDkgId<T>>,
) -> bool
where
dkg::WithDkgId<T>: PhaseMessage,
{
dkg::WithDkgId::<T>::phase() == phase
View config.rs
pub struct IntervalLength {
delay_to_key_announce_start: u64,
key_announce_length: u64,
delay_to_dealing_start: u64,
dealing_length: u64,
delay_to_response_start: u64,
response_length: u64,
delay_to_next_interval_start: u64,
}
View crypto.rs
use crate::prelude::*;
use ic_interfaces::crypto::*;
// pub trait MetaBasicSigner<T: CryptoHashable>: BasicSigner<T> {
//fn sign_basic(
// &self,
// message: &T,
// signer: NodeId,
// registry_version: RegistryVersion,
// ) -> CryptoResult<BasicSignature<T>> {
View share_signature.rs
impl<T: Hash + CryptoHashDomain> ShareSignature for MultiSignatureShare<T>
where
for<'a> dyn Crypto + 'a: ic_interfaces::crypto::MultiSigVerifier<T>,
{
type AggregatedSignature = MultiSignature<T>;
fn aggregate(crypto: &dyn Crypto, shares: Vec<&Self>) -> Option<Self::AggregatedSignature> {
// TODO(DFN-1203): Handle crypto failure
let signature_map =
BTreeMap::from_iter(shares.iter().map(|share| (share.signer, share.signature)));
let combined_signature = crypto
View validator.rs
impl<T: NotaryIssued + Hash + ic_interfaces::crypto::CryptoHashDomain> SignatureVerify
for Signed<T, MultiSignatureShare<T>>
where
for<'a> dyn Crypto + 'a: ic_interfaces::crypto::MultiSigVerifier<T>,
{
fn verify_signature<'a>(
&'a self,
beacon: &'a RandomBeacon,
config: &'a dyn ConsensusConfig,
crypto: &'a dyn Crypto,