-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Milestone
Description
as explained on option 3. of #299 (comment)
on #314 we introduced a FIFO queue of tokens into JDC
however, this leaves room for edge cases where empty mempool ends up in tokens being consumed in long intervals (where they might have already expired on JDS side)
so JDC should:
- have a constant for
TOKEN_TIMEOUT_SECS - keep track of each token allocation
Instant - have some monitor task that iterates over all tokens and calls
allocate_tokenswhen tokens have expired
note: #299 introduced this temporary workaround to JDS:
// see https://github.com/stratum-mining/sv2-apps/issues/335
const TEMPORARY_TIMEOUT_MULTIPLIER: u64 = 144;
/// Timeout for allocated tokens that haven't yet been activated.
/// Ideally 10 minutes, temporarily 24h. see https://github.com/stratum-mining/sv2-apps/issues/335
const ALLOCATED_TOKEN_TIMEOUT_SECS: u64 = TEMPORARY_TIMEOUT_MULTIPLIER * 60 * 10;TEMPORARY_TIMEOUT_MULTIPLIER should be removed when this issue is closed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Todo 📝
Status
Todo 📝