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

Bump aptos-core rev, add framework client integration tests [DO NOT MERGE YET] #651

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

andygolay
Copy link
Contributor

@andygolay andygolay commented Oct 3, 2024

Summary

  • rev of aptos-core deps bumped
  • integration tests updated to use aptos framework

Changelog

  • Update Cargo.toml with new aptos-core rev
  • Add main.move script into bridge modules
  • Add update_bridge_operator function in client.rs to call script and update operator
  • Add framework integration tests in client_l1move_l2move and client_l2move_l1move

Testing

  • rust_backtrace=1 cargo test --test client_l1move_l2move -- --nocapture --test-threads=1
  • rust_backtrace=1 cargo test --test client_l2move_l1move -- --nocapture --test-threads=1

Outstanding issues

Getting a LINKER ERROR when calling atomic bridge framework functions from the Move script or Movement CLI, despite successfully calling framework functions in the Rust code. Currently debugging that blocking issue.

Details:

movement_client.update_bridge_operator().await? executes this Move script:

script {
    use aptos_framework::aptos_governance;
    use aptos_framework::atomic_bridge_configuration;
    fun main(core_resources: &signer, new_operator: address) {
        let framework_signer = aptos_governance::get_signer_testnet_only(core_resources, @aptos_framework);
        atomic_bridge_configuration::update_bridge_operator(&framework_signer, new_operator);
    }
}

The output indicates a linker error:

Script stdout: {
  "Error": "Simulation failed with status: Transaction Executed and Committed with Error LINKER_ERROR\nExecution failed with status: Linker Error: Cannot find ModuleId { address: 0000000000000000000000000000000000000000000000000000000000000001, name: Identifier(\"atomic_bridge_configuration\") } in data cache"
}

Later in the test, the Rust code calls a function. Output is:

ERROR bridge_service::chains::movement::utils: Transaction submission error: Unknown error Transaction committed on chain, but failed execution: Move abort in 0x1::atomic_bridge_configuration: EINVALID_BRIDGE_OPERATOR(0x1): Error code for invalid bridge operator 

(an error that indicates successful linking, eg it found the module).

I get a linker error when attempting to call any of the bridge modules' functions with Movement CLI.

@andygolay andygolay self-assigned this Oct 3, 2024
0xPrimata added a commit that referenced this pull request Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant