diff --git a/scalable-dex/contracts/src/components/ActionHash.sol b/scalable-dex/contracts/src/components/ActionHash.sol index 33b3abb..cdc7c33 100644 --- a/scalable-dex/contracts/src/components/ActionHash.sol +++ b/scalable-dex/contracts/src/components/ActionHash.sol @@ -19,7 +19,7 @@ contract ActionHash is MainStorage, LibConstants { function setActionHash(bytes32 actionHash, bool premiumCost) internal { // The rate of forced trade requests is restricted. // First restriction is by capping the number of requests in a block. - // User can override this cap by requesting with a permium flag set, + // User can override this cap by requesting with a premium flag set, // in this case, the gas cost is high (~1M) but no "technical" limit is set. // However, the high gas cost creates an obvious limitation due to the block gas limit. if (premiumCost) { diff --git a/scalable-dex/contracts/src/components/AvailabilityVerifiers.sol b/scalable-dex/contracts/src/components/AvailabilityVerifiers.sol index d86075f..250ec6b 100644 --- a/scalable-dex/contracts/src/components/AvailabilityVerifiers.sol +++ b/scalable-dex/contracts/src/components/AvailabilityVerifiers.sol @@ -7,7 +7,7 @@ import "./MainStorage.sol"; /** A :sol:mod:`Committee` contract is a contract that the exchange service sends committee member - signatures to attesting that they have a copy of the data over which a new Merkel root is to be + signatures to attest that they have a copy of the data over which a new Merkel root is to be accepted as the new state root. In addition, the exchange contract can call an availability verifier to check if such signatures were indeed provided by a sufficient number of committee members as hard coded in the :sol:mod:`Committee` contract for a given state transition diff --git a/scalable-dex/contracts/src/components/FactRegistry.sol b/scalable-dex/contracts/src/components/FactRegistry.sol index 399fc84..dc45a59 100644 --- a/scalable-dex/contracts/src/components/FactRegistry.sol +++ b/scalable-dex/contracts/src/components/FactRegistry.sol @@ -19,7 +19,7 @@ contract FactRegistry is IQueryableFactRegistry { /* This is an internal method to check if the fact is already registered. - In current implementation of FactRegistry it's identical to isValid(). + In the current implementation of FactRegistry it's identical to isValid(). But the check is against the local fact registry, So for a derived referral fact registry, it's not the same. */ diff --git a/scalable-dex/contracts/src/components/MainGovernance.sol b/scalable-dex/contracts/src/components/MainGovernance.sol index 9d73584..f3695f1 100644 --- a/scalable-dex/contracts/src/components/MainGovernance.sol +++ b/scalable-dex/contracts/src/components/MainGovernance.sol @@ -21,11 +21,11 @@ import "./GovernanceStorage.sol"; 1. First, an existing governor nominates a new governor (:sol:func:`mainNominateNewGovernor`) 2. Then, the new governor must accept governance to become a governor (:sol:func:`mainAcceptGovernance`) - This two step procedure ensures that a governor public key cannot be nominated unless there is an + This two step procedure ensures that a governor's public key cannot be nominated unless there is an entity that has the corresponding private key. This is intended to prevent errors in the addition process. - The governor private key should typically be held in a secure cold wallet. + The governor's private key should typically be held in a secure cold wallet. */ /* Implements Governance for the StarkDex main contract. diff --git a/scalable-dex/contracts/src/components/MainStorage.sol b/scalable-dex/contracts/src/components/MainStorage.sol index 7270ee9..17dcec9 100644 --- a/scalable-dex/contracts/src/components/MainStorage.sol +++ b/scalable-dex/contracts/src/components/MainStorage.sol @@ -54,7 +54,7 @@ contract MainStorage is ProxyStorage { // True if and only if the address is allowed to add tokens. mapping(address => bool) tokenAdmins; - // This mapping is no longer in use, remains for backwards compatibility. + // This mapping is no longer in use, remains for backward compatibility. mapping(address => bool) userAdmins_DEPRECATED; // NOLINT: naming-convention. // True if and only if the address is an operator (allowed to update state). @@ -69,7 +69,7 @@ contract MainStorage is ProxyStorage { // Mapping from contract ID to quantum. mapping(uint256 => uint256) assetTypeToQuantum; // NOLINT: uninitialized-state. - // This mapping is no longer in use, remains for backwards compatibility. + // This mapping is no longer in use, remains for backward compatibility. mapping(address => uint256) starkKeys_DEPRECATED; // NOLINT: naming-convention. // Mapping from STARK public key to the Ethereum public key of its owner. @@ -91,7 +91,7 @@ contract MainStorage is ProxyStorage { // Onchain-data version configured for the system. uint256 onchainDataVersion_DEPRECATED; // NOLINT: naming-convention constable-states. - // Counter of forced action request in block. The key is the block number. + // Counter of forced action request in a block. The key is the block number. mapping(uint256 => uint256) forcedRequestsInBlock; // ForcedAction requests: actionHash => requestTime. diff --git a/scalable-dex/contracts/src/components/PedersenMerkleVerifier.sol b/scalable-dex/contracts/src/components/PedersenMerkleVerifier.sol index 54c7408..aee7484 100644 --- a/scalable-dex/contracts/src/components/PedersenMerkleVerifier.sol +++ b/scalable-dex/contracts/src/components/PedersenMerkleVerifier.sol @@ -195,7 +195,7 @@ contract PedersenMerkleVerifier { // For k = 0..HASHES-1, Compute the k'th hash by summing the k'th column in table. // Instead of k we use offset := k * sizeof(EC point). - // Additonally we use ptr := offset + j * rowSize to ge over the EC points we want + // Additionally we use ptr := offset + j * rowSize to ge over the EC points we want // to sum. for { diff --git a/scalable-dex/contracts/src/components/Users.sol b/scalable-dex/contracts/src/components/Users.sol index bc038a9..b84ffcb 100644 --- a/scalable-dex/contracts/src/components/Users.sol +++ b/scalable-dex/contracts/src/components/Users.sol @@ -38,7 +38,7 @@ import "../libraries/LibConstants.sol"; 1. The key registered is not zero and has not been registered in the past by the user or anyone else. 2. The key provided represents a valid point on the Stark-friendly elliptic curve. 3. The linkage between the provided Ethereum address and the selected Stark Key is signed using - the privte key of the selected Stark Key. + the private key of the selected Stark Key. If the above holds, the Ethereum address is registered by the contract, mapping it to the Stark Key. */ diff --git a/scalable-dex/contracts/src/components/Verifiers.sol b/scalable-dex/contracts/src/components/Verifiers.sol index c05ba06..c5f82f2 100644 --- a/scalable-dex/contracts/src/components/Verifiers.sol +++ b/scalable-dex/contracts/src/components/Verifiers.sol @@ -12,7 +12,7 @@ import "./MainStorage.sol"; of the assumed proof). The exchange contract will normally query only one verifier contract for proof validity checks. - However, in the event that the verifier algorithm needs to updated, additional verifiers may be + However, in the event that the verifier algorithm needs to be updated, additional verifiers may be registered with the exchange contract by the contract :sol:mod:`MainGovernance`. Such new verifiers are then also be required to attest to the validity of state transitions and only if all the verifiers attest to the validity the state transition is accepted.