Aptos-core strives towards being the safest and most scalable layer one blockchain solution.

Overview
Aptos Banner

Aptos Rust Crate Documentation (main) License CircleCI grcov test history Automated Issues Discord chat

Aptos-core strives towards being the safest and most scalable layer one blockchain solution. Today, this powers the Aptos Devnet, tomorrow Mainnet in order to create universal and fair access to decentralized assets for billions of people.

Getting Started

Contributing

To begin contributing, sign the CLA. You can learn more about contributing to the Aptos project by reading our Contribution Guide and by viewing our Code of Conduct.

Aptos Core is licensed as Apache 2.0.

Comments
  • [forge] Add a test for validation set changes

    [forge] Add a test for validation set changes

    Description

    • Add a test where 1/3 validators leave the validator set and then rejoin. More complex tests can be added in separate PRs.
    • Add a feature to make test framework add_move_file function compilation conditional due to some move dependencies issues when introducing CliTestFramework to forge. https://aptos-org.slack.com/archives/C036SHTFHGR/p1663364319592519

    This change is Reviewable

    CICD:run-e2e-tests 
    opened by zcchahaha 109
  • Increasing haproxy resources

    Increasing haproxy resources

    Description

    Re-Enabling haproxy and adding more CPU+Mem to haproxy nodes.

    Test Plan

    • Join AIT3 with haproxy node
    • run 100 validator forge with haproxy
    • manual testing with /testsuite/ddos/ tools.

    This change is Reviewable

    CICD:run-e2e-tests 
    opened by Markuze 77
  • [quorum store] payload_manager

    [quorum store] payload_manager

    Description

    This is the first PR in the process of landing quorum store. The purpose is to prepare for on-chain enabling. This PR introduces PayloadManager, which is shared among consensus, execution, quorum store, and epoch manager. PayloadManager is created every epoch by EpochManager. Execution uses PayloadManager to read data from quorum store. Consensus uses PayloadManager to pre-fetch the data once a block is added to the tree.


    This change is Reviewable

    CICD:run-e2e-tests 
    opened by sasha8 76
  • [Storage] Fine grained account storage

    [Storage] Fine grained account storage

    Motivation

    This PR implements fine-grained storage for account state - instead of storing an account as a blob under one single key in the storage layer, we break it down into multiple resources, and each resource is stored as a blob with an access path as the key. The obvious advantage of this model is that, when accessing a resource from an account, we don't have access entire account - which can be expensive if the account is large. This will make accessing individual resources under an account cheaper in terms of gas cost. This model also allows Smart contract writes to organize the data to minimize the gas cost - they can choose to group items together under same resource which they expect to be used together - this will minimize the number of IO operations we need to perform during the txn execution.

    Few more TODOs that I plan to address in subsequent PRs (as the scope of this change is already pretty big)

    • [x] Unify functions under AccountState and `AccountStateView and remove duplicates.
    • [x] Get rid of AccountStateBlob and related APIs.

    (Write your motivation for proposed changes here.)

    Have you read the Contributing Guidelines on pull requests?

    (You must have submitted a signed CLA that includes your GitHub handle prior to us accepting and landing your work. Write your answer here.)

    Test Plan

    Existing Unit tests and added new tests.

    Related PRs

    opened by sitalkedia 69
  • [forge] Add state sync catching up stress tests

    [forge] Add state sync catching up stress tests

    Description

    Adds two tests, where we send constant TPS, and have nodes get stale, and see that they catchup.

    (will separately send a PR to add a check that they participate in the consensus)

    • test 1 - cut network on a node for some period of time
    • test 2 - make subset of nodes execute blocks slower (by adding sleep in aptos_vm block metadata processing)

    Test Plan

    run both on forge to confirm they pass


    This change is Reviewable

    CICD:run-e2e-tests 
    opened by igor-aptos 59
  • [forge][try2] Adding latency check for high-gas fee transactions to graceful_overload test

    [forge][try2] Adding latency check for high-gas fee transactions to graceful_overload test

    Simplified #4480 per @sitalkedia's suggestion

    Test Plan:

    Actual graceful_overload test run:

    :white_check_mark: Forge suite land_blocking success on 1edb3b0eb054e1c0c2c5d2c996e8d67ea60bbcea

    two traffics test : 1000 TPS, 126 ms latency, 24100 ms p99 latency,no expired txns
    Test Ok
    

    This change is Reviewable

    CICD:run-e2e-tests 
    opened by igor-aptos 52
  • [mempool] reduce default capacity per user

    [mempool] reduce default capacity per user

    Description

    Reduce the default capacity per user: 100 -> 20. This should make it less likely that some users take over mempool capacity.

    Test Plan

    Ran land_blocking and load_vs_perf_benchmark with good results. Will let CICD run the continuous tests.


    This change is Reviewable

    CICD:run-e2e-tests 
    opened by bchocho 50
  • [Executor] Unify views used for block execution

    [Executor] Unify views used for block execution

    This makes the interface difference between sequential and parallel execution an implementation detail of block executor. It's better to be an implementation detail, for example tomorrow we could delete sequential execution altogether and run parallel with 1 thread (thought experiment, I'm not proposing we do this), and outside world would not need to care.

    Other benefits: (0) Ability to access storage values from block_executor - before this was only possible in the wrapper, that would find data by combining view from the block with data from storage (depending on statekey). Having access to storage values is important e.g. to resolve aggregator deltas more efficiently, and to not expose delta_resolver to the wrapper - but this is coming next as a separate PR (see https://github.com/aptos-labs/aptos-core/commit/b423013ebba88a6362add5aa0a6077fe01edcb41) (1) no more ugly leaky interfaces like execute_mvhashmap_view and execute_btreemap view (2) delete unused StateViewCache only used in tests as a move resolver, instead resolve directly (3) delete VersionedView from the wrapper, instead provide wrapping view implementations at one place inside block_executor (view.rs)

    CICD:run-e2e-tests 
    opened by gelash 49
  • [Storage] Introduce support for namespace in state store

    [Storage] Introduce support for namespace in state store

    Motivation

    First PR for introducing fine-grained state storage support. This diff introduces a concept of namespace in the state store - with only account blob based namespace support to start with. The key to the state store for a namespace object can be namespace_+ rawkey. This way we can support different namespace objects within the same state store with the guarantee that there will not be any key collision. In order to support this, all account related concept has been moved out of the storage layer and instead the storage layer majorly understands the concept of StateStoreKey and StateStoreValue, which are arbitrary byte arrays. Please note that this is a major format change on the storage side and is not backward compatible - we need to wipe out the previous data from dev-net before rolling this out.

    The diff touches many files because of the extensive API change, however, important changes to be reviewed at

    types/src/state_store/state_store_key.rs types/src/state_store/state_store_value.rs storage/storage-interface/src/state_view.rs storage/aptosdb/src/state_store/mod.rs execution/executor/src/components/apply_chunk_output.rs

    Test Plan

    Modified existing UTs for new API interface.

    opened by sitalkedia 47
  • Adding configurabele TCP buffers and minor hafixes

    Adding configurabele TCP buffers and minor hafixes

    • [Network] set socket RX/TX Buffers

    Adding configurable TCP buffers for inbound and outbound TCP connections. This change will improve networking performance, especially for long RTT connections.

    Description

    Test Plan


    This change is Reviewable

    CICD:run-e2e-tests 
    opened by Markuze 45
  • [mempool] bucketed broadcast

    [mempool] bucketed broadcast

    Description

    Instead of a single timeline for broadcast, divide the timeline into buckets of ranking_score (gas) ranges. This allows gas prioritization even when broadcast is saturated.

    Test Plan

    Add unit tests. Confirm high pri transactions run well in "graceful overload" test.


    This change is Reviewable

    CICD:run-e2e-tests 
    opened by bchocho 43
  • [block-executor] Fix missing lifetime

    [block-executor] Fix missing lifetime

    Description

    This fails to build on Windows (but not on Mac) for some reason, unsure why it's skipped elsewhere.

    Test Plan

    cargo build now passes on windows instead of failing

    The error prior to fixing it:

    error[E0106]: missing lifetime specifier
       --> aptos-move\block-executor\src\view.rs:175:20
        |
    172 |         base_view: &'a S,
        |                    -----
    173 |         map: &'a BTreeMap<T::Key, T::Value>,
        |              ------------------------------
    174 |         txn_idx: TxnIndex,
    175 |     ) -> LatestView<T, S> {
        |                    ^ expected named lifetime parameter
        |
        = help: this function's return type contains a borrowed value with an elided lifetime, but the lifetime cannot be derived from the arguments
    help: consider using the `'a` lifetime
        |
    175 |     ) -> LatestView<'a, T, S> {
        |                     +++
    
    
    opened by gregnazario 0
  • [framework] fix breakage in compile-time compatability

    [framework] fix breakage in compile-time compatability

    we have historically not restricted references in entry functions and it can make a lot of sense to actually have public entry which may take a reference from another space within move

    this returns back to the more permissive state

    note: there are examples on mainnet, where this would require the authors to build with an older compiler.

    Description

    Test Plan

    opened by davidiw 3
  • [Aptos Framework][Vesting] Pay out the accumulated rewards relatively to vesting's remaining grant instead of staking contract's principal

    [Aptos Framework][Vesting] Pay out the accumulated rewards relatively to vesting's remaining grant instead of staking contract's principal

    Description

    This is a bug in the outstanding rewards calculation of the vesting contract. Every time staking_contract::request_commission is called, it updates the principal to the total active stake - commission paid out. Since the vesting contract relies on this staking contract's principal to calculate accumulated rewards (to be sent out to shareholders), request_commission, when call before vesting::unlock_rewards, effectively locks up this accumulated rewards for the vesting contract's entire vesting schedule.

    The correct accumulated rewards calculation for vesting::unlock_rewards should use the vesting contract's remaining grant as the base to get the actual amount of accumulated rewards so far.

    Test Plan

    A newly added unit test that succeeds with the fix but fails otherwise.

    opened by movekevin 2
  • [rosetta] Allow commission percentage to be adjustable

    [rosetta] Allow commission percentage to be adjustable

    Description

    Commission percentage was hardcoded to 0, this lets it be variable.

    Test Plan

    E2E test covers this, it's optional, so it won't do anything if not provided.

    opened by gregnazario 0
