Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Refactor sudt with registry address #116

Merged
merged 15 commits into from
Apr 18, 2022

Conversation

jjyr
Copy link
Collaborator

@jjyr jjyr commented Apr 6, 2022

CHANGES

Core data structure

Address registry

Files

  • gw_registry_addr.h, address data structure
  • gw_eth_addr_reg.h
  • gw_eth_addr_reg.c
  • crates/state-validator

Changes

  • New builtin script: Ethereum address registry.
  • User deposit will mapping ethereum address to the Ethereum address registry.

Godwoken Syscalls

Files

  • sudt_utils.h
  • generator_utils.h
  • validator_utils.h

Changes

The following new syscall is added:

  • sys_get_registry_address_by_script_hash
  • sys_get_script_hash_by_registry_address

The following syscall is removed:

  • sys_get_script_hash_by_prefix - used to get script_hash by short_script_hash

Short script hash in sudt_utils.h is replaced by registry address

Signing

Files

  • crates/challenge-lock

Changes

  • Support signing tx and withdrawal in Ethereum tx format and EIP-712.
  • Using RollupConfig#chain_id in tx, withdrawal signature.

@jjyr jjyr requested a review from zeroqn as a code owner April 6, 2022 14:42
Flouse added a commit to Flouse/godwoken-docker-prebuilds that referenced this pull request Apr 7, 2022
c/common.h Show resolved Hide resolved
c/common.h Outdated Show resolved Hide resolved
c/generator_utils.h Show resolved Hide resolved
tests/src/testing_tool/chain.rs Outdated Show resolved Hide resolved
tests/src/script_tests/l2_scripts/examples.rs Outdated Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants