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

draft: Validator eth secp keys #371

Closed
wants to merge 57 commits into from
Closed

Conversation

tzemanovic
Copy link
Member

@tzemanovic tzemanovic commented Aug 21, 2022

depends on #254 and #318

This PR adds 2 required validator eth bridge secp256k1 keys - hot and cold. Hot key will be used for signing validator set updates and cross-chain transactions (done by the ledger) and cold key for bridge governance (done on-demand by validators).

to-do:

  • add fn to derive Eth address from secp256k1 address (or use some crate)
  • Add a PoS storage map from eth address to namada address and set the associations when we write eth cold and hot keys
  • update PoS VP to check eth keys
  • update Pos VP test

tzemanovic and others added 30 commits August 17, 2022 18:37
* junkicide+tomas/pos-tx-tests:
  test: add seed for failed PoS VP test
  [ci skip] wasm checksums update
  pos/vp: remove redundant validity predicate storage key check
  doc fixed in proof_of_stake/
  Update comments
  quick doc fix
  removed a deprecated function, spelling fixes
  clean up documentation
  tests/pos: add proptest-regressions file
  Changelog: add #462
  wasm: test tx_withdraw
  wasm: tx_unbond tests
  PoS: fix Bonds data type and application of unbonding on it
  PoS: fix type s/OffsetUnboundingLen/OffsetUnbondingLen
  tests: reuse init_pos for native pos vp test
  tests: make native pos vp module public
  tests: add re-usable PoS initialization helper
  PoS: add PartialOrd, Ord, PartialEq and Eq for Epoched an EpochedDelta
  tests: expose native_vp test helpers
  shared/token: add arb_amount_ceiled testing strategy
  wasm: add tx_bond tests
  shared/token: add arb_amount testing strategy
  shared/key: add arb_common_keypair testing strategy
* tomas/refactor-pos-vp:
  changelog: add #318
  pos: fix bond zero amount error msg
  pos/validation: refactor accumulation of changes
sug0 added a commit that referenced this pull request Aug 26, 2022
This reverts commit 03904d7.

We will install this commit again once PR #371 lands.
@sug0
Copy link
Collaborator

sug0 commented Sep 15, 2022

note:

fn read_validator_eth_hot_key(
    &self,
    key: &Self::Address
) -> Option<Self::PublicKey>

this method should return Option<ValidatorEthKey<Self::PublicKey>> instead; same for write_validator_eth_hot_key, but in that case, we invert the order of inputs and outputs


EDIT: solved here 0ef4072

@tzemanovic
Copy link
Member Author

this is going to stay in draft for now - it's only partially finished, because some updates depend on other PoS changes that are not in eth-bridge-integration yet, but it unblocked the bridge dev itself

@cwgoes
Copy link
Collaborator

cwgoes commented Jan 5, 2023

@batconjurer @tzemanovic Is this PR still relevant? Should it be merged into the Ethereum bridge integration branch, perhaps?

@sug0
Copy link
Collaborator

sug0 commented Jan 5, 2023

@cwgoes it's already in eth-bridge-integration, but not in main, due to missing some VPs, still

@adrianbrink
Copy link
Member

Closing this since it's stale. If we need commits from this then @batconjurer @sug0 can pick them into a new PR.

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.

6 participants