Skip to content

Commit

Permalink
[License] Continue to correct license headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshLind committed Mar 26, 2024
1 parent dd0ae4e commit 18c288a
Show file tree
Hide file tree
Showing 157 changed files with 167 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{components::get_signer_arg, utils::generate_governance_proposal};
use aptos_types::on_chain_config::OnChainJWKConsensusConfig;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{components::get_signer_arg, utils::generate_governance_proposal};
use move_model::{code_writer::CodeWriter, emitln, model::Loc};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{components::get_signer_arg, utils::generate_governance_proposal};
use aptos_types::on_chain_config::OnChainRandomnessConfig;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use aptos_aggregator::{
bounded_math::{BoundedMath, SignedU128},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{assert_success, build_package, tests::common, MoveHarness};
use aptos_cached_packages::aptos_stdlib;
Expand Down
1 change: 1 addition & 0 deletions aptos-move/framework/src/natives/consensus_config.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use aptos_native_interface::{
safely_pop_arg, RawSafeNative, SafeNativeBuilder, SafeNativeContext, SafeNativeResult,
Expand Down
1 change: 1 addition & 0 deletions aptos-move/framework/src/natives/randomness.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use aptos_native_interface::{
RawSafeNative, SafeNativeBuilder, SafeNativeContext, SafeNativeError, SafeNativeResult,
Expand Down
1 change: 1 addition & 0 deletions consensus/src/dag/health/backoff.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use super::{pipeline_health::TPipelineHealth, TChainHealth};
use aptos_config::config::DagPayloadConfig;
Expand Down
1 change: 1 addition & 0 deletions consensus/src/dag/health/chain_health.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
counters::CHAIN_HEALTH_BACKOFF_TRIGGERED,
Expand Down
1 change: 1 addition & 0 deletions consensus/src/dag/health/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

mod backoff;
mod chain_health;
Expand Down
1 change: 1 addition & 0 deletions consensus/src/dag/health/pipeline_health.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
dag::adapter::OrderedNotifierAdapter, liveness::proposal_generator::PipelineBackpressureConfig,
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-crypto/src/poseidon_bn254.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

//! Implements the Poseidon hash function for BN-254, which hashes $\le$ 16 field elements and
//! produces a single field element as output.
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/algebra/fft.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::algebra::evaluation_domain::EvaluationDomain;
use blstrs::Scalar;
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/algebra/lagrange.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::algebra::{
evaluation_domain::BatchEvaluationDomain,
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/algebra/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

pub mod evaluation_domain;
pub mod fft;
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/pvss/das/enc.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::pvss::{
encryption_dlog::g1::{DecryptPrivKey, EncryptPubKey},
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/pvss/das/input_secret.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::pvss::{
das, dealt_pub_key::g2::DealtPubKey, dealt_secret_key::g1::DealtSecretKey,
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/pvss/das/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

mod enc;
mod input_secret;
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/pvss/das/public_parameters.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

//! This submodule implements the *public parameters* for this PVSS scheme.

Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/pvss/das/unweighted_protocol.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
algebra::polynomials::{get_nonzero_powers_of_tau, shamir_secret_share},
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/pvss/das/weighted_protocol.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
algebra::polynomials::shamir_secret_share,
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/pvss/insecure_field/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

mod transcript;

Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/pvss/insecure_field/transcript.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
algebra::polynomials::shamir_secret_share,
Expand Down
2 changes: 2 additions & 0 deletions crates/aptos-dkg/src/pvss/low_degree_test.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

/// Low-degree test from the SCRAPE paper that checks whether $n$ evaluations encode a degree $\le t-1$
/// polynomial.
use crate::{
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/pvss/traits/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

pub mod transcript;

Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/pvss/traits/transcript.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

//! # Traits for authenticated PVSS transcripts
//!
Expand Down
2 changes: 2 additions & 0 deletions crates/aptos-dkg/src/pvss/weighted/generic_weighting.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

/// A generic transformation from an unweighted PVSS to a weighted PVSS.
///
/// WARNING: This will **NOT** necessarily be secure for any PVSS scheme, since it will reuse encryption
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/pvss/weighted/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

pub mod generic_weighting;
mod weighted_config;
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/pvss/weighted/weighted_config.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
algebra::evaluation_domain::{BatchEvaluationDomain, EvaluationDomain},
Expand Down
2 changes: 2 additions & 0 deletions crates/aptos-dkg/src/utils/random.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

/// TODO(Security): This file is a workaround for the `rand_core_hell` issue, briefly described below.
///
/// Ideally, we would write the following sane code:
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/weighted_vuf/bls/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
algebra::lagrange::lagrange_coefficients,
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/weighted_vuf/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

pub mod bls;
pub mod pinkas;
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/weighted_vuf/pinkas/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
algebra::{lagrange::lagrange_coefficients, polynomials::get_powers_of_tau},
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-dkg/src/weighted_vuf/traits.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

//! Notes: Unlike PVSS, we do NOT want to use a generic unweighted-to-weighted VUF transformation,
//! since we have a more optimized transformation for some VRF schemes (e.g., BLS and [GJM+21e]).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error: enum variant must have exactly one field
--> tests/cases/multiple_fields.rs:6:1
--> tests/cases/multiple_fields.rs:7:1
|
6 | / enum Messages {
7 | | Test(String, String)
8 | | }
7 | / enum Messages {
8 | | Test(String, String)
9 | | }
| |_^
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error: enum variant must have exactly one field
--> tests/cases/no_fields.rs:6:1
--> tests/cases/no_fields.rs:7:1
|
6 | / enum Messages {
7 | | Test
8 | | }
7 | / enum Messages {
8 | | Test
9 | | }
| |_^
1 change: 1 addition & 0 deletions crates/aptos-jwk-consensus/src/counters.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use aptos_metrics_core::{register_histogram_vec, register_int_gauge, HistogramVec, IntGauge};
use once_cell::sync::Lazy;
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-jwk-consensus/src/epoch_manager.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
jwk_manager::JWKManager,
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-jwk-consensus/src/jwk_manager/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
jwk_observer::JWKObserver,
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-jwk-consensus/src/jwk_manager/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
jwk_manager::{ConsensusState, JWKManager, PerProviderState, QuorumCertProcessGuard},
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-jwk-consensus/src/jwk_observer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::counters::OBSERVATION_SECONDS;
use anyhow::Result;
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-jwk-consensus/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
epoch_manager::EpochManager, network::NetworkTask,
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-jwk-consensus/src/network.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
network_interface::{JWKConsensusNetworkClient, RPC},
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-jwk-consensus/src/network_interface.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::types::JWKConsensusMsg;
use aptos_config::network_id::{NetworkId, PeerNetworkId};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::types::{
JWKConsensusMsg, ObservedUpdate, ObservedUpdateRequest, ObservedUpdateResponse,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
observation_aggregation::ObservationAggregationState,
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-jwk-consensus/src/types.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use aptos_crypto::bls12381::Signature;
use aptos_enum_conversion_derive::EnumConversion;
Expand Down
1 change: 1 addition & 0 deletions crates/aptos-jwk-consensus/src/update_certifier.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
observation_aggregation::ObservationAggregationState,
Expand Down
1 change: 1 addition & 0 deletions crates/bounded-executor/src/concurrent_stream.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::BoundedExecutor;
use futures::{
Expand Down
1 change: 1 addition & 0 deletions crates/bounded-executor/src/executor.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

//! A bounded tokio [`Handle`]. Only a bounded number of tasks can run
//! concurrently when spawned through this executor, defined by the initial
Expand Down
1 change: 1 addition & 0 deletions devtools/aptos-cargo-cli/src/bin/cargo-x.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use aptos_cargo_cli::{AptosCargoCommand, SelectedPackageArgs};
use clap::Parser;
Expand Down
1 change: 1 addition & 0 deletions devtools/aptos-cargo-cli/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

mod cargo;
mod common;
Expand Down
1 change: 1 addition & 0 deletions devtools/aptos-cargo-cli/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

#![forbid(unsafe_code)]

Expand Down
2 changes: 2 additions & 0 deletions dkg/src/dkg_manager/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
agg_trx_producer::TAggTranscriptProducer, counters::DKG_STAGE_SECONDS,
network::IncomingRpcRequest, DKGMessage,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

pub mod storage;
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
access_trait::{AccessMetadata, StorageReadError, StorageReadStatus, StorageTransactionRead},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
access_trait::{AccessMetadata, StorageReadError, StorageReadStatus, StorageTransactionRead},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::response_dispatcher::{GrpcResponseDispatcher, ResponseDispatcher};
use aptos_indexer_grpc_data_access::StorageClient;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::response_dispatcher::ResponseDispatcher;
use aptos_indexer_grpc_data_access::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use aptos_indexer_grpc_data_access::StorageClient;
use aptos_protos::indexer::v1::TransactionsResponse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{counters::CHANNEL_SIZE, stream_coordinator::IndexerStreamCoordinator, ServiceContext};
use aptos_indexer_grpc_utils::counters::{log_grpc_step_fullnode, IndexerGrpcStep};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::default_file_storage_format;
use aptos_protos::{indexer::v1::TransactionsInStorage, transaction::v1::Transaction};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::compression_util::{CacheEntry, StorageFormat};
use anyhow::Context;
Expand Down
1 change: 1 addition & 0 deletions ecosystem/nft-metadata-crawler-parser/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{
utils::{
Expand Down

0 comments on commit 18c288a

Please sign in to comment.