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

local-interchain: Rust Driver #785

Merged
merged 57 commits into from
Oct 11, 2023
Merged

local-interchain: Rust Driver #785

merged 57 commits into from
Oct 11, 2023

Conversation

Reecepbcups
Copy link
Member

@Reecepbcups Reecepbcups commented Sep 16, 2023

Closes #762

summary

Adds a rust driver to local-interchain & ci testing (for those who do not want to write Go)

reference - outside repo example

considerations

  • We could post localic_std to crates.io, but using it in the git repo works too (see reference above)
  • the actions ci requires a bunch of overhead, prebuilt binaries would be nice (requires release cycles)

TODO:

  • Match python spec
  • No Panics / unwraps, Results only
  • Clippy lint + fmt CI, no panics
  • Add Rust CI test (Match Python)
  • test in an external repo, ensure the workflow is simple to setup
  • integration docs + example
  • Ensure chain actions are in POST request only
  • properly sort types (ex: put CosmWasm in a modules mod)

todo after merge

  • The python client needs to use Upload-Type: cosmwasm header for store_code uploads. (per 3aab50a)
  • Remove server.json dep from python client (use cli / defaults)
  • Remove relayer.json need? (make optional, have relayer default, add cli arg for --relayer on start)

@Reecepbcups Reecepbcups marked this pull request as ready for review September 28, 2023 21:45
@Reecepbcups Reecepbcups requested a review from a team as a code owner September 28, 2023 21:45
@Reecepbcups Reecepbcups mentioned this pull request Sep 28, 2023
5 tasks
@Reecepbcups Reecepbcups enabled auto-merge (squash) September 28, 2023 21:47
@Reecepbcups Reecepbcups added the BACKPORT backport into all maintained branches label Sep 28, 2023
Copy link
Contributor

@misko9 misko9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super cool, need to play around with this and get it in some flows.

local-interchain/cmd/local-ic/start_chain.go Outdated Show resolved Hide resolved
local-interchain/interchain/handlers/uploader.go Outdated Show resolved Hide resolved
local-interchain/rust/localic-std/src/relayer.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@misko9 misko9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

@Reecepbcups Reecepbcups merged commit ea7ce03 into main Oct 11, 2023
9 checks passed
@Reecepbcups Reecepbcups deleted the reece/rust branch October 11, 2023 04:51
mergify bot pushed a commit that referenced this pull request Oct 11, 2023
* cli: add app overrides for port and address

* init: rust client base

* request resp: use JSON

* minor: fmt

* bin builder

* feat: add query & binary actions + simple examples

* Add cw_std

* feat: tx, get_tx_hash, and query_tx_hash

* add: localic-std library

* condense main.rs to use new std lib

* use file_path for uploader instead

* lib misc: bank_send, errors, libs, bals

* CW: Store, Init, Query, Better ActionBuilder

* minor: test path cleanup

* ci: attempt basic local-ic + rust e2e

* ci: set manifest-path to sub-dir

* ci: fix manifest path

* cw: get_contract_address

* cw store: if err, return exact (may not be JSON)

* add execute_contract

* feat: Upload-Type for cosmwasm contracts

* better uploader error handling for debugging

* more test, get_files func,

* backup; more info queries

* move GetInfo into their own funcs

* query: get ibc config (denom, bin, etc)

* minor: more general test for node name

* recover-key, overwrite genesis, add-full-node

* format

* add relayer support

* upgrade old docker values

* tweaks, relayer Channel type

* CW: instantiate, execute, and query with mut CW object

* move CW & Bank -> a modules mod

* on Tx, poll for Tx hash resp. 5x before failure

* codebase lint

* ci: clippy lint workflow

* Move dump-contract-state to POST

* ci: fix lint

* add: `get_sdk_status_code`

* ci: change clippy working-directory

* `query_value`, Debug for CRBuilder

* remove old println, add err to fet_files

* migrate to a workspace

* mod tidy

* add back flags to start_chain

* abstract away required flags

* remove old panic, fmt

* move old rest server to be cli arg only

* Add setup documentation

(cherry picked from commit ea7ce03)

# Conflicts:
#	local-interchain/go.mod
#	local-interchain/go.sum
Reecepbcups added a commit that referenced this pull request Oct 11, 2023
* local-interchain: Rust Driver (#785)

* cli: add app overrides for port and address

* init: rust client base

* request resp: use JSON

* minor: fmt

* bin builder

* feat: add query & binary actions + simple examples

* Add cw_std

* feat: tx, get_tx_hash, and query_tx_hash

* add: localic-std library

* condense main.rs to use new std lib

* use file_path for uploader instead

* lib misc: bank_send, errors, libs, bals

* CW: Store, Init, Query, Better ActionBuilder

* minor: test path cleanup

* ci: attempt basic local-ic + rust e2e

* ci: set manifest-path to sub-dir

* ci: fix manifest path

* cw: get_contract_address

* cw store: if err, return exact (may not be JSON)

* add execute_contract

* feat: Upload-Type for cosmwasm contracts

* better uploader error handling for debugging

* more test, get_files func,

* backup; more info queries

* move GetInfo into their own funcs

* query: get ibc config (denom, bin, etc)

* minor: more general test for node name

* recover-key, overwrite genesis, add-full-node

* format

* add relayer support

* upgrade old docker values

* tweaks, relayer Channel type

* CW: instantiate, execute, and query with mut CW object

* move CW & Bank -> a modules mod

* on Tx, poll for Tx hash resp. 5x before failure

* codebase lint

* ci: clippy lint workflow

* Move dump-contract-state to POST

* ci: fix lint

* add: `get_sdk_status_code`

* ci: change clippy working-directory

* `query_value`, Debug for CRBuilder

* remove old println, add err to fet_files

* migrate to a workspace

* mod tidy

* add back flags to start_chain

* abstract away required flags

* remove old panic, fmt

* move old rest server to be cli arg only

* Add setup documentation

(cherry picked from commit ea7ce03)

# Conflicts:
#	local-interchain/go.mod
#	local-interchain/go.sum

* fix go.mod & v8 namespace (-> v7)

---------

Co-authored-by: Reece Williams <[email protected]>
Co-authored-by: Reece Williams <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BACKPORT backport into all maintained branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a Rust driver
2 participants