Releases(aptos-cli-v1.0.3)
Allows deploying modules to Aptos under resource accounts.

Aptos Deployer Module containing helpers for deploying resource accounts. Resource accounts allow the module to sign as itself on-chain, which is usef

Deploy DAO 6 Oct 31, 2022
Scalable layer-2 registry and prover for subspaces

Subspacer Note: this does not fully implement the functionality described in the Spaces protocol yet and should be considered a proof of concept. Scal

Spaces Protocol 5 Feb 22, 2024
Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer of security for your most sensitive files.

Koofr Vault https://vault.koofr.net Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer o

Koofr 12 Dec 30, 2022
Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.

Building 1. Install rustc, cargo and rustfmt. $ curl https://sh.rustup.rs -sSf | sh $ source $HOME/.cargo/env $ rustup component add rustfmt When buil

Solana Foundation 9.8k Jan 3, 2023
The Nervos CKB is a public permissionless blockchain, and the layer 1 of Nervos network.

Nervos CKB - The Common Knowledge Base master develop About CKB CKB is the layer 1 of Nervos Network, a public/permissionless blockchain. CKB uses Pro

Nervos Network 1k Dec 30, 2022
As part of the IOP Stack™ Morpheus is a toolset to have gatekeeper-free identity management and verifiable claims as a 2nd layer on top of a blockchain

