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

mock-consensus: 🪙 auto_app_state assigns delegation tokens #3966

Closed
cratelyn opened this issue Mar 7, 2024 · 0 comments · Fixed by #4001
Closed

mock-consensus: 🪙 auto_app_state assigns delegation tokens #3966

cratelyn opened this issue Mar 7, 2024 · 0 comments · Fixed by #4001
Assignees
Labels
A-mock-consensus Area: Relates to the mock consensus engine
Milestone

Comments

@cratelyn
Copy link
Contributor

cratelyn commented Mar 7, 2024

in #3902, we discussed that auto_app_state should:

  1. Generate a list of penumbra validator definitions corresponding to the consensus keys specified in the builder. There must be at least one.

  2. Inject those validator definitions into the provided AppState

  3. Create allocations of delegation tokens for each validator, controlled by some address. Otherwise the validator won't have any voting power and will be immediately deleted.

we should address point (3), so that the validator is not immediately deleted.

@github-project-automation github-project-automation bot moved this to 🗄️ Backlog in Penumbra Mar 7, 2024
@cratelyn cratelyn added the A-mock-consensus Area: Relates to the mock consensus engine label Mar 7, 2024
@cratelyn cratelyn moved this from 🗄️ Backlog to In progress in Penumbra Mar 7, 2024
@cratelyn cratelyn added this to the Sprint 1 milestone Mar 7, 2024
@cratelyn cratelyn moved this from In progress to 🗄️ Backlog in Penumbra Mar 11, 2024
@cratelyn cratelyn modified the milestones: Sprint 1, Sprint 2 Mar 11, 2024
@cratelyn cratelyn self-assigned this Mar 12, 2024
@cratelyn cratelyn moved this from 🗄️ Backlog to In progress in Penumbra Mar 12, 2024
cratelyn added a commit that referenced this issue Mar 18, 2024
fixes #3966. fixes #3908. fixes _part of_ #3995.

this branch introduces the first steps towards mock consensus (#3588)
testing of the staking component (#3845).

this defines a validator after genesis, and then shows that it does
_not_ enter the consensus set. #3966 is addressed in this branch so that
the existing genesis validator correctly enters the consensus set, and
so that we can successfully progress to the second epoch.

subsequent changes will exercise delegating to this validator in the
`mock_consensus_can_define_and_delegate_to_a_validator`.

#### ✨ changes

* alters `with_penumbra_auto_app_state` so that it adds an allocation of
delegation tokens to the shielded pool component's genesis content.

* extends `generate_penumbra_validator` so that it generates a real
spend key, and returns an `Allocation` for the generated validator.
_(see #3966)_

* adds a new `mock_consensus_can_define_and_delegate_to_a_validator`
test that defines a post-genesis validator. _(see #3908)_

* defines a new `ConsensusIndexRead::get_consensus_set()` method, which
collects all of the identity keys returned by `consensus_set_stream`.

* lowers the events in
`penumbra_mock_consensus::block::Builder::execute()` to trace-level
events.

* `penumbra_mock_consensus::builder::Builder` will now log a warning if
values may be errantly rewritten by the builder methods.

* `TestNode::fast_forward` sets its `i` span field to `1..n`, rather
than `0..n-1`.

---

#### :link: related

* #4009
* #4010
* #4011
* #4017
* #4027
* #4028
* #4029
* #3966
* #3908
* #3588

---------

Co-authored-by: Henry de Valence <[email protected]>
@github-project-automation github-project-automation bot moved this from In progress to Done in Penumbra Mar 18, 2024
@cratelyn cratelyn modified the milestones: Sprint 2, Sprint 3 Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mock-consensus Area: Relates to the mock consensus engine
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant