waves_logo Docs
  • Why Waves
    Why Waves
  • Waves Basics
    Waves Basics
  • Account
    • Creating Account
      Creating Account
    • Address
      Address
    • Account Balance
      Account Balance
    • Account Data Storage
      Account Data Storage
    • Alias
      Alias
    • dApp and Smart Account
      dApp and Smart Account
    Account
  • Token (Asset)
    • Non-Fungible Token
      Non-Fungible Token
    • Smart Asset
      Smart Asset
    • Token ID
      Token ID
    • WAVES
      WAVES
    Token (Asset)
  • Transaction
    • Transaction Fee
      • Sponsored Fee
        Sponsored Fee
      Transaction Fee
    • Signature and Proofs
      Signature and Proofs
    • Transaction Types
      • Burn Transaction
        Burn Transaction
      • Create Alias Transaction
        Create Alias Transaction
      • Data Transaction
        Data Transaction
      • Exchange Transaction
        • Order
          Order
        Exchange Transaction
      • Genesis Transaction
        Genesis Transaction
      • Invoke Script Transaction
        Invoke Script Transaction
      • Issue Transaction
        Issue Transaction
      • Lease Cancel Transaction
        Lease Cancel Transaction
      • Lease Transaction
        Lease Transaction
      • Mass Transfer Transaction
        Mass Transfer Transaction
      • Reissue Transaction
        Reissue Transaction
      • Set Asset Script Transaction
        Set Asset Script Transaction
      • Set Script Transaction
        Set Script Transaction
      • Sponsor Fee Transaction
        Sponsor Fee Transaction
      • Transfer Transaction
        Transfer Transaction
      • Update Asset Info Transaction
        Update Asset Info Transaction
      • Ethereum-like Transaction
        Ethereum-like Transaction
      Transaction Types
    • Transaction Validation
      Transaction Validation
    Transaction
  • Block
    • Transactions Root Hash
      Transactions Root Hash
    • Genesis Block
      Genesis Block
    Block
  • Node
    • Leasing
      Leasing
    • Generator’s Income
      Generator’s Income
    • Monetary Policy
      Monetary Policy
    Node
  • Mainnet, Testnet, Stagenet
    Mainnet, Testnet, Stagenet
  • Unit Zero
    Unit Zero
  • Oracle
    Oracle
  • Protocols & Data formats
    • Cryptographic Practical Details
      Cryptographic Practical Details
    • Leased Proof of Stake
      Leased Proof of Stake
    • Waves-NG Solution
      Waves-NG Solution
    • Waves-NG Protocol
      Waves-NG Protocol
    • Waves 1.5
      Waves 1.5
    • Blockchain Data Types
      Blockchain Data Types
    • Binary Format
      • Address Binary Format
        Address Binary Format
      • Alias Binary Format
        Alias Binary Format
      • Block Binary Format
        Block Binary Format
      • Network Message Binary Format
        • Block Message Binary Format
          Block Message Binary Format
        • Checkpoint Message Binary Format
          Checkpoint Message Binary Format
        • Get Block Message Binary Format
          Get Block Message Binary Format
        • Get Peers Message Binary Format
          Get Peers Message Binary Format
        • Get Signatures Message Binary Format
          Get Signatures Message Binary Format
        • Handshake Message Binary Format
          Handshake Message Binary Format
        • Peers Message Binary Format
          Peers Message Binary Format
        • Score Message Binary Format
          Score Message Binary Format
        • Signatures Message Binary Format
          Signatures Message Binary Format
        • Transaction Message Message Binary Format
          Transaction Message Message Binary Format
        Network Message Binary Format
      • Order Binary Format
        Order Binary Format
      • Transaction Binary Format
        • Burn Transaction Binary Format
          Burn Transaction Binary Format
        • Create Alias Transaction Binary Format
          Create Alias Transaction Binary Format
        • Data Transaction Binary Format
          Data Transaction Binary Format
        • Exchange Transaction Binary Format
          Exchange Transaction Binary Format
        • Genesis Transaction Binary Format
          Genesis Transaction Binary Format
        • Invoke Script Transaction Binary Format
          Invoke Script Transaction Binary Format
        • Issue Transaction Binary Format
          Issue Transaction Binary Format
        • Lease Cancel Transaction Binary Format
          Lease Cancel Transaction Binary Format
        • Lease Transaction Binary Format
          Lease Transaction Binary Format
        • Mass Transfer Transaction Binary Format
          Mass Transfer Transaction Binary Format
        • Reissue Transaction Binary Format
          Reissue Transaction Binary Format
        • Set Asset Script Transaction Binary Format
          Set Asset Script Transaction Binary Format
        • Set Script Transaction Binary Format
          Set Script Transaction Binary Format
        • Sponsor Fee Transaction Binary Format
          Sponsor Fee Transaction Binary Format
        • Transfer Transaction Binary Format
          Transfer Transaction Binary Format
        • Update Asset Info Transaction Binary Format
          Update Asset Info Transaction Binary Format
        • Ethereum-like Transaction Binary Format
          Ethereum-like Transaction Binary Format
        Transaction Binary Format
      • Transaction Proof Binary Format
        Transaction Proof Binary Format
      Binary Format
    • Validation Rules
      Validation Rules
    Protocols & Data formats
  • Glossary
    Glossary
      • English
      • Русский
      On this page
        • Account validation
        • Transactions validation
          • Transfer transaction
          • Issue transaction
          • Reissue transaction
        • Block validations
          • Consensus data validation
          • Transactions data validation
        • Unconfirmed Transactions Pool validation
      waves_logo Docs

          # Validation rules

          # Account validation

          Account is valid then it is a valid Base58 string and the length of corresponding array is 26 bytes. Version of address (1st byte) is equal to 1. The network byte (2nd byte) is equal to network ID. The checksum of address (last 4 bytes) is correct.

          # Transactions validation

          # Transfer transaction

          Transfer transaction is valid then:

          1. Recipient address is valid. If not, InvalidAddress validation result will be returned.
          2. Size of attachment is less than or equals MaxAttachementSize(140 bytes). In other case TooBigArray validation result will be returned.
          3. Transaction's amount is more than 0, otherwise NegativeAmount validation result is returned.
          4. Transaction's fee is positive, otherwise InsufficientFee validation result is returned.
          5. Adding fee to amount does not lead to Long overflow. In case of Long overflow OverflowError validation result will be returned.
          6. Transaction's signature is valid, otherwise InvalidSignature validation result is returned.

          # Issue transaction

          Issue transaction is valid then:

          1. Sender's address is valid. If not, InvalidAddress validation result will be returned.
          2. Quantity of asset is positive, otherwise NegativeAmount validation result is returned.
          3. Transaction's fee is more than or equals MinFee(100000000 wavelets = 1 Wave), in other case InsufficientFee validation result is returned.
          4. Size of description is less than or equals MaxDescriptionLength(1000 bytes), otherwise TooBigArray is returned.
          5. Size of name is more than or equals MinAssetNameLength and less or equals MaxAssetNameLength, in other case InvalidName validation result will be returned.
          6. Decimals is positive and less than or equals MaxDecimals, in other case TooBigArray is returned.
          7. Transaction's signature is valid, otherwise InvalidSignature validation result is returned.

          # Reissue transaction

          Reissue transaction is valid then:

          1. Sender's account is valid. Otherwise InvalidAddress validation result is returned.
          2. Quantity is positive, in other case NegativeAmount validation result will be returned.
          3. Transaction's fee is positive, in other case InsufficienFee result will be returned.
          4. Transaction's signature is valid, otherwise InvalidSignature validation result is returned.

          # Block validations

          Block is valid then:

          1. Block chain contains referenced block.
          2. Block's signature is valid.
          3. Block's consensus data is valid.
          4. Block's transactions are valid.

          # Consensus data validation

          Block's consensus data is valid then:

          1. Block creation time is no more than MaxTimeDrift(15 seconds) in future.
          2. Block's transactions are sorted. This rule works only after 1477958400000 on Testnet and 1479168000000 on Mainnet.
          3. Block chain contains parent block or block chain height is equal 1.
          4. Block's base target is valid.
          5. Block's generator signature is valid.
          6. Generator's balance is more than or equals MinimalEffectiveBalanceForGeneration(1000000000000 wavelets). This rule always works on Testnet and works only after 1479168000000 on Mainnet.
          7. Block's hit is less than calculated block's target.
          8. Voted features are sorted in ascending order and are not repeated.

          # Transactions data validation

          Block's transactions are valid then:

          1. Creation time of every transaction in block is less than block's creation time no more than on MaxTxAndBlockDiff(2 hours).
          2. All transactions are valid against state.

          # Transaction validation against state

          Transactions are valid then:

          1. Transaction is valid by transaction validation rules.
          2. Transaction creation time more than block's creation time no more than on MaxTimeForUnconfirmed(90 minutes). This limitation works always on Testnet and only after 1479168000000 on Mainnet.
          3. Application of transaction to accounts should not lead to temporary negative balance. This rule works after 1479168000000 on Mainnet and after 1477958400000 on Testnet.
          4. Changes made by transaction should be sorted by their amount. This rule works on both Mainnet and Testnet after 1479416400000.
          5. Application of transaction's amount to current balance should not lead to Long overflow.
          6. After application of all block's transactions affected balances should not be negative.

          # Unconfirmed Transactions Pool validation

          Transaction could be inserted in Unconfirmed Transactions Pool then:

          1. Transaction is valid by transaction validation rules.
          2. If transaction's fee is more than or equals minimum fee that was set by the owner of a node.
          3. There is a space for a new transaction if Unconfirmed Transactions Pool. By default the pool is limited by 1000 transactions.
          4. Unconfirmed Transactions Pool does not contain transaction with the same ID.
          5. Transaction created not later than MaxTimeForUncofimed(90 minutes) after the last block was created.
          6. Transaction creation time is no more than MaxTimeDrift(15 seconds) in future.
          7. Transaction is valid against state.
          Transaction Proof Binary Format
          Glossary
          Transaction Proof Binary Format
          Glossary