Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub fn release_memory_on_gpu(amount: u64, idx: usize) {
pub fn get_op_size_on_gpu(
fhe_operation_int: i16,
input_operands: &[SupportedFheCiphertexts],
// for deterministc randomness functions
// for deterministic randomness functions
) -> Result<u64, FhevmError> {
let fhe_operation: SupportedFheOperations =
fhe_operation_int.try_into().expect("Invalid operation");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub fn trivial_encrypt_be_bytes(output_type: i16, input_bytes: &[u8]) -> Support
};
match output_type {
0 => SupportedFheCiphertexts::FheBool(
FheBool::try_encrypt_trivial(last_byte > 0).expect("trival encrypt bool"),
FheBool::try_encrypt_trivial(last_byte > 0).expect("trivial encrypt bool"),
),
1 => SupportedFheCiphertexts::FheUint4(
FheUint4::try_encrypt_trivial(last_byte).expect("trivial encrypt 4"),
Expand Down Expand Up @@ -740,7 +740,7 @@ pub fn perform_fhe_operation(
fhe_operation_int: i16,
input_operands: &[SupportedFheCiphertexts],
_: usize,
// for deterministc randomness functions
// for deterministic randomness functions
) -> Result<SupportedFheCiphertexts, FhevmError> {
perform_fhe_operation_impl(fhe_operation_int, input_operands)
}
Expand All @@ -750,7 +750,7 @@ pub fn perform_fhe_operation(
fhe_operation_int: i16,
input_operands: &[SupportedFheCiphertexts],
gpu_idx: usize,
// for deterministc randomness functions
// for deterministic randomness functions
) -> Result<SupportedFheCiphertexts, FhevmError> {
use crate::gpu_memory::{get_op_size_on_gpu, release_memory_on_gpu, reserve_memory_on_gpu};

Expand All @@ -767,7 +767,7 @@ pub fn perform_fhe_operation(
pub fn perform_fhe_operation_impl(
fhe_operation_int: i16,
input_operands: &[SupportedFheCiphertexts],
// for deterministc randomness functions
// for deterministic randomness functions
) -> Result<SupportedFheCiphertexts, FhevmError> {
let fhe_operation: SupportedFheOperations = fhe_operation_int.try_into()?;
match fhe_operation {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ impl SupportedFheCiphertexts {
}

// Decompress without checking if enough GPU memory is available -
// used when GPU featre is active, but decompressing on CPU
// used when GPU feature is active, but decompressing on CPU
pub fn decompress_no_memcheck(ct_type: i16, list: &[u8]) -> Result<Self> {
let ctlist: CompressedCiphertextList = safe_deserialize(list)?;
Self::decompress_impl(ct_type, &ctlist)
Expand Down
2 changes: 1 addition & 1 deletion coprocessor/fhevm-engine/gw-listener/src/sks_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub fn extract_server_key_without_ns(sns_key: &[u8]) -> anyhow::Result<Vec<u8>>
anyhow::bail!("Server key does not have noise squashing");
}
if noise_squashing_compression_key.is_none() {
anyhow::bail!("Server key does not have noise squashing compresion");
anyhow::bail!("Server key does not have noise squashing compression");
}
if re_randomization_keyswitching_key.is_none() {
anyhow::bail!("Server key does not have rerandomisation");
Expand Down
8 changes: 4 additions & 4 deletions coprocessor/fhevm-engine/host-listener/src/cmd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ impl InfiniteLogIter {
))
}

async fn get_missings_ancestors(
async fn get_missing_ancestors(
&self,
mut current_block: BlockSummary,
) -> Vec<BlockSummary> {
Expand Down Expand Up @@ -730,7 +730,7 @@ impl InfiniteLogIter {
}

let missing_blocks =
self.get_missings_ancestors(current_block_summary).await;
self.get_missing_ancestors(current_block_summary).await;
if missing_blocks.is_empty() {
// we don't add to history from which we have no event
// e.g. at timeout, because empty blocks are not get_logs
Expand Down Expand Up @@ -762,7 +762,7 @@ impl InfiniteLogIter {
// note subscribing to real-time before reading catchup
// events to have the minimal gap between the two
// TODO: but it does not guarantee no gap for now
// (implementation dependant)
// (implementation dependent)
// subscribe_logs does not honor from_block and sometime not to_block
// so we rely on catchup_blocks and end_at_block_reached
self.stream = Some(provider.subscribe_blocks().await?.into_stream());
Expand All @@ -784,7 +784,7 @@ impl InfiniteLogIter {
};
let next_opt_event = stream.next();
// it assume the eventual discard of next_opt_event is handled correctly
// by alloy if not the case, the recheck mecanism ensures it's
// by alloy if not the case, the recheck mechanism ensures it's
// only extra latency
match tokio::time::timeout(
Duration::from_secs(self.block_time + 2),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl Transaction {
allowed_handle: Vec::with_capacity(5),
input_tx: HashSet::with_capacity(3),
output_tx: HashSet::with_capacity(3),
linear_chain: tx_hash, // before coallescing linear tx chains
linear_chain: tx_hash, // before coalescing linear tx chains
size: 0,
depth_size: 0,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ impl Database {
block_number: u64,
transaction_id: Option<Vec<u8>>,
) -> Result<bool, SqlxError> {
// ON CONFLIT is done on Unique constraint
// ON CONFLICT is done on Unique constraint
let query = sqlx::query!(
"INSERT INTO delegate_user_decrypt(
delegator, delegate, contract_address, delegation_counter, old_expiration_date, new_expiration_date, host_chain_id, block_number, block_hash, transaction_id, on_gateway, reorg_out)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ async fn test_listener_no_event_loss(
let mut acl_events_count = 0;
let mut nb_kill = 1;
let nb_wallets = setup.wallets.len() as i64;
// Restart/kill many time until no more events are consumned.
// Restart/kill many time until no more events are consumed.
for _ in 1..120 {
// 10 mins max to avoid stalled CI
let listener_handle = tokio::spawn(main(args.clone()));
Expand Down
4 changes: 2 additions & 2 deletions coprocessor/fhevm-engine/scheduler/src/dfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ impl DFGraph {
}
}

pub fn add_execution_depedences<TNode, TEdge>(
pub fn add_execution_dependences<TNode, TEdge>(
graph: &Dag<TNode, TEdge>,
execution_graph: &mut Dag<ExecNode, ()>,
node_map: HashMap<NodeIndex, NodeIndex>,
Expand Down Expand Up @@ -759,7 +759,7 @@ pub fn partition_preserving_parallelism<TNode, TEdge>(
execution_graph[ex_node].df_nodes = df_nodes;
}
}
add_execution_depedences(graph, execution_graph, node_map)
add_execution_dependences(graph, execution_graph, node_map)
}

pub fn partition_components<TNode, TEdge>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ impl LockMngr {
}
};

// Since UPDATE always aquire a row-level lock internally,
// Since UPDATE always acquire a row-level lock internally,
// this acts as atomic_exchange
let rows = if let Some(update_at) = update_at {
sqlx::query!(
Expand Down
8 changes: 4 additions & 4 deletions coprocessor/fhevm-engine/tfhe-worker/src/tfhe_worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ async fn tfhe_worker_cycle(
&pool,
)
.await?;
let mut immedially_poll_more_work = false;
let mut immediately_poll_more_work = false;
let mut no_progress_cycles = 0;
loop {
// only if previous iteration had no work done do the wait
if !immedially_poll_more_work {
if !immediately_poll_more_work {
tokio::select! {
_ = listener.try_recv() => {
WORK_ITEMS_NOTIFICATIONS_COUNTER.inc();
Expand Down Expand Up @@ -160,7 +160,7 @@ async fn tfhe_worker_cycle(
if has_more_work {
// We've fetched work, so we'll poll again without waiting
// for a notification after this cycle.
immedially_poll_more_work = true;
immediately_poll_more_work = true;
} else {
dcid_mngr.release_current_lock(true, None).await?;
dcid_mngr.do_cleanup().await?;
Expand All @@ -171,7 +171,7 @@ async fn tfhe_worker_cycle(
let mut s = tracer.start_with_context("query_dependence_chain", &loop_ctx);

let (dependence_chain_id, _) = dcid_mngr.acquire_next_lock().await?;
immedially_poll_more_work = dependence_chain_id.is_some();
immediately_poll_more_work = dependence_chain_id.is_some();

s.set_attribute(KeyValue::new(
"dependence_chain_id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ struct Conf {
#[arg(
long,
default_value = "648000", // 3 months assuming 12s block time on host chain
help = "Clear delegation entries after N blocks (deault to 3 months)"
help = "Clear delegation entries after N blocks (default to 3 months)"
)]
pub delegation_clear_after_n_blocks: u64,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub struct DelegationRow {

#[derive(Copy, Clone)]
enum BlockStatus {
Unkown, // the status could not be determined
Unknown, // the status could not be determined
Stable, // block is still valid
Dismissed, // block has been reorged out
}
Expand Down Expand Up @@ -151,7 +151,7 @@ impl<P: Provider<Ethereum> + Clone + 'static> DelegateUserDecryptOperation<P> {
warn!(
%error,
?delegation,
"{operation} sending with transient error. Will retry indefinitively"
"{operation} sending with transient error. Will retry indefinitely"
);
return TxResult::TransientError;
}
Expand Down Expand Up @@ -263,7 +263,7 @@ impl<P: Provider<Ethereum> + Clone + 'static> DelegateUserDecryptOperation<P> {
"Cannot get block hash for delegation, will retry next block"
);
unsure_block.push(delegation.block_number);
BlockStatus::Unkown
BlockStatus::Unknown
}
};
blocks_status.insert(delegation.block_number, status);
Expand All @@ -273,7 +273,7 @@ impl<P: Provider<Ethereum> + Clone + 'static> DelegateUserDecryptOperation<P> {
BlockStatus::Stable => {
stable_delegations.push(delegation.clone());
}
BlockStatus::Unkown => {
BlockStatus::Unknown => {
// skip the full block, will retry on the delegation on next call
nb_unsure_delegations += 1;
continue;
Expand Down Expand Up @@ -326,7 +326,7 @@ impl<P: Provider<Ethereum> + Clone + 'static> DelegateUserDecryptOperation<P> {
let block_number = self.host_chain_provider.get_block_number().await?;
warn!(
block_number,
"Delegation notification, based on timeout, use last block nmber"
"Delegation notification, based on timeout, use last block number"
);
return Ok(block_number);
};
Expand Down Expand Up @@ -401,7 +401,7 @@ where
all_transaction_id.insert(tx_id);
}
// we don't split by transition_id because delegations have an internal order
// it's expected that both order are compatible but we don't now the transation_id order
// it's expected that both order are compatible but we don't know the transaction_id order
let ts = all_transaction_id
.iter()
.map(|id| telemetry::tracer("prepare_delegate", id))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ where
error!(
channel = op_channel,
error = %e,
"Backend gone error, stopping operation and signalling other operations to stop"
"Backend gone error, stopping operation and signaling other operations to stop"
);
token.cancel();
return Err(e);
Expand Down
2 changes: 1 addition & 1 deletion coprocessor/fhevm-engine/zkproof-worker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub enum ExecutionError {
InvalidProof(i64, String),

#[error("Fhevm error: {0}")]
FaildFhevm(#[from] FhevmError),
FailedFhevm(#[from] FhevmError),

#[error("Server keys not found {0}")]
ServerKeysNotFound(String),
Expand Down
2 changes: 1 addition & 1 deletion kms-connector/crates/gw-listener/src/core/gw_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ mod tests {
async fn test_listener_ended_by_end_of_any_task() {
let (mut test_instance, _asserter, gw_listener) = test_setup(None).await;

// Will stop because some subcription tasks will not be able to init their event filter
// Will stop because some subscription tasks will not be able to init their event filter
gw_listener.start().await;

test_instance.wait_for_log("Failed to subscribe to").await;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async fn test_parallel_crsgen_picking() -> anyhow::Result<()> {
#[rstest]
#[timeout(Duration::from_secs(60))]
#[tokio::test]
#[ignore = "Not possible to have parallel PRSS Init the only ID currenly allowed is 1"]
#[ignore = "Not possible to have parallel PRSS Init the only ID currently allowed is 1"]
async fn test_parallel_prss_init_picking() -> anyhow::Result<()> {
test_parallel_request_picking(EventType::PrssInit).await
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fn main() -> Result<()> {
.with_signature("eed514aa094b8a9aff0314a749eef12e2d1d36c44484f1814ae1be9aeb8a9eef41e87d2bde2019131f81a25dcc482bcc0d1ed3cc9f65ebda0a44b9fc42f091621b")
.with_json_response(json_response)
.with_verification(true)
.with_domain("Authorization token")// Be carefull, domain should be Decryption, but this example has been generated with Authorization token
.with_domain("Authorization token")// Be careful, domain should be Decryption, but this example has been generated with Authorization token
.process();

match result {
Expand Down
14 changes: 7 additions & 7 deletions test-suite/fhevm/fhevm-cli
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ export CONNECTOR_KMS_WORKER_VERSION=${CONNECTOR_KMS_WORKER_VERSION:-"v0.11.0-1"}
export CONNECTOR_TX_SENDER_VERSION=${CONNECTOR_TX_SENDER_VERSION:-"v0.11.0-1"}

# Coprocessor services.
export COPROCESSOR_DB_MIGRATION_VERSION=${COPROCESSOR_DB_MIGRATION_VERSION:-"v0.11.0-1"}
export COPROCESSOR_GW_LISTENER_VERSION=${COPROCESSOR_GW_LISTENER_VERSION:-"v0.11.0-1"}
export COPROCESSOR_HOST_LISTENER_VERSION=${COPROCESSOR_HOST_LISTENER_VERSION:-"v0.11.0-1"}
export COPROCESSOR_TX_SENDER_VERSION=${COPROCESSOR_TX_SENDER_VERSION:-"v0.11.0-1"}
export COPROCESSOR_TFHE_WORKER_VERSION=${COPROCESSOR_TFHE_WORKER_VERSION:-"v0.11.0-1"}
export COPROCESSOR_SNS_WORKER_VERSION=${COPROCESSOR_SNS_WORKER_VERSION:-"v0.11.0-1"}
export COPROCESSOR_ZKPROOF_WORKER_VERSION=${COPROCESSOR_ZKPROOF_WORKER_VERSION:-"v0.11.0-1"}
export COPROCESSOR_DB_MIGRATION_VERSION=${COPROCESSOR_DB_MIGRATION_VERSION:-"a4a9aa4"}
export COPROCESSOR_GW_LISTENER_VERSION=${COPROCESSOR_GW_LISTENER_VERSION:-"a4a9aa4"}
export COPROCESSOR_HOST_LISTENER_VERSION=${COPROCESSOR_HOST_LISTENER_VERSION:-"a4a9aa4"}
export COPROCESSOR_TX_SENDER_VERSION=${COPROCESSOR_TX_SENDER_VERSION:-"a4a9aa4"}
export COPROCESSOR_TFHE_WORKER_VERSION=${COPROCESSOR_TFHE_WORKER_VERSION:-"a4a9aa4"}
export COPROCESSOR_SNS_WORKER_VERSION=${COPROCESSOR_SNS_WORKER_VERSION:-"a4a9aa4"}
export COPROCESSOR_ZKPROOF_WORKER_VERSION=${COPROCESSOR_ZKPROOF_WORKER_VERSION:-"a4a9aa4"}

# Gateway and Host contracts.
export GATEWAY_VERSION=${GATEWAY_VERSION:-"v0.11.0-1"}
Expand Down
2 changes: 1 addition & 1 deletion test-suite/gateway-stress/src/blockchain/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ impl GatewayTestManager {
///
/// - One is used to track when requests are received by the Gateway (tx receipt was received).
/// - The other is used to track when responses are received by the Gateway (response event was
/// catched).
/// caught).
fn init_progress_bars(
config: &Config,
progress_tracker: &MultiProgress,
Expand Down
4 changes: 2 additions & 2 deletions test-suite/gateway-stress/src/decryption/public.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,14 @@ pub async fn init_public_decryption_response_listener<P: Provider>(
>,
>,
> {
debug!("Subcribing to PublicDecryptionResponse events...");
debug!("Subscribing to PublicDecryptionResponse events...");
let mut response_filter = decryption_contract
.PublicDecryptionResponse_filter()
.watch()
.await
.map_err(|e| anyhow!("Failed to subscribe to PublicDecryptionResponse {e}"))?;
debug!(
"Subcribed to PublicDecryptionResponse events! Can start sending PublicDecryptionRequests..."
"Subscribed to PublicDecryptionResponse events! Can start sending PublicDecryptionRequests..."
);

response_filter.poller = response_filter
Expand Down
4 changes: 2 additions & 2 deletions test-suite/gateway-stress/src/decryption/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ pub async fn init_user_decryption_response_listener<P: Provider>(
>,
>,
> {
debug!("Subcribing to UserDecryptionResponseThresholdReached events...");
debug!("Subscribing to UserDecryptionResponseThresholdReached events...");
let mut response_filter = decryption_contract
.UserDecryptionResponseThresholdReached_filter()
.watch()
Expand All @@ -219,7 +219,7 @@ pub async fn init_user_decryption_response_listener<P: Provider>(
anyhow!("Failed to subscribe to UserDecryptionResponseThresholdReached {e}")
})?;
debug!(
"Subcribed to UserDecryptionResponseThresholdReached events! \
"Subscribed to UserDecryptionResponseThresholdReached events! \
Can start sending UserDecryptionRequests..."
);

Expand Down
9 changes: 8 additions & 1 deletion typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ extend-exclude = [
"*.min.js",
"*.min.css",
# Docs-only scope for now: exclude source/config/test files
"*.rs",
"*.sol",
"*.js",
"*.sql",
Expand Down Expand Up @@ -100,6 +99,14 @@ authorised = "authorised"
decentralised = "decentralised"
artefacts = "artefacts"
misbehaviour = "misbehaviour"
randomise = "randomise"
randomised = "randomised"
randomising = "randomising"
randomisation = "randomisation"
rerandomise = "rerandomise"
rerandomised = "rerandomised"
rerandomising = "rerandomising"
rerandomisation = "rerandomisation"

# FHE/TFHE terminology - these are valid domain-specific terms
euint = "euint" # encrypted unsigned integer type prefix
Expand Down
Loading