Swan Chain
  • BULDERS
    • Getting Started
    • DApp Developer
      • Deploying Your First Smart Contract with Remix
      • Interacting with Smart Contract on Swan Chain Using Go
    • App Developer
      • Building Docker Images and Deployment file with LDL
        • Lagrange Definition Language(LDL)
      • Deploying with Swan SDK
      • Store and Retrieve a File with Swan Storage
        • 1. Set up the python-MCS-SDK
        • 2.Create and Manage Buckets
        • 3.Upload Files and Folders
        • 4.Retrieve and Download Files
        • 5.Delete Files and Buckets
    • Node Operator
      • Swan Node Snapshots
    • Market Provider
      • Storage Market
      • AI/ML Orchestrator
        • Decentralized AI Marketplace
        • Connect to Orchestrator
      • Web3 ZK Computing Market
        • ZK Auction Engine
        • Sequencer
        • Contribute zk-UBI-task
          • How to Contribute
        • Example
      • Customized Market Provider
    • Computing Provider
      • Fog Computing Provider(FCP)
        • FCP Setup
        • Migrating FCP to Swan Mainnet
        • FCP Funding Operations Guide
        • FCP FAQ
      • Edge Computing Provider (ECP)
        • ECP Setup
        • ECP Funding Operations Guide
        • ECP FAQ
      • FAQ
    • Storage Provider
      • Storage Auction System
    • Developer Tools
      • Swan SDK
        • Python Swan SDK
          • Special Case: Create ssh login instance
          • SWAN Orchestrator SDK - Function and Parameter Reference
        • Go Swan SDK
          • A Sample Tutorial
      • Swan Console
        • Getting Started
        • Blockchain GPU Task Example
        • Custom Blockchain GPU Task Pools
      • Lagrange
      • Swan IPFS Storage
      • Nebula Block Cloud
      • Ecosystem Projects
    • Mission 3.0
      • Get Started
        • For Users
        • For Space Holders
  • NETWORK REFERENCE
    • Network Info
      • Set Up Your Wallet
      • Bridge Token
    • Contract Addresses
    • Fees
  • Core Concepts
    • Introduction to Swan Chain
    • Consensus Layer
    • Peer-to-peer (P2P) Network
    • Payment Channels
    • Service Discovery
    • Market Provider
      • Storage Market
      • AI Computing Marketplace
        • Orchestrator
        • Auction Engine
        • Bidding Task State Machine
      • ZK Proof Marketplace
        • ZK Task
        • ZK Pool
    • Storage Layer
    • Computing Layer
      • Computing Provider Protocol
      • Computing Provider Account
      • Layer3 Computing Protocol
      • Reputation System
      • Dynamic Pricing
    • CDN Layer
    • Tokenomics
      • UBI Allocation Curve
      • Computing Provider Income
      • Computing Provider Collateral
        • Collateral Requirement and Computing Unit
        • DePIN Oracle
      • Governance
        • Treasure DAO
    • Glossary
  • Swan Chain Campaign
    • Swan CP UBI
    • Swan Chain Mainnet
      • Network Information
      • Swan Token
      • Swan Chain Mission
        • Social Mission
        • Onchain Mission
        • Mission: Celestial Bloom
      • Swan Provider Campaign
        • Fog Computing Provider (FCP)
        • Edge Computing Provider (ECP)
        • Market Provider (MP)
      • GALXE Campaign
      • Free Tier and Special Credit Programs
    • Atom Accelerator Race
      • Before You Get Started
        • Set Up MetaMask
        • Claim SepoliaETH
        • Claim testSWAN
      • CP Acceleration Program
      • Builder Acceleration Program
      • On-chain Interaction Race
      • Community Engagement Challenge
      • FAQ
    • Swan Saturn Testnet
      • Before You Get Started
        • Set Up MetaMask
        • Claim Faucet Tokens
        • Bridge Tokens
      • Transaction Drive Program
      • Community and Educational Events
      • Partnership and Integration Program
      • KOL Program
      • Computing Provider Program
        • FAQ
      • Developer Grant Program
      • FAQ
    • Swan Jupiter Testnet
      • How to Participate
      • Before You Get Started
      • Network Early Adopter
      • FAQ
  • RESOURCE
    • Links
    • Brand Kit
Powered by GitBook
On this page
  • States
  • Transition Between States
  • Rules
  1. Core Concepts
  2. Market Provider
  3. AI Computing Marketplace

Bidding Task State Machine

PreviousAuction EngineNextZK Proof Marketplace

Last updated 9 months ago

The bidding task state machine is a system designed to manage the bidding process for tasks, taking into account task details such as price and timeout. In this setup, each task allows a maximum of three bidders to compete simultaneously, with each bidder being assigned a job to complete.

Bidders have the ability to set a limit on the number of bids they can process at the same time. This feature prevents them from accepting new bids once they reach their specified limit, enabling bidders to effectively manage their workload and participate in multiple tasks without overextending themselves.

States

The Bidding State Machine has several predefined states:

  1. created: This is the initial state when a task is first created. The task stays in this state until bidding is opened.

  2. accepting_bids: In this state, the task is open for bidders to place their bids. The task remains in this state until bidding is closed, the bid is cancelled, or the bid fails.

  3. bidding_closed: This state indicates that the bidding process for the task has ended. The task transitions to this state from the 'accepting_bids' state. From here, the task can either be marked as 'submitted' or 'failed'.

  4. submitted: This state signifies that the task has been submitted successfully. The task moves to this state from the 'bidding_closed' state. Once a task is in the 'submitted' state, it can then be completed.

  5. completed: This is the final state indicating that the task has been completed successfully. The task transitions to this state from the 'submitted' state.

  6. failed: This state indicates that the task has failed. The task can enter this state from the 'bidding_closed' state. If a task fails, it can be reset to the 'created' state.

  7. cancelled: This state signifies that the bid for the task has been cancelled. The task can enter this state from the 'accepting_bids' state. If a bid is cancelled or fails, the task can be reset to the 'created' state.

The transitions between these states are managed by the state machine, which ensures that the task moves through its lifecycle in a controlled and predictable manner.

  • open_bidding: Transition from Created to Accepting_Bids.

  • close_bidding: Transition from Accepting_Bids to Processing.

  • cancel_bid: Transition from Accepting_Bids to Cancelled.

  • failed_bids: Transition from Accepting_Bids to Cancelled.

  • complete_task: Transition from Submitted to Completed.

  • mark_as_submitted: Transition from Processing to Submitted.

  • mark_as_failed: Transition from Processing to Failed.

  • reset_accepting_bids_to_created: Transition from Accepting_Bids to Created.

  • reset_failed_bids_to_created: Transition from Failed to Created.

The Bidding State Machine has defined transitions between states:

Transition Between States

  1. open_bidding: Transition from 'Created' to 'Accepting_Bids'.

  2. close_bidding: Transition from 'Accepting_Bids' to 'Processing'.

  3. cancel_bid: Transition from 'Accepting_Bids' to 'Cancelled'.

  4. failed_bids: Transition from 'Accepting_Bids' to 'Cancelled'.

  5. complete_task: Transition from 'Submitted' to 'Completed'.

  6. mark_as_submitted: Transition from 'Processing' to 'Submitted'.

  7. mark_as_failed: Transition from 'Processing' to 'Failed'.

  8. reset_accepting_bids_to_created: Transition from 'Accepting_Bids' to 'Created'.

  9. reset_failed_bids_to_created: Transition from 'Failed' to 'Created'.

Rules

The bidding task state machine should include the following rules:

  • A bidder cannot place a bid if they have exceeded their limit on the number of jobs they can process simultaneously.

  • Once a bidder has completed a job, they cannot be assigned any further jobs on the same task.

If the task is cancelled, all bids and jobs associated with the task are cancelled as well