Sei中文文档(Sei Docs CHN)-by Chainguys
  • 导览(INTRODUCTION)
    • 版权声明(Copyright Notice)
    • 概览 (Overview)
    • Sei 设计空间 (Sei Design Space)
    • DEX 优化 (DEX Optimizations)
    • Sei 生态系统 (Sei Ecosystem)
  • 智能合约和本地开发 (Smart contracts & local development)
    • Sei工具指南 (Sei Tool Guide)
    • 设置一个本地节点 (Set up a local network)
    • 本地 Sei 脚本部署 (Local Sei script deployment)
    • Sei.go
    • CosmWasm合约测试 (CosmWasm Contract Testing)
    • 部署通用合约 (Deploy a generic contract)
    • 部署交易合约 (Deploy an exchange contract)
    • 非完整节点下部署和开发 (Deploy & develop without Full Node)
    • Dex 模块教程 (Dex Module Tutorial)
    • 代币工厂模块教程 (Tokenfactory Module Tutorial)
    • IBC转账 (IBC Transfers)
  • 订单匹配(order match)
    • 并行性 (Parallelism)
    • 资格 (Eligibility)
    • DEX 合约间依赖 (DEX Inter—Contract Dependencies)
    • 白名单商店 (Whitelisted Store)
  • 节点&验证者 (NODES&VALIDATORS)
    • 加入测试网 (Joining Testnets)
    • 更新 (Upgrades)
    • Seinami激励测试网 (Seinami Incentivized Testnet)
      • 加入激励测试网 (Joining Incentivized Testnet)
      • 所有测试任务 (All Testnet Missions)
      • 行为准则 (Code of Conduct)
      • 奖励发放详情 (Rewards Distribution Details)
  • 基础API端点 (Basic API Endpoints)
  • 模块化端点 (Module Endpoints)
  • 状态同步 (Statesync)
  • 恢复操作(Recovery Operations)
  • 治理(GOVERNANCE)
    • 创建提案 (Creating Proposals)
    • 管理质押 (Managing Staking)
    • 对提案投票表决 (Voting on Proposals)
  • 预言机(ORACLE)
    • 预言机参与 (Oracle Participation)
  • 钱包(WALLETS)
    • 钱包集成(Wallet Integration)
    • 转账 (Transfers)
  • 更多(More)
    • 推特(Twitter)
由 GitBook 提供支持
在本页
  1. 订单匹配(order match)

白名单商店 (Whitelisted Store)

To ensure that there is no race condition in writing to stores, each order matching goroutine will operate on a whitelisted store where it can only write to whitelisted prefixes. Right now the whitelist only contains the wasm store of the contract itself, as well as DEX module's internal states specific to that contract. In other words, if a contract sends out state-mutating messages to other modules (e.g. bank) or other contracts' execute endpoint during order matching (i.e. in the response of one of its sudo endpoints), its order matching process will fail.

为了确保写入存储没有竞争条件,每个订单匹配Go协程(goroutine)将在白名单存储上运行,它只能写入白名单前缀。目前,白名单仅包含合约本身的wasm存储,以及特定于该合约的 DEX 模块的内部状态。换句话说,如果合约在订单匹配期间(即在其sudo端点之一的响应中)向其他模块(例如银行)或其他合约的execute端点发送状态变化消息,则其订单匹配过程将失败。

Note that it's okay for a contract to send out order placement/cancellation messages to other contracts during order matching, since those messages are handled by the DEX module.

请注意,在订单匹配期间,合约可以向其他合约发送下单/取消信息,因为这些消息由 DEX 模块处理。

上一页DEX 合约间依赖 (DEX Inter—Contract Dependencies)下一页加入测试网 (Joining Testnets)

最后更新于2年前