Skip to content

Commit da5ffb0

Browse files
hsaleemsupraso-schenisaacdoidgemzajac-supradhaval-supraoracles
authored
Feature/dkg integration (#302)
* update validator pub keys to support dkg * adds blockmetadata flag * featureflag for blockmetadataext * add consenses_key support for past version * add clan, family committee structure * update dkg module to handle new dkg * change dkg.move to use DkgNodeConfig * on going changes * moved dkg transaction validation to aptosvm * adds dkg transaction to post bls pk shares * removed author from dkgmeta * supra dkg feature flag * update validator pub keys to support dkg * adds blockmetadata flag * featureflag for blockmetadataext * add consenses_key support for past version * add clan, family committee structure * update dkg module to handle new dkg * change dkg.move to use DkgNodeConfig * on going changes * moved dkg transaction validation to aptosvm * adds dkg transaction to post bls pk shares * removed author from dkgmeta * supra dkg feature flag * rebase with dev * add dkg validator transaction validation * adds family check in dkg transaction validation * minor * adds feature gating for validator transaction execution * update dkg transaction execution validation * temporarily support old consensus key * added identity to dkg node config * added dkg events * add consensus key rust type * add dkg event try from for Contract event * changes to get dkg move state * added DKGResharing struct * emit dkg update events * impl from dkg events to contract event * to_bytes for consensuskey * update crypto version * update crypto * update crypto * update crypto * update crypto * update crypto * validator key change and refactor * Revert "validator key change and refactor" This reverts commit 3d14a98. * updated validator public keys and refactoring * ongoing changes * add gas params for supra_stdlib * fmt * ongoing changes to address comments * ongoing changes * minor fixes * adds new method for ValidatorPublicKeys * new methods for DkgNodeConfig and DkgCommittee * update dkg committee to use validator address as identity * add copyright statements * Update validator_public_keys.move (#305) * Update validator_public_keys.move * Add functions for new CertificateThresholdType constant tags (BCFT and Clan Majority) * addressing comments * rename * fix docs * minor fix * resharing config changed to per receiver committee * add epoch, chain_id in onchainaggcommitments * update validator committee keys after dkg * fix test public key * changes to support arbitrary threshold types * dkg for validity & quorum keys * [aptos-labs#2300] Feature flag. * Sc/task/issue 2242 patch2 (#306) * add supra bcft cert feature flag * update md file * addressing comments * made compatible with the new key format * added a fallback to the old format * parsing ed key by `try_from` instead of bcs * Update dkg.md * fixes * conditional consensus key based on bls flag * update validator_config to use ValidatorPublicKeys * update ValidatorPublicKeys to include bcft keys * update gas ver * add supra_stdlib gas params to_on_chain_gas_schedule * add randomness tag to block_prologue_ext * temporarily mark randomness biasable * add SUPRA_DKG to default features * dkg module fixes * fix dkg transactions error handling in vm * added dkg config * dkg handles all bls key types * remove dkg meta set condition for pk shares * adds dkg threshold type for receiver committees * removed error status DKG_META_NOT_SET * distinguish error code for future/past epochs * fixed leader ban test cases * dkg for bcft and clan majority * update crypto version * adds next_epoch_validator_consensus_infos_for_dkg * feat: changes related to the transaction inclusion proof feature (#341) * feat(types,accumulator): Add features for transactions inclusions and events emissions proofs. - RLP's `Encodable` trait implementation for Contract Events. - `get_proof_by_position` method for Merkle Accumulator. * feat: add `EventV2` api type * chore: cargo feature optimization * refactor(aptos-api-types): transformed `Event` to `EventV1` and applied Full-Clone on `EventV2` * feat: add `hash` in `EventV1` with serialization disabled * docs: fix oai docs for `EventV1` * feat(aptos_api_types): add `try_into_v2_events` to convert `ContractEvent` to `EventV2` * feat: add `SUPRA_TRANSACTIONS_INCLUSION_PROOFS` feature flag * feat: replace rlp encoding with custom encoding to generate event hash * chore: replace `alloy` with `sha3` for `Keccak256` impl * fix: Keccack256 hash implementation using `sha3` --------- Co-authored-by: Nikita Puzankov <n.puzankov@supraoracles.com> Co-authored-by: Simon Chen <s.chen@supraoracles.com> * fix: ensure `hash_bytes` gets updated with finalized hash * Updated crypto ref to revision containing ref to bicycl-rs with fully-qualified SSH submodule refs. * update crypto * Updated minimum GAS_UNIT_PRICE from 100 to 100_000 in accordance with the outcome of https://vote.supra.com/proposal/3. (#344) * test fixes * make order of dkg committee consistent with new epoch committee * Fixed DKG config to account for BCFT flag and added missing threshold. Added comments. Regenerated docs. * Fixed DKG config and removed unnecessary test. * Discovered that DKG config is initialised during genesis before feature flags are set, so updated implementation accordingly and added notes. Also fixed supra_governance::reconfigure. * Formatting. * Started work towards adding leader ban registry config to genesis. (#346) * Started work towards adding leader ban registry config to genesis. * added remaining changes for the leader ban config at genesis * added deserilization step * added deserilization step * added deserilization step * fixed leader ban registry package for ban parameters * decoded correct version of params --------- Co-authored-by: Dhaval Purohit <d.purohit@supraoracles.com> * Formatting. * Added TypeTags for UpdateNetworkAndFullnodeAddressesEvent and RotateConsensusKeyEvent. * Added fixes for leader ban registry view (#350) * added fixes for leader ban registry view * fixed the test according to updated changes * PR comments addressed * addressing comments * reverse pending active order for next_validator_consensus_infos --------- Co-authored-by: simonchen-supra <s.chen@supraoracles.com> Co-authored-by: Isaac Doidge <i.doidge@supraoracles.com> Co-authored-by: Mateusz Zając <m.zajac@supraoracles.com> Co-authored-by: Dhaval Purohit <d.purohit@supraoracles.com> Co-authored-by: Panchal Vedant <v.panchal@supraoracles.com> Co-authored-by: Nikita Puzankov <n.puzankov@supraoracles.com> Co-authored-by: Isaac Doidge <30425649+isaacdoidge@users.noreply.github.com>
1 parent f487d9b commit da5ffb0

308 files changed

Lines changed: 20288 additions & 6703 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cargo/config.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ rustflags = [
3434
"--cfg",
3535
"tokio_unstable",
3636
"-C",
37+
"linker=clang",
38+
"-C",
3739
"link-arg=-fuse-ld=lld",
3840
"-C",
3941
"force-frame-pointers=yes",
@@ -55,3 +57,7 @@ rustflags = [
5557
"-C",
5658
"link-arg=/STACK:8000000", # Set stack to 8 MB
5759
]
60+
61+
[env]
62+
CMAKE_POLICY_VERSION_MINIMUM = "3.5"
63+
CXXFLAGS = "-include cstdint" # Needed for `librocksdb-sys` build

.cursorrules

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Supra Move Development Rules
2+
3+
CRITICAL: This is a Supra Move project, NOT Aptos Move. Never use aptos_framework.
4+
5+
## Framework Rules:
6+
1. ALWAYS use supra_framework:: instead of aptos_framework::
7+
2. Available namespaces: supra_framework::, std::
8+
3. Main modules in supra_framework: config_buffer, create_signer, system_addresses, block, reconfiguration, reconfiguration_with_dkg, genesis, automation_registry, event, randomness, state_storage, transaction_fee, util, fungible_asset, multisig_account, function_info, validator_consensus_info, dispatchable_fungible_asset, aggregator_v2, aggregator_factory, chain_id, chain_status, consensus_config, execution_config, gas_schedule, pbo_delegation_pool, staking_config, staking_contract, storage_gas, supra_config, supra_governance, timestamp, transaction_validation, version, vesting, vesting_without_staking, supra_coin, account, supra_account
9+
4. Standard library modules: vector, table, borrow_mut, error, features, option, signer, string, fixed_point32
10+
11+
## Code Generation Rules:
12+
- Use supra_framework::account for account operations
13+
- Use supra_framework::supra_coin for native token operations
14+
- Use supra_framework::timestamp for time operations
15+
- Use supra_framework::event for event handling
16+
- Use std::vector for vector operations
17+
- Use std::table for table operations
18+
19+
## Example Patterns:
20+
```move
21+
module supra_framework::example {
22+
use supra_framework::account;
23+
use supra_framework::signer;
24+
use std::vector;
25+
26+
public fun init(account: &signer) {
27+
// Supra Move code
28+
}
29+
}
30+
```
31+
32+
When generating Move code, ALWAYS use the Supra Move framework patterns above.

0 commit comments

Comments
 (0)