Skip to content

Ensure seq_join is called with an appropriate value for active_work #1499

@andyleiserson

Description

@andyleiserson

Historically, active_work was configured globally and had the same value everywhere.

Now, active_work is adjusted when creating a DZKP validator, to have an appropriate value relative to the batch size.

Unfortunately, seq_join is often invoked as a free function, like this: seq_join(ctx.active_work(), ...). If there are multiple contexts in scope (e.g. a non-upgraded ctx and a DZKP-upgraded m_ctx), the active work used for seq_join may not match the validator-adjusted value.

Assuming we can avoid the dreaded 100013-related errors, it might be better to invoke seq_join as a helper on the context, so that the appropriate active work can be used automatically. Although, that may not improve things that much, since one could still do ctx.seq_join(/* futures referencing m_ctx */).

In any case, filing this as a reminder to revisit this, possibly doing some refactoring, or maybe just auditing seq_join calls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions