Rust SDK: expose l1 operations
What
This MR exposes Tezos l1 operations in the Rust SDK.
Closes SDK-79
Why
In order to expose Tezos operations forging in the SDK bindings, operations must be introduced.
But since, the Tezos l1 operations are not strongly related to the bindings, it is appropriate to not implement it in the bindings crate.
Implementations already exist in etherlink packages, but adding it to the dependencies of the bindings seems not suitable for now.
Having the implementation in the Rust SDK seems to be the most relevant.
How
This MR duplicates the operations structure from the etherlink/kernel_latest/tezos/src/operation.rs crate and each of its dependencies (contract from src/kernel_sdk/encoding/src/contract.rs and entrypoint from contrib/mir/src/ast/michelson_address/entrypoint.rs) in various crates in a new protocol package in the Rust SDK.
No existing package in the Rust SDK were appropriate to add these new structures that why a new package has been introduces.
Moving directly, dependencies could lead to compatibility issues. For examples, in entrypoint, a function had scope on the crate because it was used for unsafe manipulation in another crate in the package mir.
Fixing these points can take time to think through and block the developments that rely on them.
That's why the structure has been duplicated instead of just been moved.
Manually testing the MR
make -C sdk/rust
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR