Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch extrinsic calls if possible #597

Open
jmg-duarte opened this issue Nov 21, 2024 · 2 comments
Open

Batch extrinsic calls if possible #597

jmg-duarte opened this issue Nov 21, 2024 · 2 comments
Assignees

Comments

@jmg-duarte
Copy link
Collaborator

Market

Storage Provider

  • check_deadlines — may emit multiple PartititionFaulty, however, since partitions contain sectors this may be acceptable, furthermore, it's used by the on_finalize hook which does not consume "gas" so batching this may not be worth the effort
  • check_precommited_sectors — may emit multiple SectorSlashed, while it is also called from the on_finalize hook, here the sector is a single unit, so if multiple sectors for a single owner are slashed the same amount of events will be emitted. I think that batching here will help downstream users when consuming events and reduce "spamming" the network, plus the change should be simple enough
@jmg-duarte jmg-duarte self-assigned this Nov 21, 2024
@aidan46
Copy link
Contributor

aidan46 commented Nov 22, 2024

check_deadlines - We should align the events with how a storage provider can recover faulty partitions. In other words, if the storage provider sees an event emitted that relates to them, it should be able to recover with a single extrinsic. The check_deadlines hook does not consume any gas but the extrinsic used for recovery does, if the SP can cover in 1 extrinsic it saves them gas. These events should be batched since recovery can be made in a single extrinsic (excluding proofs) over multiple partitions and sectors.

check_precommited_sectors - I agree with your statement that we should reduce spamming the network with events, making it simpler for users to consume the events.

@th7nder
Copy link
Contributor

th7nder commented Nov 22, 2024

check_precommited_sectors, sure.
check_deadlines - I don't understand the point. Why does partition containining multiple sectors makes it acceptable and not worth the effort?

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

No branches or pull requests

3 participants