Skip to content

Conversation

@mintybasil
Copy link

Seemingly the docs are incorrect for the options available for the broker configs order_pricing_priority and order_commitment_priority.

pub enum OrderPricingPriority {
/// Process orders in random order to distribute competition among provers
Random,
/// Process orders in the order they were observed (FIFO)
ObservationTime,
/// Process orders by shortest expiry first (earliest deadline)
ShortestExpiry,
}

pub enum OrderCommitmentPriority {
/// Process orders in random order to distribute competition among provers
Random,
/// Process orders by shortest expiry first (lock expiry for lock-and-fulfill orders, request expiry for others)
ShortestExpiry,
/// Process lock-and-fulfill orders by highest ETH payment, then fulfill-after-lock-expire random weighted by collateral reward
Price,
/// Process lock-and-fulfill orders by highest ETH price per cycle, then fulfill-after-lock-expire random weighted by collateral reward
CyclePrice,
}

@mintybasil
Copy link
Author

Could just be me, but I was unable to build the docs locally based on the docs README:

❯ bun run dev                                                            1m 8s 11:39:37
$ vocs dev
node:internal/validators:162
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
          ^

TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. Received undefined
    at validateString (node:internal/validators:162:11)
    at resolve (node:path:1101:7)
    at file:///Users/d/dev/mintybasil/boundless-mintybasil-upstream/documentation/node_modules/vocs/_lib/vite/plugins/remark/links.js:9:23
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async loadESM (node:internal/process/esm_loader:34:7)
    at async handleMainPromise (node:internal/modules/run_main:113:12) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v20.10.0
error: script "dev" exited with code 1

| order\_pricing\_priority | Determines how orders are prioritized for pricing. Options: "random" (process orders in random order), "observation_time" (FIFO), "shortest_expiry" (earliest deadline), "price" (highest ETH payment), "cycle_price" (highest ETH price per cycle, default). |
| order\_commitment\_priority | Determines how orders are prioritized when committing to prove them. Options: "random" (process orders in random order, default), "shortest_expiry" (process orders by shortest expiry first). |
| order\_pricing\_priority | Determines how orders are prioritized for pricing. Options: "random" (process orders in random order, default), "observation_time" (Process orders in the order they were observed (FIFO)), "shortest_expiry" (process orders by shortest expiry first). |
| order\_commitment\_priority | Determines how orders are prioritized when committing to prove them. Options: "random" (process orders in random order), "shortest_expiry" (earliest deadline), "price" (highest ETH payment), "cycle_price" (highest ETH price per cycle, default). |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| order\_commitment\_priority | Determines how orders are prioritized when committing to prove them. Options: "random" (process orders in random order), "shortest_expiry" (earliest deadline), "price" (highest ETH payment), "cycle_price" (highest ETH price per cycle, default). |
| order\_commitment\_priority | Determines how orders are prioritized when committing to prove them. Options: "random" (process orders in random order), "shortest_expiry" (earliest deadline), "price" (highest payment), "cycle_price" (highest price per cycle, default). |

The rust comment you are referencing is also out of date, as it was from before slashed orders were switched to be biased based on the collateral (randomly weighted by the collateral/cycle value). I'll leave up to @neutronmoderator to decide how we want to document, if keeping the description here simple or sharing details about how slashed orders are lightly shuffled also.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me take a proper look later this week and get back to you both @mintybasil @austinabell, thanks

@neutronmoderator
Copy link
Contributor

neutronmoderator commented Nov 11, 2025

Could just be me, but I was unable to build the docs locally based on the docs README:

❯ bun run dev                                                            1m 8s 11:39:37
$ vocs dev
node:internal/validators:162
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
          ^

TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. Received undefined
    at validateString (node:internal/validators:162:11)
    at resolve (node:path:1101:7)
    at file:///Users/d/dev/mintybasil/boundless-mintybasil-upstream/documentation/node_modules/vocs/_lib/vite/plugins/remark/links.js:9:23
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async loadESM (node:internal/process/esm_loader:34:7)
    at async handleMainPromise (node:internal/modules/run_main:113:12) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v20.10.0
error: script "dev" exited with code 1

Yeah vocs is a bit of a pain, you need lts node so thats 24.11.0, and to do a full bun install before hand. We are in the process of migrating the docs to a new platform, and this will be much easier for contributors going forward.

@mintybasil
Copy link
Author

Yeah vocs is a bit of a pain, you need lts node so thats 24.11.0, and to do a full bun install before hand. We are in the process of migrating the docs to a new platform, and this will be much easier for contributors going forward.

Ahh, yeah upgrading to node 24.11 fixed it.

Went ahead and updated the README's accordingly, there was also a conflicting instruction in the main README. Hope that isn't bloating this PR.

Will keep keep an eye out for your response on the comment above 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants