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

[chain] Address Refactor #571

Merged
merged 98 commits into from
Nov 6, 2023
Merged

[chain] Address Refactor #571

merged 98 commits into from
Nov 6, 2023

Conversation

patrick-ogrady
Copy link
Contributor

@patrick-ogrady patrick-ogrady commented Oct 18, 2023

Resolves: #267
Resolves: #603
Blocks: #378

The HyperSDK is tightly bound to crypto.ed25519. This PR explicitly integrates crypto.secp256r1 to force us to come up with a more generic abstractions (codec.Address). This is required for anyone adding custom cryptography and for upcoming HyperSDK Program integration.

TODO

  • migrate utils to address
  • move address creation functions in auth to address
  • remove balance key printing
  • create var for address bytes instead of calling address creator each time (integration + e2e)
  • move NewED25519Address to address and make it work for secp256r1
  • only turn on DEBUG logs for HyperSDK
  • set redirect STDOUT for AvalancheGO processes created outside of initial 5: Respect value of RedirectStdout/RedirectStderr avalanche-network-runner#660
  • fix tokenvm compilation
  • add generic key support to CLI
  • use home directory for CLI default
  • Change ShortBytes() to Address() (explain prefix is used to properly extract value from bech32 encoding)
  • Migrate to just using ids.ID for all addresses (makes entirely uniform for spending) -> anything can receive balances/pay fees?
    • auth module calls have an ID that is used to regulate access to which addresses? that seems much too lockstep. We need to think deeply about how to support Auth defined as WASM here.
    • could put typeID ahead of address payload to scope to some sort of auth mechanism? (this ensures there is no way for auth to collide)
    • Add Actor to Auth interface explicitly
  • Add generic crypto support to README
    • add Address description to README (mention bytes are always 32 byte hash, which prevents someone from knowing publicKey until spend)
  • Print key type during selection
  • Find replacement for "Payer" (maybe "Sponsor")
  • codec.AddressBytes -> codec.Address
  • Update MorpheusVM README
  • Migrate CLI to use WS

@patrick-ogrady patrick-ogrady marked this pull request as draft October 18, 2023 06:39
@patrick-ogrady patrick-ogrady marked this pull request as ready for review November 6, 2023 19:03
@patrick-ogrady patrick-ogrady merged commit 80c1e5e into main Nov 6, 2023
19 of 21 checks passed
@patrick-ogrady patrick-ogrady added this to the v0.0.16 (Improvements from Devnet Experiments) milestone Nov 9, 2023
@patrick-ogrady patrick-ogrady self-assigned this Nov 9, 2023
@hexfusion hexfusion deleted the secp256r1-morpheusvm branch November 17, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant