Skip to content

add staking dep gen mappings#328

Closed
eric-zhu-uw wants to merge 16 commits into2.0.0betafrom
ezhu/staking_dep_gen_mappings
Closed

add staking dep gen mappings#328
eric-zhu-uw wants to merge 16 commits into2.0.0betafrom
ezhu/staking_dep_gen_mappings

Conversation

@eric-zhu-uw
Copy link
Contributor

@eric-zhu-uw eric-zhu-uw commented Oct 20, 2022

Describe your changes and provide context

Added staking dep gen mappings.

Testing performed to validate your change

Ran loadtesting on a distribution of Delegate, Undelegate, BeginRedelegate messages
image

Verified the following details:

  1. Checked that the height continues to grow seid q block | jq ".block.last_commit.height" which implies a consensus is reached and the validators agree on an apphash
  2. Verified that the Delegation message correctly submits the delegations for validator, account pairing seid query staking delegations-to <validator_addr>
  3. Verified that Undelegate and BeginRedelegate messages are correctly submitted. This is a little more tricky to test since the delegation will only stay in the Unbonding,Redelegate state for a short period of time. However, you can verify this immediately after you run the loadtest script with seid query staking redelegations-from <validator_addr> and seid query staking unbonding-delegations-from <validator_addr>.

If you want to try and test the changes locally, utilize my sei-infra branch.

To Do

  • rebase off 2.0.0beta
  • Evaluate the performance impact of the parallelization's - will need to sync with @BrandonWeng on how to do this.
  • Move the resource mappings to a more granularized/standardized configurations once @udpatil pushes his change since my sei-cosmos branch needs to merge into his branch.

@eric-zhu-uw eric-zhu-uw requested review from BrandonWeng and udpatil and removed request for BrandonWeng October 20, 2022 20:28
@BrandonWeng
Copy link
Contributor

  • Does delegation have any interactions with module accounts? We need to be careful with module accounts
  • The hooks should be fine if we're not using any right now

@eric-zhu-uw
Copy link
Contributor Author

  • Does delegation have any interactions with module accounts? We need to be careful with module accounts

Yes, there is some interaction with the module account, For example, for MsgDelegate, it will call DelegateCoinsFromAccountToModule. However, all module accounts accessed are owned by the validator which should be covered by the this ACL Operation. I treat staking/validator_addr to represent validators and their corresponding module accounts.

Not certain if this is the best way, might be better to be more granular if there is ever a time where we might access the validator and not their corresponding module accounts or vice versa.

// Checks if there is a delegation object that already exists for (delegatorAddr, validatorAddr)
{
AccessType: sdkacltypes.AccessType_READ,
ResourceType: sdkacltypes.ResourceType_KV,
Copy link
Contributor Author

@eric-zhu-uw eric-zhu-uw Oct 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and subsequent mappings will need to be updated to sdkacltypes.ResourceType_KV_STAKING_* once uday's PR gets merged.

Copy link
Contributor

@BrandonWeng BrandonWeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

masih pushed a commit that referenced this pull request Sep 29, 2025
## Describe your changes and provide context
- Adds a basic scheduler shell (see TODOs)
- Adds a basic task definition with request/response/index
- Listens to abort channel after an execution to determine conflict

## Testing performed to validate your change
- Compiles (holding off until shape is validated)
- Basic Unit Test for ProcessAll
masih pushed a commit that referenced this pull request Sep 30, 2025
## Describe your changes and provide context
- Adds a basic scheduler shell (see TODOs)
- Adds a basic task definition with request/response/index
- Listens to abort channel after an execution to determine conflict

## Testing performed to validate your change
- Compiles (holding off until shape is validated)
- Basic Unit Test for ProcessAll
@masih masih deleted the ezhu/staking_dep_gen_mappings branch October 31, 2025 15:48
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.

2 participants