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

Sui Native bridge #17579

Merged
merged 87 commits into from
May 9, 2024
Merged

Sui Native bridge #17579

merged 87 commits into from
May 9, 2024

Commits on May 9, 2024

  1. [native bridge move code 1/n] - native bridge move package (#16259)

    ## Description
    
    Describe the changes or additions included in this PR.
    
    ## Test Plan
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    f24c965 View commit details
    Browse the repository at this point in the history
  2. move doc

    patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    5f3a386 View commit details
    Browse the repository at this point in the history
  3. [native bridge smart contract 2/n] - Add Bridge object to Sui framewo…

    …rk (#15125)
    
    ## Description
    
    This PR add bridge creation logic to end of epoch transaction
    
    ## Test Plan
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and not a breaking change, you can
    skip the following section. Otherwise, please indicate what changed, and
    then add to the Release Notes section as highlighted during the release
    process.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    9e518bb View commit details
    Browse the repository at this point in the history
  4. [native bridge move] bridge limiter (#16210)

    ## Description 
    
    Describe the changes or additions included in this PR.
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    
    ---------
    
    Co-authored-by: patrick <[email protected]>
    longbowlu and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    8ab546e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f63016a View commit details
    Browse the repository at this point in the history
  6. [bridge move] governance actions (#16221)

    ## Description
    
    Describe the changes or additions included in this PR.
    
    ## Test Plan
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    
    ---------
    
    Co-authored-by: patrick <[email protected]>
    longbowlu and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    e71461f View commit details
    Browse the repository at this point in the history
  7. [bridge 43/n] add bridge types in sui-types and helper functions (#16292

    )
    
    ## Description
    
    This PR facilitates the creation of bridge-api skeleton:
    #16293
    
    ## Test Plan
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    e632527 View commit details
    Browse the repository at this point in the history
  8. [bridge 44/n] skeleton for bridge-api (#16293)

    ## Description
    
    as title.
    
    ## Test Plan
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    c97c9ab View commit details
    Browse the repository at this point in the history
  9. [native bridge smart contract 7/n] - committee registration and initi…

    …ation (#16242)
    
    ## Description
    
    added move function to allow validator to register for the initial
    bridge committee.
    added rust code to execute init_committee function in end of epoch txn
    
    ## Test Plan
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    98eebd8 View commit details
    Browse the repository at this point in the history
  10. [bridge 45/n] replace env ids in Bridge Node (#16359)

    ## Description
    
    1. replace `BRIDGE_PACKAGE_ID` env var to 0xb
    2. replace `ROOT_BRIDGE_OBJECT_ID` env var to 0x9
    3. replace `ROOT_BRIDGE_OBJECT_INITIAL_SHARED_VERSION` env var with
    bridge_api RPC call
    
    ## Test Plan
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    a3c98a9 View commit details
    Browse the repository at this point in the history
  11. [bridge 46/n] replace remaining env ids in Bridge Node (#16358)

    ## Description
    
    replace both `BRIDGE_OBJECT_ID` and `BRIDGE_RECORD_ID` with
    `get_bridge_summary` RPC API
    
    ## Test Plan
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    7190d6d View commit details
    Browse the repository at this point in the history
  12. [bridge 47/n] updates to limiter & get_token_transfer_action_status (#…

    …16373)
    
    ## Description
    
    This PR contains two major things:
    1. updates to limiter - previously limiter's limiting direction is
    incorrect. The goal is to limit on the receiving end (where money flows
    out of the bridge) but we did in the opposite way. This PR fixes it
    2. add a public function `get_token_transfer_action_status` so we can
    use devInspect to get a transfer's current on chain status.
    
    ## Test Plan
    
    * unit tests in move.
    * off chain integration of `get_token_transfer_action_status` is in the
    next PR for readability.
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    6b68f08 View commit details
    Browse the repository at this point in the history
  13. fixup after rebase

    patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    6d6362c View commit details
    Browse the repository at this point in the history
  14. [native bridge move] - revert unused sui sys changes (#16544)

    ## Description 
    
    as titled
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    7b6e7d1 View commit details
    Browse the repository at this point in the history
  15. [native bridge move] - remove sui_system new function dependency to a…

    …void MoveVM new sys package publish bug (#16560)
    
    ## Description
    
    as titled
    ## Test Plan
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    8d22e89 View commit details
    Browse the repository at this point in the history
  16. fixup after rebase

    patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    72311ff View commit details
    Browse the repository at this point in the history
  17. fixup after rebase

    update bridge to move 2024
    patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    5c35593 View commit details
    Browse the repository at this point in the history
  18. fixup after rebase

    patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    112fd90 View commit details
    Browse the repository at this point in the history
  19. [native bridge] - bridge feature branch snapshot test fix (#16530)

    ## Description
    
    Describe the changes or additions included in this PR.
    
    ## Test Plan
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    
    ---------
    
    Co-authored-by: Dario Russi <[email protected]>
    patrickkuo and dariorussi committed May 9, 2024
    Configuration menu
    Copy the full SHA
    8a73938 View commit details
    Browse the repository at this point in the history
  20. [bridge 48/n] types: introduce a few more constants and move things t…

    …o sui-types/bridge.rs (#16380)
    
    ## Description 
    
    1, introduce a few more constants and move things to sui-types/bridge.rs
    2, relax the total voting power = 10k requirement, in case of not all
    validators opt in.
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    13b5dab View commit details
    Browse the repository at this point in the history
  21. [bridge 49/n] use devInpsect to get on chain status (#16379)

    ## Description
    
    reimplement `get_token_transfer_action_onchain_status` with dev_inspect
    
    ## Test Plan
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    36ac3aa View commit details
    Browse the repository at this point in the history
  22. [bridge] Bridge 2024 (#16883)

    damirka authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    50d8533 View commit details
    Browse the repository at this point in the history
  23. [bridge 50/n] use right threshold for different action types (#16378)

    ## Description 
    
    as title
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    0a31736 View commit details
    Browse the repository at this point in the history
  24. [bridge 51/n] support build sui transaction for emergency op action (#…

    …16387)
    
    ## Description 
    
    as title
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    3577414 View commit details
    Browse the repository at this point in the history
  25. [bridge 52/n] support build sui transaction for committee blocklist u…

    …pdate (#16388)
    
    ## Description 
    
    as title
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    7318e23 View commit details
    Browse the repository at this point in the history
  26. [bridge 53/n] build sui transaction for limit update action (#16389)

    ## Description 
    
    as title
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    863e149 View commit details
    Browse the repository at this point in the history
  27. [bridge 54/n] support build sui transaction for price update action (#…

    …16393)
    
    ## Description 
    
    as title
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    f6fee1f View commit details
    Browse the repository at this point in the history
  28. [bridge 56/n] update abi and eth event structs (#16438)

    ## Description 
    
    Use the latest abi from solidity and update the structs
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    1247d42 View commit details
    Browse the repository at this point in the history
  29. [bridge 57/n] enum-dispatch BridgeActions and move encoding logic to …

    …its own file (#16478)
    
    ## Description
    
    For reviewers: not much to read in this PR, mostly moving things around.
    
    ## Test Plan
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    72cf465 View commit details
    Browse the repository at this point in the history
  30. [bridge 58/n] handle eth message conversion and transaction builder (#…

    …16495)
    
    ## Description 
    
    This PR adds ethereum transaction building and message conversion.
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    14c0f36 View commit details
    Browse the repository at this point in the history
  31. [bridge 59/n] add bridge governance command to faciliate governance a…

    …ctions (#16510)
    
    ## Description 
    
    as title. Governance Command collects signatures and execute on chain
    transactions.
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    eaffd3d View commit details
    Browse the repository at this point in the history
  32. [bridge 60/n] add a sui command to init bridge committee registration (

    …#16511)
    
    ## Description
    
    Add a convenient command to initialize bridge committee, used along with
    `sui start`. E.g.
    ```
    cargo run --bin sui -- bridge-committee-init --bridge_committee.config bridge_committee_init_config.yaml
    ```
    
    ## Test Plan
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    f64196e View commit details
    Browse the repository at this point in the history
  33. [bridge 61/n] polish governance client commands (#16508)

    ## Description 
    
    as title
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    58272e3 View commit details
    Browse the repository at this point in the history
  34. [bridge 62/n] make bridge_client_gas_object optional, add tests for…

    … starting bridge node (#16771)
    
    ## Description 
    
    This PR does two things:
    1. make `bridge_client_gas_object` in BridgeConfig optional. If no gas
    object is provided, then we look for any gas object owned by the client
    address.
    2. add tests for starting bridge node.
    3. move key generation helper functions to
    `crates/sui-bridge/src/utils.rs`
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    2e9a721 View commit details
    Browse the repository at this point in the history
  35. [bridge/63] remove unnecessary fields in bridge config (#16840)

    ## Description 
    
    As title
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    c08eae0 View commit details
    Browse the repository at this point in the history
  36. [bridge 64/n] the first integration test (#16867)

    ## Description 
    
    as title
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    8750dfc View commit details
    Browse the repository at this point in the history
  37. Fix audit feedback on committee creation (#16909)

    ## Description
    
    As reported by audit if a validator registers with an already used
    pubkey for the bridge (whether maliciously or not) the creation of the
    committee will fail and as such an end of epoch would fail attempting to
    create the committee.
    Moreover there is no way at the moment to flush the proposed committee
    (in that respect, should we have an API for it?) and it would require an
    emergency release to take care of the problem.
    This should prevent the problem from happeing.
    
    ## Test Plan
    
    Added unit test
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    dariorussi authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    cb46828 View commit details
    Browse the repository at this point in the history
  38. [bridge 65/n] change tokenId from enum to u8, to prepare for the add …

    …token flow (#16939)
    
    ## Description 
    
    To unblock token flow, in this PR we change the usage of TokenID enum to
    u8.
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    b66f31f View commit details
    Browse the repository at this point in the history
  39. [bridge] enable some tests for sol changes (#16942)

    ## Description 
    
    as title.
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    a98ab99 View commit details
    Browse the repository at this point in the history
  40. Utils config refactor (#16886)

    1. `BridgeMessage` library => `BridgeUtils` library 
    - move token conversion functions from `BridgeConfig` to `BridgeUtils`.
    2. Bridge Config initialisation to expect first token as Sui (0 address)
        - @longbowlu like we had discussed.
    3. `CommitteeUpgradeable` + `BridgeConfig`
    - this includes adding the new "initializeConfig" function that is
    called in the deploy script directly after the config is deployed.
    
    ---------
    
    Co-authored-by: longbowlu <[email protected]>
    2 people authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    e8cf468 View commit details
    Browse the repository at this point in the history
  41. Add Token Message (#16892)

    Bridgerz authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    d716029 View commit details
    Browse the repository at this point in the history
  42. token price uint256 => uint64 (#16933)

    Change the token price type stored in the BridgeConfig contract from uint256 to uint64 as discussed with @longbowlu
    Bridgerz authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    e07cf64 View commit details
    Browse the repository at this point in the history
  43. Signature verification Audit request (#16934)

    1. update signature verification to revert with duplicate, and invalid
    signatures instead of skipping.
    2. include verification of provided "Sui Decimals" in Add EVM Token
    message function.
    Bridgerz authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    bdbf9ee View commit details
    Browse the repository at this point in the history
  44. [bridge 66/n] resume pending actions when node restarts (#16950)

    ## Description 
    
    When the node restarts, we read pending actions from DB and send to
    executor to resume them.
    
    meat is in `crates/sui-bridge/src/orchestrator.rs`
    
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    77b26b4 View commit details
    Browse the repository at this point in the history
  45. Check bridge routes on send token (#16960)

    ## Description
    
    Audit found that `send_token` was not checking for valid routes.
    Added the missing check
    
    ## Test Plan
    
    Added unit tests.
    Positive tests (no abort) for `send_token` are a bit trickier and will
    be added when unit test review is done. They were not there so this is
    not a regression in tests.
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    dariorussi authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    f17bacc View commit details
    Browse the repository at this point in the history
  46. [native-bridge] - add coins dynamically (#16904)

    ## Description
    
    New APIs :
    `register_foreign_token<T>(self: &mut Bridge, tc: TreasuryCap<T>, uc:
    UpgradeCap, metadata: &CoinMetadata<T>)`
    for registering new foreign token type
    
    New system message:
    added new `AddSuiToken` message for validators to approve new tokens
    addition to the bridge
    
    Notable changes:
    added BridgeTokenMetadata to treasury which contains token information
    Removed `notional_values` from bridge limiter, token value is now stored
    in the treasury in the `BridgeTokenMetadata`
    Removed bridged token packages (BTC, ETH, USDT, and USDC) from framework
    Added bridged tokens packages to `bridge/move/tokens`
    Added new token registration to `TestCluster`
    changed all static reference of token id and names with id_token_map
    obtained from `BridgeSummary`
    
    ## Test Plan
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    
    ---------
    
    Co-authored-by: longbowlu <[email protected]>
    Co-authored-by: Dario Russi <[email protected]>
    3 people committed May 9, 2024
    Configuration menu
    Copy the full SHA
    9945369 View commit details
    Browse the repository at this point in the history
  47. More audit, rename and invariants (#16924)

    ## Description
    
    More on audit feedback. Renaming as in the TODOs and invariants pulled
    at the entry of the function.
    `approve_bridge_message` has been renamed to `approve_token_transfer`
    and invariants have been pulled all the way up to the entry. You'll
    notice that because of that, the logic of the function changed a bit,
    both in terms of errors and in terms of what gets executed
    unconditionally.
    I think it's fine, but please review
    
    ## Test Plan
    
    Unit tests
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    dariorussi authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    4ccdc2f View commit details
    Browse the repository at this point in the history
  48. Reset index in loop to restart member search (#16955)

    ## Description
    
    Found from audit, we need to reset the start of the loop when looking
    for members
    
    ## Test Plan
    
    Added unit test
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    dariorussi authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    c1e452c View commit details
    Browse the repository at this point in the history
  49. [bridge 67/n] handle add_tokens_on_sui action, simplify test setup (#…

    …16978)
    
    ## Description 
    
    This PR does a few things:
    1. add support for AddTokensOnSui action
    2. refactor the test cluster set up to reduce time running time
    3. fix regression tests on Move
    
    ## Test Plan 
    
    e2e tests
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    590f15f View commit details
    Browse the repository at this point in the history
  50. EVM Unit Tests Pre-Land (#16972)

    Bridgerz authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    35e044c View commit details
    Browse the repository at this point in the history
  51. Unit tests and test coverage (#17078)

    ## Description 
    
    Added the easy tests to have 100% test coverage on most modules.
    The difficult modules are coming next ;)
    
    ## Test plan 
    This is tests only and the code coverage tool shows 100% on the changes
    modules
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol: 
    - [ ] Nodes (Validators and Full nodes): 
    - [ ] Indexer: 
    - [ ] JSON-RPC: 
    - [ ] GraphQL: 
    - [ ] CLI: 
    - [ ] Rust SDK:
    dariorussi authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    9d23875 View commit details
    Browse the repository at this point in the history
  52. [bridge 68/n] handle add_tokens_on_evm action, enhance sol tests and …

    …update abi (#16981)
    
    ## Description 
    
    This PR:
    1. add support for AddTokensOnEvm action
    2. add regression tests for sol
    3. update abi
    4. fix some other related sol stuff
    
    ## Test Plan 
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    69d58b7 View commit details
    Browse the repository at this point in the history
  53. Update BridgeConfigTest.t.sol (#16984)

    deploy fresh Bridge Config contract.
    
    set up adding mainnet tokens to test.
    
    ---------
    
    Co-authored-by: longbowlu <[email protected]>
    2 people authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    034fe65 View commit details
    Browse the repository at this point in the history
  54. Fix crates/sui-bridge build (#17118)

    ## Description 
    
    Fix toml file to build both from root and from `crates/sui-bridge`
    
    ## Test plan 
    
    Built in both directory
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol: 
    - [ ] Nodes (Validators and Full nodes): 
    - [ ] Indexer: 
    - [ ] JSON-RPC: 
    - [ ] GraphQL: 
    - [ ] CLI: 
    - [ ] Rust SDK:
    dariorussi authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    63a7356 View commit details
    Browse the repository at this point in the history
  55. [bridge 69/n] add pub function get_token_transfer_action_signatures

    … to get signatures in one call (#16998)
    
    ## Description
    
    Combining it with `DevInspectResults` we can get signatures for a
    recorded transfer action.
    
    Before this i have to do multiple calls to retrieves sigs. See the red
    lines replaced with
    `get_token_transfer_action_onchain_signatures_until_success` call in
    `basic.rs`. This will also make front end's life easier when getting
    sigs.
    
    ## Test Plan
    
    How did you test the new or updated feature?
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    76d0038 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    7ef94ef View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    d397ce9 View commit details
    Browse the repository at this point in the history
  58. Use SafeERC20 (#17019)

    Bridgerz authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    9f8819b View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    f6c3492 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    ba71e4e View commit details
    Browse the repository at this point in the history
  61. Price decimal precision 4 => 8 (#16895)

    Co-authored-by: longbowlu <[email protected]>
    2 people authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    fcfba00 View commit details
    Browse the repository at this point in the history
  62. Bridge Custom Networks (#17140)

    Bridgerz authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    908494b View commit details
    Browse the repository at this point in the history
  63. [bridge/70] cache the result of get_mutable_bridge_object_arg (#17152)

    ## Description 
    
    instead of querying the bridge arg on chain every time, we do this in
    the beginning of the program and cache it. If the fetch (with retry)
    fails, it panics.
    
    ## Test plan 
    
    existing tests 
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol: 
    - [ ] Nodes (Validators and Full nodes): 
    - [ ] Indexer: 
    - [ ] JSON-RPC: 
    - [ ] GraphQL: 
    - [ ] CLI: 
    - [ ] Rust SDK:
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    300d26b View commit details
    Browse the repository at this point in the history
  64. [bridge 71] remove stale comments (#17162)

    ## Description 
    
    Removed inaccurate comments. They were correct until we changed the type
    of watermark.
    
    ## Test plan 
    
    How did you test the new or updated feature?
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol: 
    - [ ] Nodes (Validators and Full nodes): 
    - [ ] Indexer: 
    - [ ] JSON-RPC: 
    - [ ] GraphQL: 
    - [ ] CLI: 
    - [ ] Rust SDK:
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    bfeeae3 View commit details
    Browse the repository at this point in the history
  65. Committee length < 256 (#17210)

    Bridgerz authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    b01bb0d View commit details
    Browse the repository at this point in the history
  66. [bridge 72/n] rework node config a little bit (#17197)

    ## Description 
    
    (the meat is in `config.rs`)
    
    This PR reworks `BridgeNodeConfig` to make it easier to reason about.
    The main changes:
    1. add `sui_bridge_chain_id` and `eth_bridge_chain_id`
    2. sui related fields are moved to `SuiConfig`
    3. eth related fields are moved to `EthConfig`
    4. `eth_addresses` is now `eth_bridge_proxy_address`, and when the node
    starts, it fetches all contracts's addresses starting from
    `EthSuiBridge`
    
    Other than that, i also moved some common test utils around from
    `basic.rs` to `test_utils.rs`.
    
    ## Test plan 
    
    unit tests
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol: 
    - [ ] Nodes (Validators and Full nodes): 
    - [ ] Indexer: 
    - [ ] JSON-RPC: 
    - [ ] GraphQL: 
    - [ ] CLI: 
    - [ ] Rust SDK:
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    d25329d View commit details
    Browse the repository at this point in the history
  67. Cleanup and test rework (#17116)

    ## Description
    
    More Move2024 cleanup and formatting.
    Moved tests out of `bridge.move` in its own test directory.
    We will transition all tests to that model as we work towards 100% test
    coverage.
    
    ## Test plan
    
    This is mostly tests
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol:
    - [ ] Nodes (Validators and Full nodes):
    - [ ] Indexer:
    - [ ] JSON-RPC:
    - [ ] GraphQL:
    - [ ] CLI:
    - [ ] Rust SDK:
    dariorussi authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    1033fee View commit details
    Browse the repository at this point in the history
  68. E2E test refactor (#17138)

    Co-authored-by: longbowlu <[email protected]>
    2 people authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    c194382 View commit details
    Browse the repository at this point in the history
  69. Move all ETH wrapping and unwrapping to vault (#17255)

    ## Description 
    
    Thanks to @dariorussi for pointing out this very obvious design flaw.
    The SuiBridge contract no longer needs reference the WETH contract at
    all, and the vault takes care of all wrapping and unwrapping of ETH.
    
    ## Test plan 
    
    Updated necessary tests
    
    ---------
    
    Co-authored-by: Lu Zhang <[email protected]>
    2 people authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    015d947 View commit details
    Browse the repository at this point in the history
  70. [bridge] use different foundry-out for each test run (#17258)

    ## Description 
    
    When we run multiple bridge tests in the same time, forge may complain
    about the conflicts. This PR fixes this problem by using a different
    FOUNDRY_OUT folder for each test run.
    
    
    ## Test plan 
    
    CI tests
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol: 
    - [ ] Nodes (Validators and Full nodes): 
    - [ ] Indexer: 
    - [ ] JSON-RPC: 
    - [ ] GraphQL: 
    - [ ] CLI: 
    - [ ] Rust SDK:
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    3e3bd67 View commit details
    Browse the repository at this point in the history
  71. [bridge 73] add eth_contracts_start_block_fallback (#17239)

    ## Description 
    
    This PR adds `eth_contracts_start_block_fallback` in `BridgeNodeConfig`.
    The comment describes it enough:
    ```
        /// The starting block for EthSyncer to monitor eth contracts.
        /// It is required when `run_client` is true. Usually this is
        /// the block number when the bridge contracts are deployed.
        /// When BridgeNode starts, it reads the contract watermark from storage.
        /// If the watermark is not found, it will start from this fallback block number.
        /// If the watermark is found, it will start from the watermark.
        /// this v.s.`eth_contracts_start_block_override`:
        pub eth_contracts_start_block_fallback: Option<u64>,
        /// The starting block for EthSyncer to monitor eth contracts. It overrides
        /// the watermark in storage. This is useful when we want to reprocess the events
        /// from a specific block number.
        /// Note: this field has to be reset after starting the BridgeNode, otherwise it will
        /// reprocess the events from this block number every time it starts.
        #[serde(skip_serializing_if = "Option::is_none")]
        pub eth_contracts_start_block_override: Option<u64>,
    ```
    
    Overall, this field provides the ability to give a fallback block to
    start when no cursor found in DB. While
    `eth_contracts_start_block_override` is more intrusive because of its
    highest precedence and stickiness (you need to remove it from config
    before restarting the node to void it) .
    
    To better test the behavior, i spin out `get_sui_modules_to_watch` and
    `get_eth_contracts_to_watch`.
    
    ## Test plan 
    
    existing and new unit tests
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol: 
    - [ ] Nodes (Validators and Full nodes): 
    - [ ] Indexer: 
    - [ ] JSON-RPC: 
    - [ ] GraphQL: 
    - [ ] CLI: 
    - [ ] Rust SDK:
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    bc7154c View commit details
    Browse the repository at this point in the history
  72. [native bridge] - fix bridge move test and enable test in CI (#17331)

    ## Description 
    
    As titled 
    
    ## Test plan 
    
    How did you test the new or updated feature?
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol: 
    - [ ] Nodes (Validators and Full nodes): 
    - [ ] Indexer: 
    - [ ] JSON-RPC: 
    - [ ] GraphQL: 
    - [ ] CLI: 
    - [ ] Rust SDK:
    patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    ca26c89 View commit details
    Browse the repository at this point in the history
  73. [native bridge move] - fix limiter error handling (#17208)

    ## Description
    
    added Result struct to pass error info back to call site.
    
    ## Test plan
    
    How did you test the new or updated feature?
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol:
    - [ ] Nodes (Validators and Full nodes):
    - [ ] Indexer:
    - [ ] JSON-RPC:
    - [ ] GraphQL:
    - [ ] CLI:
    - [ ] Rust SDK:
    patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    e8e7e6f View commit details
    Browse the repository at this point in the history
  74. [bridge] refactor test utils (#17288)

    ## Description 
    
    This PR:
    1. refactors e2e test utils by introducing `BridgeTestClusterBuilder`
    and `BridgeTestCluster`
    2. enables the ability to drop spawned BridgeNodes, and restart them
    (not in this PR, but this PR makes it easy to do)
    3. speeds up the setup by doing things in parallel. This probably cuts
    at least 20 seconds for each test.
    
    ## Test plan 
    
    existing tests
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol: 
    - [ ] Nodes (Validators and Full nodes): 
    - [ ] Indexer: 
    - [ ] JSON-RPC: 
    - [ ] GraphQL: 
    - [ ] CLI: 
    - [ ] Rust SDK:
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    e5bb838 View commit details
    Browse the repository at this point in the history
  75. [bridge] add more sui events emitted in bridge.move (#17302)

    ## Description 
    
    This PR adds more events in Rust to match those emitted in bridge.move.
    This is one extra step towards the monitoring system on bridge node.
    Also adds two two handy functions `new_bridge_transactions` and
    `new_bridge_events` to help observe bridge transactions/events.
    
    
    ## Test plan 
    
    unit tests + integration tests
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol: 
    - [ ] Nodes (Validators and Full nodes): 
    - [ ] Indexer: 
    - [ ] JSON-RPC: 
    - [ ] GraphQL: 
    - [ ] CLI: 
    - [ ] Rust SDK:
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    8dbdff6 View commit details
    Browse the repository at this point in the history
  76. [bridge] rename TokenBridgeEvent to TokenDepositedEvent and remov…

    …e the message_type field (#17365)
    
    ## Description
    
    for better naming and fewer bytes
    
    ## Test plan
    
    How did you test the new or updated feature?
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol:
    - [ ] Nodes (Validators and Full nodes):
    - [ ] Indexer:
    - [ ] JSON-RPC:
    - [ ] GraphQL:
    - [ ] CLI:
    - [ ] Rust SDK:
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    272831d View commit details
    Browse the repository at this point in the history
  77. [bridge 76/n] add events for committee.move (#17374)

    ## Description 
    
    This PR adds events for committee.move in bridge node.
    
    ## Test plan 
    
    tests
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol: 
    - [ ] Nodes (Validators and Full nodes): 
    - [ ] Indexer: 
    - [ ] JSON-RPC: 
    - [ ] GraphQL: 
    - [ ] CLI: 
    - [ ] Rust SDK:
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    b60d1af View commit details
    Browse the repository at this point in the history
  78. [native-bridge] - committee registration cli tool (#17110)

    ## Description 
    
    added a new command to bridge tool cli to register as a committee member
    
    ## Test plan 
    
    manually tested on bridgenet
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol: 
    - [ ] Nodes (Validators and Full nodes): 
    - [ ] Indexer: 
    - [ ] JSON-RPC: 
    - [ ] GraphQL: 
    - [ ] CLI: 
    - [ ] Rust SDK:
    patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    6e258e2 View commit details
    Browse the repository at this point in the history
  79. [bridge] remove unnecessary &mut (#17470)

    ## Description
    
    1. `get_token_transfer_action_signatures` and
    `get_token_transfer_action_status` does not need mutable Bridge ref
    2. switch the order of Bridge and clock in `claim_token_internal` so we
    can use the receiver syntax
    
    ## Test plan
    
    existing tests
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol:
    - [ ] Nodes (Validators and Full nodes):
    - [ ] Indexer:
    - [ ] JSON-RPC:
    - [ ] GraphQL:
    - [ ] CLI:
    - [ ] Rust SDK:
    longbowlu authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    4d6e9a3 View commit details
    Browse the repository at this point in the history
  80. Sui Bridge EVM Upgrade Action (#17266)

    Co-authored-by: longbowlu <[email protected]>
    2 people authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    112a6bb View commit details
    Browse the repository at this point in the history
  81. Configuration menu
    Copy the full SHA
    99f1e62 View commit details
    Browse the repository at this point in the history
  82. tests and move 2024 cleanup (#17517)

    ## Description
    
    Mostly moved tests in their own files. Particularly tests that have to
    be expanded.
    Move 2024 cleanup.
    Formatting and convention alignment.
    
    This is almost no change except for few visibility changes we will talk
    about
    
    ## Test plan
    
    Existing test, no feature added
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol:
    - [ ] Nodes (Validators and Full nodes):
    - [ ] Indexer:
    - [ ] JSON-RPC:
    - [ ] GraphQL:
    - [ ] CLI:
    - [ ] Rust SDK:
    dariorussi authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    2cedaec View commit details
    Browse the repository at this point in the history
  83. fixup after rebase

    regen snapshots
    
    fix test
    patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    f515446 View commit details
    Browse the repository at this point in the history
  84. audit feedback (#17573)

    ## Description
    
    Audit feedback around `notional_value`, minor cleanup
    
    ## Test plan
    
    Existing tests
    
    ---
    
    ## Release notes
    
    Check each box that your changes affect. If none of the boxes relate to
    your changes, release notes aren't required.
    
    For each box you select, include information after the relevant heading
    that describes the impact of your changes that a user might notice and
    any actions they must take to implement updates.
    
    - [ ] Protocol:
    - [ ] Nodes (Validators and Full nodes):
    - [ ] Indexer:
    - [ ] JSON-RPC:
    - [ ] GraphQL:
    - [ ] CLI:
    - [ ] Rust SDK:
    dariorussi authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    72ef8a1 View commit details
    Browse the repository at this point in the history
  85. Update BridgeVault.sol (#17231)

    fix from the Hacken bug bounty.
    Bridgerz authored and patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    09e3522 View commit details
    Browse the repository at this point in the history
  86. regen snapshots

    move bridge to protocol version 45
    
    update snapshots
    patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    5bc4639 View commit details
    Browse the repository at this point in the history
  87. update snapshots

    patrickkuo committed May 9, 2024
    Configuration menu
    Copy the full SHA
    bb61ecf View commit details
    Browse the repository at this point in the history