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

Publish batch events #401

Merged
merged 1 commit into from
Oct 26, 2024
Merged

Publish batch events #401

merged 1 commit into from
Oct 26, 2024

Conversation

Thomasvdam
Copy link
Member

Motivation

Allow showing batches in the explorer.

Explanation of Changes

We'll unpack the validator tree entry on the indexer side. This should make it so we don't have to update the plugin when we add additional signature schemes.

Testing

Run the chain and plugin locally, with an edit in x/tally/keeper/abci.go to publish a fake result every 10th block.

  • batch event
{
	"type": "batch",
	"data": {
		"batch_number": "1",
		"block_height": "1",
		"data_result_root": "9c6b2c1b0d0b25a008e6c882cc7b415f309965c72ad2b944ac0931048ca31cd5",
		"validator_root": "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
		"batch_id": "f58c797327c8db6eb2e616316f33046e4a8f1b17eadc29f461e3002081865f19",
		"proving_medatada": ""
	}
}
  • dr-batch-assignment event
{
  "type": "dr-batch-assignment",
  "data": { "dr_id": "10", "batch_number": "3" }
}
  • batch-validator-entries event
{
  "type": "batch-validator-entries",
  "data": {
    "batch_number": "2",
    "validator_tree_entries": [
      "67cf8fab95fb00f824c58eb31783f41a847821e805f5e100"
    ]
  }
}
  • batch-signatures event
{
  "type": "batch-signatures",
  "data": {
    "batch_number": "8",
    "validator_address": "sedavaloper14n46rclrm86w7ggdwt255a00yaw85gl52mmte6",
    "signatures": "882d87f50547dd460db46e2cb3554e63bfc8b757baf76175dff05befeb7b7e4e0be466f703d763e8f5876d991763a7d508fb84ce5a111c0b3011b9e504df18b8"
  }
}
  • module-params event
{
	"type": "module-params",
	"data": {
		"moduleName": "batching",
		"params": { "validator_set_trim_percent": 95 }
	}
}

Related PRs and Issues

Closes: #372

@Thomasvdam Thomasvdam requested a review from a team October 25, 2024 21:03
@gluax
Copy link
Contributor

gluax commented Oct 25, 2024

FWIW I recently removed the omitempty on the DataResult type, and I wonder if that's worth doing for some of these other types as well. Doesn't feel like some of them should ever be empty.

@Thomasvdam Thomasvdam force-pushed the feat/publish-batch-events branch from 14601ee to ba21c72 Compare October 26, 2024 13:25
@Thomasvdam Thomasvdam merged commit ba21c72 into main Oct 26, 2024
9 of 10 checks passed
@Thomasvdam Thomasvdam deleted the feat/publish-batch-events branch October 26, 2024 13:25
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.

✨ Publish Batch Events
3 participants