Record each order's node in the local store and report it in order mine
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with the local order store and the code behind order mine, order new, order take-sell/order take-buy and order sync, then the store's migration path. Decide the open question first: whether rows with an unknown node are listed without a filter. Done means the node's public key is stored on each of those paths, order mine reports node_pubkey (null for old rows), --node accepts hex or npub, old stores open after migration, and docs/commands.md is updated.
由索引模型根据 Issue 内容生成。
描述
Problem
The local order store does not record which Mostro node an order belongs to. At 0.17.1, an order mine row carries id, side, status, trade_index and trade_pubkey, and nothing about the node the order was made, taken or adopted on.
An identity can trade on several nodes, since MOSTRO_PUBKEY is just configuration. A client therefore cannot tell which orders a node change would strand. MostroP2P/mcp#11 lets an agent switch between the trusted nodes, and has to refuse the switch while any order in the store is not finished, on any node. The consequences:
- An open order on node A blocks a switch from node B to C, even though it has nothing to do with B.
- An order the node already closed, whose local status is stale, blocks every switch.
- Order-scoped commands (
order info,order watch,order chat, the trade steps) always use the configured node. A client cannot follow a trade on node A while configured for node B.
Proposal
- Record the node. Store the node's public key (lowercase hex) with each order when it is created (
order new), taken (order take-sell/order take-buy) or adopted (order sync). - Report it. Add
node_pubkeyto eachorder minerow in the JSON output (and to the human table). Rows written before this change have no node: reportnull, never a guess. - Filter by it. Add
order mine --node=<hex|npub>to list only one node's orders (rows with an unknown node are listed under no filter only, or with an explicit option; the spec should decide).
A follow-up, not in this issue: order-scoped commands could use the order's recorded node when it differs from the configured one, so a trade can be followed after a node change.
Acceptance criteria
- New orders from
order new, both take commands andorder syncstore the node's public key; a test covers each path. -
order mineJSON rows includenode_pubkey(nullfor older rows), and the output schema inmostro-cli --output json schemasays so. -
order mine --node=…returns only that node's orders and accepts hex or npub. - Existing stores open without error, through a migration that adds the column with no value for old rows.
-
docs/commands.mdand the mostro-cli book document the field and the filter.
- 主要语言
- Rust
- 星标
- 39
- 派生
- 16
- 平均合并
- 6 小时
- 30 天内合并 PR
- 50
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
MostroP2P/mostro-cli 的其他 Issue
-
Add a JSON node status command that reads a node's health event可能重新可做 @victrvondoom 于 14 天前认领,目前没有进行中的 PR。 未关闭enhancement status: accepted
难度 4/5 3-5 天 新手友好度 35/100
MostroP2P/mostro-cli#271 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
MostroP2P/mostro-cli#242 ·
维护者通常 1 天内回复
-
Stablecoins as order currencies: check market price against the node's rates, not Yadio可能已有人在做 @grunch 于 41 天前认领。 未关闭enhancement
难度 4/5 3-5 天 新手友好度 56/100
MostroP2P/mostro-cli#213 ·
维护者通常 1 天内回复
-
难度 3/5 半天 新手友好度 74/100
MostroP2P/mostro-cli#200 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
MostroP2P/mostro-cli#188 ·
维护者通常 1 天内回复
查看 MostroP2P/mostro-cli 的全部 Issue
相似的 Issue
-
bug llm translation
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
build comp-keeper
难度 2/5 1-3 小时 新手友好度 76/100
ClickHouse/ClickHouse#137202 ·
维护者通常 1 天内回复
-
area:ops chore priority:low
难度 2/5 1-3 小时 新手友好度 78/100
jdrouet/tinyobserve#267 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
storytold/photocraft#20056 ·
维护者通常 1 天内回复