sei-chain
sei-chain copied to clipboard
feat: staking precompile delegation and stakingpool queries
Describe your changes and provide context
Testing performed to validate your change
@kyriediculous this looks great, do you mind merging?
@philipsu522 I'm actually working on implementing a more final specification.
See this hackMD doc https://hackmd.io/EcPRzGcPR8OuAxr-48wkRA
My only hurdle at the moment is that the current cosmos-sdk version used by Sei doesn't have the latest protocol buffer messages for staking. So I'll have to use a later version, but this shouldn't be a breaking change.
E.g. the version used in Sei doesn't have all these fields yet in the protobufs: https://github.com/cosmos/cosmos-sdk/blob/a79f932ecf8ef562928fa72989e53ae22e251d7f/proto/cosmos/staking/v1beta1/staking.proto#L239
Hoping to maybe do it this weekend finally ! I didn't have much time last weekend.
@philipsu522
I added some more undelegation precompiles and the PR is now feature ready for us at Tenderize.
Happy to add a few more generic functions too (e.g. to fetch Validator).
One caveat is that we did have to upgrade sei-cosmos
protobuf messages : https://github.com/sei-protocol/sei-cosmos/compare/evm...kyriediculous:sei-cosmos:evm
@philipsu522
I added some more undelegation precompiles and the PR is now feature ready for us at Tenderize.
Happy to add a few more generic functions too (e.g. to fetch Validator).
One caveat is that we did have to upgrade
sei-cosmos
protobuf messages : sei-protocol/[email protected]:sei-cosmos:evm
hey @kyriediculous awesome, looks good. One nit thing, for https://github.com/sei-protocol/sei-cosmos/compare/evm...kyriediculous:sei-cosmos:evm our base branch is actually seiv2 - do you think you can rebase your changes (or cherry-pick) on that? we can then get it in. I've also asked for a 2nd pair of eyes on the labs side
@philipsu522 I added some more undelegation precompiles and the PR is now feature ready for us at Tenderize. Happy to add a few more generic functions too (e.g. to fetch Validator). One caveat is that we did have to upgrade
sei-cosmos
protobuf messages : sei-protocol/[email protected]:sei-cosmos:evmhey @kyriediculous awesome, looks good. One nit thing, for sei-protocol/[email protected]:sei-cosmos:evm our base branch is actually seiv2 - do you think you can rebase your changes (or cherry-pick) on that? we can then get it in. I've also asked for a 2nd pair of eyes on the labs side
Thanks ! will do.
One change we made is change the return types from Messages from boolean
to useful data.
Do these functions properly throw a REVERT
op code on the EVM side when the messages return an error ?
Or is this why there was a boolean
parameter in the first place, because an error in the message execution doesnt actually lead to a REVERT
opcode and the expectation is for callers to handle the boolean and revert if it returns false
?
Hi @codchen @philipsu522 @Kbhat1 @kyriediculous , I want to know if there is plan to integrate this? As I am working on liquid staking on Sei EVM this would be a lot of help.
If this is integrated into next releases that would be helpful too.