Skip to content
Draft
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
8 changes: 4 additions & 4 deletions aptos-move/framework/aptos-stdlib/doc/bls12381.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,21 +312,21 @@ The public key size, in bytes
<a id="0x1_bls12381_RANDOM_PK"></a>

Random signature generated by running <code>cargo test -- bls12381_sample_signature --nocapture --<b>include</b>-ignored</code> in <code>crates/aptos-crypto</code>.
The associated SK is 07416693b6b32c84abe45578728e2379f525729e5b94762435a31e65ecc728da.
The associated SK is 2692ef93b9f00fde863c8cf01755ddfc7a56c993f2310a1dea0773c14382c455.


<pre><code><b>const</b> <a href="bls12381.md#0x1_bls12381_RANDOM_PK">RANDOM_PK</a>: <a href="../../move-stdlib/doc/vector.md#0x1_vector">vector</a>&lt;u8&gt; = [138, 83, 231, 174, 82, 112, 227, 231, 101, 205, 138, 64, 50, 194, 231, 124, 111, 126, 135, 164, 78, 187, 133, 191, 40, 164, 215, 134, 85, 101, 105, 143, 151, 83, 70, 113, 66, 98, 249, 228, 124, 111, 62, 13, 93, 149, 22, 96];
<pre><code><b>const</b> <a href="bls12381.md#0x1_bls12381_RANDOM_PK">RANDOM_PK</a>: <a href="../../move-stdlib/doc/vector.md#0x1_vector">vector</a>&lt;u8&gt; = [136, 86, 166, 60, 29, 150, 121, 240, 207, 238, 148, 132, 73, 35, 115, 109, 121, 215, 173, 55, 48, 66, 144, 117, 206, 226, 239, 233, 71, 111, 233, 66, 72, 167, 47, 173, 16, 223, 169, 78, 126, 40, 116, 86, 184, 3, 218, 15];
</code></pre>



<a id="0x1_bls12381_RANDOM_SIGNATURE"></a>

Random signature generated by running <code>cargo test -- bls12381_sample_signature --nocapture --<b>include</b>-ignored</code> in <code>crates/aptos-crypto</code>.
The message signed is "Hello Supra!" and the associated SK is 07416693b6b32c84abe45578728e2379f525729e5b94762435a31e65ecc728da.
The message signed is "Hello Supra!" and the associated SK is 2692ef93b9f00fde863c8cf01755ddfc7a56c993f2310a1dea0773c14382c455.


<pre><code><b>const</b> <a href="bls12381.md#0x1_bls12381_RANDOM_SIGNATURE">RANDOM_SIGNATURE</a>: <a href="../../move-stdlib/doc/vector.md#0x1_vector">vector</a>&lt;u8&gt; = [160, 26, 101, 133, 79, 152, 125, 52, 52, 20, 155, 127, 8, 247, 7, 48, 227, 11, 36, 25, 132, 232, 113, 43, 194, 172, 168, 133, 214, 50, 170, 252, 237, 76, 63, 102, 18, 9, 222, 187, 107, 28, 134, 1, 50, 102, 35, 204, 22, 202, 47, 108, 158, 220, 83, 183, 184, 139, 116, 53, 251, 107, 5, 221, 236, 228, 24, 210, 195, 77, 198, 172, 162, 245, 161, 26, 121, 230, 119, 116, 88, 44, 20, 8, 74, 1, 220, 183, 130, 14, 76, 180, 186, 208, 234, 141];
<pre><code><b>const</b> <a href="bls12381.md#0x1_bls12381_RANDOM_SIGNATURE">RANDOM_SIGNATURE</a>: <a href="../../move-stdlib/doc/vector.md#0x1_vector">vector</a>&lt;u8&gt; = [130, 99, 204, 129, 151, 224, 244, 181, 240, 188, 141, 35, 68, 234, 102, 41, 179, 210, 45, 48, 136, 201, 121, 203, 103, 55, 87, 52, 180, 245, 51, 96, 155, 12, 126, 126, 228, 12, 211, 226, 179, 66, 112, 35, 213, 89, 106, 209, 5, 86, 224, 16, 252, 36, 23, 157, 201, 34, 24, 94, 128, 176, 55, 226, 135, 228, 92, 119, 164, 255, 113, 204, 225, 82, 212, 103, 174, 208, 112, 74, 64, 221, 223, 136, 252, 102, 142, 166, 5, 218, 112, 46, 140, 177, 12, 4];
</code></pre>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,12 @@ module aptos_std::bls12381 {
//

/// Random signature generated by running `cargo test -- bls12381_sample_signature --nocapture --include-ignored` in `crates/aptos-crypto`.
/// The message signed is "Hello Aptos!" and the associated SK is 07416693b6b32c84abe45578728e2379f525729e5b94762435a31e65ecc728da.
const RANDOM_SIGNATURE: vector<u8> = x"a01a65854f987d3434149b7f08f70730e30b241984e8712bc2aca885d632aafced4c3f661209debb6b1c8601326623cc16ca2f6c9edc53b7b88b7435fb6b05ddece418d2c34dc6aca2f5a11a79e67774582c14084a01dcb7820e4cb4bad0ea8d";
/// The message signed is "Hello Supra!" and the associated SK is 2692ef93b9f00fde863c8cf01755ddfc7a56c993f2310a1dea0773c14382c455.
const RANDOM_SIGNATURE: vector<u8> = x"8263cc8197e0f4b5f0bc8d2344ea6629b3d22d3088c979cb67375734b4f533609b0c7e7ee40cd3e2b3427023d5596ad10556e010fc24179dc922185e80b037e287e45c77a4ff71cce152d467aed0704a40dddf88fc668ea605da702e8cb10c04";

/// Random signature generated by running `cargo test -- bls12381_sample_signature --nocapture --include-ignored` in `crates/aptos-crypto`.
/// The associated SK is 07416693b6b32c84abe45578728e2379f525729e5b94762435a31e65ecc728da.
const RANDOM_PK: vector<u8> = x"8a53e7ae5270e3e765cd8a4032c2e77c6f7e87a44ebb85bf28a4d7865565698f975346714262f9e47c6f3e0d5d951660";
/// The associated SK is 2692ef93b9f00fde863c8cf01755ddfc7a56c993f2310a1dea0773c14382c455.
const RANDOM_PK: vector<u8> = x"8856a63c1d9679f0cfee94844923736d79d7ad3730429075cee2efe9476fe94248a72fad10dfa94e7e287456b803da0f";

//
// Tests
Expand Down Expand Up @@ -740,7 +740,7 @@ module aptos_std::bls12381 {
// Second, try some test-cases generated by running the following command in `crates/aptos-crypto`:
// $ cargo test -- bls12381_sample_aggregate_pk_and_aggsig --nocapture --ignored

// The signed messages are "Hello, Aptos <i>!", where <i> \in {1, ..., 5}
// The signed messages are "Hello, Supra <i>!", where <i> \in {1, ..., 5}
let msgs = vector[
x"48656c6c6f2c204170746f73203121",
x"48656c6c6f2c204170746f73203221",
Expand Down Expand Up @@ -845,23 +845,23 @@ module aptos_std::bls12381 {
// Test case generated by running `cargo test -- bls12381_sample_signature --nocapture --include-ignored` in
// `crates/aptos-crypto`
// =============================================================================================================
// SK: 077c8a56f26259215a4a245373ab6ddf328ac6e00e5ea38d8700efa361bdc58d
// SK: 2692ef93b9f00fde863c8cf01755ddfc7a56c993f2310a1dea0773c14382c455

let message = b"Hello Aptos!";
let message = b"Hello Supra!";

// First, test signatures that verify
let ok = verify_normal_signature(
&signature_from_bytes(x"b01ce4632e94d8c611736e96aa2ad8e0528a02f927a81a92db8047b002a8c71dc2d6bfb94729d0973790c10b6ece446817e4b7543afd7ca9a17c75de301ae835d66231c26a003f11ae26802b98d90869a9e73788c38739f7ac9d52659e1f7cf7"),
&option::extract(&mut public_key_from_bytes(x"94209a296b739577cb076d3bfb1ca8ee936f29b69b7dae436118c4dd1cc26fd43dcd16249476a006b8b949bf022a7858")),
&signature_from_bytes(RANDOM_SIGNATURE),
&option::extract(&mut public_key_from_bytes(RANDOM_PK)),
message,
);
assert!(ok == true, 1);

let pk = option::extract(&mut public_key_from_bytes(x"94209a296b739577cb076d3bfb1ca8ee936f29b69b7dae436118c4dd1cc26fd43dcd16249476a006b8b949bf022a7858"));
let pk = option::extract(&mut public_key_from_bytes(RANDOM_PK));
let pk_with_pop = PublicKeyWithPoP { bytes: pk.bytes };

let ok = verify_signature_share(
&signature_from_bytes(x"b01ce4632e94d8c611736e96aa2ad8e0528a02f927a81a92db8047b002a8c71dc2d6bfb94729d0973790c10b6ece446817e4b7543afd7ca9a17c75de301ae835d66231c26a003f11ae26802b98d90869a9e73788c38739f7ac9d52659e1f7cf7"),
&signature_from_bytes(RANDOM_SIGNATURE),
&pk_with_pop,
message,
);
Expand All @@ -879,9 +879,9 @@ module aptos_std::bls12381 {
x"82ed7bb5528303a2e306775040a7309e0bd597b70d9949d8c6198a01a7be0b00079320ebfeaf7bbd5bfe86809940d252",
];
let messages = vector[
b"Hello Aptos!",
b"Hello Aptos!",
b"Bello Aptos!",
b"Hello Supra!",
b"Hello Supra!",
b"Bello Supra!",
];

let i = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module aptos_std::ed25519 {
// Constants
//

/// The identifier of the Ed25519 signature scheme, which is used when deriving Aptos authentication keys by hashing
/// The identifier of the Ed25519 signature scheme, which is used when deriving Supra authentication keys by hashing
/// it together with an Ed25519 public key.
const SIGNATURE_SCHEME_ID: u8 = 0;

Expand Down Expand Up @@ -156,17 +156,17 @@ module aptos_std::ed25519 {
}
}

/// Derives the Aptos-specific authentication key of the given Ed25519 public key.
/// Derives the Supra-specific authentication key of the given Ed25519 public key.
public fun unvalidated_public_key_to_authentication_key(pk: &UnvalidatedPublicKey): vector<u8> {
public_key_bytes_to_authentication_key(pk.bytes)
}

/// Derives the Aptos-specific authentication key of the given Ed25519 public key.
/// Derives the Supra-specific authentication key of the given Ed25519 public key.
public fun validated_public_key_to_authentication_key(pk: &ValidatedPublicKey): vector<u8> {
public_key_bytes_to_authentication_key(pk.bytes)
}

/// Derives the Aptos-specific authentication key of the given Ed25519 public key.
/// Derives the Supra-specific authentication key of the given Ed25519 public key.
fun public_key_bytes_to_authentication_key(pk_bytes: vector<u8>): vector<u8> {
std::vector::push_back(&mut pk_bytes, SIGNATURE_SCHEME_ID);
std::hash::sha3_256(pk_bytes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module aptos_std::multi_ed25519 {
// Constants
//

/// The identifier of the MultiEd25519 signature scheme, which is used when deriving Aptos authentication keys by hashing
/// The identifier of the MultiEd25519 signature scheme, which is used when deriving Supra authentication keys by hashing
/// it together with an MultiEd25519 public key.
const SIGNATURE_SCHEME_ID: u8 = 1;

Expand Down Expand Up @@ -232,7 +232,7 @@ module aptos_std::multi_ed25519 {
signature_verify_strict_internal(multisignature.bytes, public_key.bytes, bcs::to_bytes(&encoded))
}

/// Derives the Aptos-specific authentication key of the given Ed25519 public key.
/// Derives the Supra-specific authentication key of the given Ed25519 public key.
public fun unvalidated_public_key_to_authentication_key(pk: &UnvalidatedPublicKey): vector<u8> {
public_key_bytes_to_authentication_key(pk.bytes)
}
Expand All @@ -255,7 +255,7 @@ module aptos_std::multi_ed25519 {
check_and_get_threshold(pk.bytes)
}

/// Derives the Aptos-specific authentication key of the given Ed25519 public key.
/// Derives the Supra-specific authentication key of the given Ed25519 public key.
public fun validated_public_key_to_authentication_key(pk: &ValidatedPublicKey): vector<u8> {
public_key_bytes_to_authentication_key(pk.bytes)
}
Expand Down Expand Up @@ -298,7 +298,7 @@ module aptos_std::multi_ed25519 {
}
}

/// Derives the Aptos-specific authentication key of the given Ed25519 public key.
/// Derives the Supra-specific authentication key of the given Ed25519 public key.
fun public_key_bytes_to_authentication_key(pk_bytes: vector<u8>): vector<u8> {
vector::push_back(&mut pk_bytes, SIGNATURE_SCHEME_ID);
std::hash::sha3_256(pk_bytes)
Expand Down Expand Up @@ -440,7 +440,7 @@ module aptos_std::multi_ed25519 {
assert!(option::extract(&mut unvalidated_public_key_threshold(&upk)) == threshold, 4);
assert!(unvalidated_public_key_num_sub_pks(&upk) == group_size, 5);

let msg1 = b"Hello Aptos!";
let msg1 = b"Hello Supra!";
let sig1 = sign_arbitrary_bytes(&sk, msg1);
assert!(signature_verify_strict(&sig1, &upk, msg1), 6);

Expand All @@ -466,7 +466,7 @@ module aptos_std::multi_ed25519 {
assert!(option::extract(&mut unvalidated_public_key_threshold(&upk)) == 4, 4);
assert!(unvalidated_public_key_num_sub_pks(&upk) == 5, 5);

let msg1 = b"Hello Aptos!";
let msg1 = b"Hello Supra!";
let sig1 = sign_arbitrary_bytes(&sk, msg1);
maul_first_signature(&mut sig1);
assert!(!signature_verify_strict(&sig1, &upk, msg1), 6);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ module aptos_token_objects::collection {
/// Creates a fixed-sized collection, or a collection that supports a fixed amount of tokens.
/// This is useful to create a guaranteed, limited supply on-chain digital asset. For example,
/// a collection 1111 vicious vipers. Note, creating restrictions such as upward limits results
/// in data structures that prevent Aptos from parallelizing mints of this collection type.
/// in data structures that prevent Supra from parallelizing mints of this collection type.
/// Beyond that, it adds supply tracking with events.
public fun create_fixed_collection(
creator: &signer,
Expand Down Expand Up @@ -239,7 +239,7 @@ module aptos_token_objects::collection {
}

/// Creates an untracked collection, or a collection that supports an arbitrary amount of
/// tokens. This is useful for mass airdrops that fully leverage Aptos parallelization.
/// tokens. This is useful for mass airdrops that fully leverage Supra parallelization.
/// TODO: Hide this until we bring back meaningful way to enforce burns
fun create_untracked_collection(
creator: &signer,
Expand Down
6 changes: 3 additions & 3 deletions aptos-move/framework/aptos-token-objects/sources/token.move
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// This defines an object-based Token. The key differentiating features from the Aptos standard
/// This defines an object-based Token. The key differentiating features from the Supra standard
/// token are:
/// * Decoupled token ownership from token data.
/// * Explicit data model for token metadata via adjacent resources
Expand Down Expand Up @@ -56,7 +56,7 @@ module aptos_token_objects::token {
/// Was populated until concurrent_token_v2_enabled feature flag was enabled.
///
/// The name of the token, which should be unique within the collection; the length of name
/// should be smaller than 128, characters, eg: "Aptos Animal #1234"
/// should be smaller than 128, characters, eg: "Supra Animal #1234"
name: String,
// DEPRECATED
/// The Uniform Resource Identifier (uri) pointing to the JSON file stored in off-chain
Expand All @@ -73,7 +73,7 @@ module aptos_token_objects::token {
/// Unique identifier within the collection, optional, 0 means unassigned
index: AggregatorSnapshot<u64>,
/// The name of the token, which should be unique within the collection; the length of name
/// should be smaller than 128, characters, eg: "Aptos Animal #1234"
/// should be smaller than 128, characters, eg: "Supra Animal #1234"
name: DerivedStringSnapshot,
}

Expand Down
8 changes: 4 additions & 4 deletions aptos-move/framework/aptos-token/sources/token.move
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ module aptos_token::token {
struct TokenDataId has copy, drop, store {
/// The address of the creator, eg: 0xcafe
creator: address,
/// The name of collection; this is unique under the same account, eg: "Aptos Animal Collection"
/// The name of collection; this is unique under the same account, eg: "Supra Animal Collection"
collection: String,
/// The name of the token; this is the same as the name field of TokenData
name: String,
Expand All @@ -195,7 +195,7 @@ module aptos_token::token {
uri: String,
/// The denominator and numerator for calculating the royalty fee; it also contains payee account address for depositing the Royalty
royalty: Royalty,
/// The name of the token, which should be unique within the collection; the length of name should be smaller than 128, characters, eg: "Aptos Animal #1234"
/// The name of the token, which should be unique within the collection; the length of name should be smaller than 128, characters, eg: "Supra Animal #1234"
name: String,
/// Describes this Token
description: String,
Expand Down Expand Up @@ -260,7 +260,7 @@ module aptos_token::token {

/// Represent the collection metadata
struct CollectionData has store {
/// A description for the token collection Eg: "Aptos Toad Overload"
/// A description for the token collection Eg: "Supra Toad Overload"
description: String,
/// The collection name, which should be unique among all collections by the creator; the name should also be smaller than 128 characters, eg: "Animal Collection"
name: String,
Expand All @@ -269,7 +269,7 @@ module aptos_token::token {
/// The number of different TokenData entries in this collection
supply: u64,
/// If maximal is a non-zero value, the number of created TokenData entries should be smaller or equal to this maximum
/// If maximal is 0, Aptos doesn't track the supply of this collection, and there is no limit
/// If maximal is 0, Supra doesn't track the supply of this collection, and there is no limit
maximum: u64,
/// control which collectionData field is mutable
mutability_config: CollectionMutabilityConfig,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// Defines feature flags for Aptos. Those are used in Aptos specific implementations of features in
/// the Move stdlib, the Aptos stdlib, and the Aptos framework.
/// Defines feature flags for Supra. Those are used in Supra specific implementations of features in
/// the Move stdlib, the Supra stdlib, and the Supra framework.
///
/// ============================================================================================
/// Feature Flag Definitions
Expand Down
2 changes: 1 addition & 1 deletion aptos-move/framework/supra-framework/doc/block.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ Initialize the commit history resource if it's not in genesis.
## Function `update_epoch_interval_microsecs`

Update the epoch interval.
Can only be called as part of the Supra governance proposal process established by the AptosGovernance module.
Can only be called as part of the Supra governance proposal process established by the SupraGovernance module.


<pre><code><b>public</b> <b>fun</b> <a href="block.md#0x1_block_update_epoch_interval_microsecs">update_epoch_interval_microsecs</a>(supra_framework: &<a href="../../aptos-stdlib/../move-stdlib/doc/signer.md#0x1_signer">signer</a>, new_epoch_interval: u64)
Expand Down
2 changes: 1 addition & 1 deletion aptos-move/framework/supra-framework/doc/coin.md
Original file line number Diff line number Diff line change
Expand Up @@ -4150,7 +4150,7 @@ Can only be updated by <code>@supra_framework</code>.



<pre><code><b>include</b> <a href="system_addresses.md#0x1_system_addresses_AbortsIfNotAptosFramework">system_addresses::AbortsIfNotAptosFramework</a> { <a href="account.md#0x1_account">account</a>: supra_framework };
<pre><code><b>include</b> <a href="system_addresses.md#0x1_system_addresses_AbortsIfNotSupraFramework">system_addresses::AbortsIfNotSupraFramework</a> { <a href="account.md#0x1_account">account</a>: supra_framework };
<b>include</b> <a href="aggregator_factory.md#0x1_aggregator_factory_CreateAggregatorInternalAbortsIf">aggregator_factory::CreateAggregatorInternalAbortsIf</a>;
</code></pre>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ Only used in reconfigurations to apply the pending <code><a href="consensus_conf

<tr>
<td>2</td>
<td>Only aptos framework account is allowed to update the consensus configuration.</td>
<td>Only supra framework account is allowed to update the consensus configuration.</td>
<td>Medium</td>
<td>The consensus_config::set function ensures that the signer is supra_framework.</td>
<td>Formally verified via <a href="#high-level-req-2">set</a>.</td>
Expand Down
Loading