Internet of People Internet of People (IoP) is a software project creating a decentralized software stack that provides the building blocks and tools

We are building a complete decentralized ecosystem with the IOP Stack™ 9 Nov 4, 2022
A general solution for commonly used crypt in rust, collection of cryptography-related traits and algorithms.

Crypto-rs A general solution for commonly used crypt in rust, collection of cryptography-related traits and algorithms. This is a Rust implementation

houseme 4 Nov 28, 2022
🍹Branch and bound solution using Rust to calculate an optimal cocktail ingredient list of arbitrary length 🍸

Calculating an Optimal Cocktail Ingredient List Tom Explains the Problem You have 100 different ingredients You have 20 cocktails, each of which use 2

Stephan Hügel 7 Jan 9, 2023
The Fastest and most Advanced Ethereum Client

The Fastest and most Advanced Ethereum Client. » Download the latest release « Table of Contents Description Technical Overview Building 3.1 Building

Jay Lee 6 Feb 17, 2022
A vertically scalable stream processing framework focusing on low latency, helping you scale and consume financial data feeds.

DragonflyBot A vertically scalable stream processing framework focusing on low latency, helping you scale and consume financial data feeds. Design The

null 17 Jul 12, 2023
The most advanced Merkle tree library for Rust

rs-merkle rs-merkle is the most advanced Merkle tree library for Rust. Basic features include building a Merkle tree, creation, and verification of Me

Anton Suprunchuk 85 Dec 31, 2022
Benchmarks of most widely used web frameworks built in rust.

Rust framework benchmarks Benchmarking utility to test the performance of all the rust web frameworks. Built with rust ?? . Demo (Last updated: Thu Ju

Ishtmeet Singh 4 Oct 21, 2022
Most useful information about your system in a single command.

mymy Access the most common information about your system using a single command. Mymy is a command line tool that provides the most helpful informati

Théo Crevon 5 Apr 4, 2023
Daemon and tools to control your ASUS ROG laptop. Supersedes rog-core.

asusctl for ASUS ROG - Asus Linux Website asusd is a utility for Linux to control many aspects of various ASUS laptops but can also be used with non-a

Luke Jones 46 Jan 8, 2023
EXPERIMENTAL: Bitcoin Core Prometheus exporter based on User-Space, Statically Defined Tracing and eBPF.

bitcoind-observer An experimental Prometheus metric exporter for Bitcoin Core based on Userspace, Statically Defined Tracing and eBPF. This demo is ba

0xB10C 24 Nov 8, 2022
Enigma Core library. The domain: Trusted and Untrusted App in Rust.

Enigma Core library Service Master Develop CI Badge Pure Rust Enclave && Untrusted in Rust. Core is part of the Enigma node software stack. The Core c

SCRT Labs 89 Sep 14, 2022
Dexios-Core is a library used for managing cryptographic functions and headers that adhere to the Dexios format.

What is it? Dexios-Core is a library used for managing cryptographic functions and headers that adhere to the Dexios format. Security Dexios-Core uses

brxken 3 Jul 4, 2022
Dione is an anonymize and encrypted messaging system build on top on a peer to peer layer.

Secure and Anonymous Messaging WARNING: Currently Dione is not ready to be used nor does it fulfill its goal of being an anonymous messenger. In order

Dione 41 Jan 5, 2023