gear-tech / gear-program Goto Github PK
View Code? Open in Web Editor NEWSetup and deployment tool for developing gear program
Setup and deployment tool for developing gear program
complete the docs for crates.io
README.md
into lib.rs
automaticallyNo response
When I try to run gear program from different process for a same node and in the same time, then I often get this error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: SubxtBasic(Rpc(Call(Custom(ErrorObject { code: ServerError(1014), message: "Priority is too low: (242 vs 242)", data: Some(RawValue("The transaction has too low priority to replace another transaction already in the pool.")) }))))',
_
No response
At the moment credentials are stored in a plain (text) file, check src/cmd/login.rs#L7-L23 . I would like to suggest to use specialized vault for such data.
Some links for further investigations:
No response
Expected status:
$ gear load <json-file>
loggined as xxx
No response
Supports all extrinsics of pallet-gear https://github.com/gear-tech/gear/blob/12a0a165e8f6c36383c701c885d4d12a3cec467a/pallets/gear/src/lib.rs#L401
add these calls in crate::api::calls
, mb renaming callls
to extrinsics
--code
to command deploy, if --code
, only accept wasm filereply
No response
similar to #2
submit the submit_program
and listen to events, exit after program initialized
No response
I think we also need to declare the params { endpoint, passwd }
outside of specfied commands, make them global arugments, these two params are shared for most of the commands indeed.
Originally posted by @clearloop in #8 (comment)
It is really hard to write examples for each command in README, we can show them in the examples folder
The integraion tests for commands under tests/cmd/*.rs
already can treat as examples, what we need to do is copying the main logic to examples/*.rs
No response
https://github.com/gear-tech/gear-program/blob/master/src/api/mod.rs
Big changes in this version, Events
hardly can be decoded as what we are dealing with now, considering waiting for 0.24.0
Compiling the code taking too much time, let's go with docker
Use docker to run the integration tests
No response
but some functions/events only work on the matched spec_version, if we align to the lastest version of gear-node, this program may not work for the gear testnet
We are to keep the API/runtime part up to date and detect incompatibility with the node at early stages (another task to CI I guess, maybe some nighly job that compares actual API with the generated.rs
).
Ideally, every new feature should be accompanied by the corresponding test/example.
Originally posted by @shamilsan in #6 (comment)
the logs of gear-program are all raw stdout for now
mb we need to use log
or color-eyre
, log
for custom logs, color-eyre
for error outputs
No response
We have several restrictions on our extrinsics: for example, we deny ability to send more gas than maximal block gas limit, we deny ability to deploy different programs under the same program/actor id. Some things can be caught for free locally, avoiding wasting money and time for extrinsic fail.
But I'd recommend adding some smoke tests to CI against the latest node running in the dev node (it can be downloaded here: https://github.com/gear-tech/gear/releases/download/build/gear-node).
We run the node in a detached mode for such kind of purpose: https://github.com/gear-tech/gear/blob/master/scripts/src/test.sh#L98
Originally posted by @shamilsan in #6 (review)
No response
We can not build docs on docs.rs with the current build script since it requires write access to the file system
gear
will not exit when error occurs since there is another process waiting for events, and the two process are combined with one join!
exit on errors
No response
<Paste your log here>
Most of the commands were written before the implementation of the integration tests utils, now we need to complete them
Add integration tests for the commands below
No response
the api in gp is built with subxt-0.22.0, we need subxt-cli-0.22.0 to generate the apis
add more checks in generate-api.sh
No response
Need to add docs for how to use the scirpts
in developing, for example update the api
add a new chapter dev
in README
No response
Usage:
gear meta `*.meta.wasm`
https://github.com/gear-tech/gear-js/tree/master/utils/meta-cli
No response
No response
https://docs.rs/subxt/0.22.0/subxt/rpc/struct.RpcClientBuilder.html#method.request_timeout
enhance the log output after executing extrinsics
show the balances status after submiting extrinsics
No response
This project is outdated in crates.io
Trigger cargo publish
on merging master
No response
The code under the builder
should not be embedded inside the main crate since user will never use it
Create a new crate for it
No response
What about
submit_program
?I'm okay with both, one concern is each of the commands is a single word for now. ( deploy for
submit_program
, submit forsubmit_code
)
I've already offered renaming: submit_code
-> upload_code
, submit_program
-> create_program
, so it will be single-word some time soon
I'd add only submit program at the moment
Originally posted by @breathx in #13 (comment)
Allow users transfering balance via binary gear
add command transfer
No response
This is useful for integration tests and debugging.
read
No response
can not login if there is no .gear
recheck the mkdir
code for this
No response
<Paste your log here>
Add command printing the mailbox's content of address
we already have
gear-program/src/api/storage.rs
Lines 121 to 122 in d5b8fad
No response
https://github.com/gear-tech/gear-program/tree/master/src/cmd
Since we have requirements for using this project for writing tests, we can trim the cmd
folder if users just want to use the library of this project
[features]
default = [ "cmd" ]
cmd = []
node-key = []
for using this library
gear-program = { version = "0.1.2", default-featulres = false }
here we need to exit the process after MessageDispatched, show the succeed or the failure log
send / reply message and listen to the event, exit process after MessageDispatched
No response
needs to refactor the template apps registry since we don't maintain gear-tech/apps
anymore
write each of the git repo of gear program templates into static array and just clone them.
No response
https://github.com/gear-tech/gear-program/blob/master/src/api/mod.rs#L26
we are currently binding the Signer
with Api
, which makes it unavaiable to call runtime apis without a signer.
Signer
typeSigner
to the api Client when it is neededIt is really overhead to decode non-exists structure from bytes and output them in rust, as a solution for reading state, I'll just create a new wasm project with the type registry providing functions like encode_input
and decode_output
Originally posted by @clearloop in #32 (comment)
Once we decoded the PortableRegistry
from meta_registry
, we can generate rust types from it into a new wasm project, which provides
extern "C" fn encode_$type() {
hex::encode(...)
}
extern "C" fn encode_$type() {
serde_json::from_str(...)
}
to do the encoding/decoding
stuffs
The best solution I can figure out is do it in wasm, which can solve this problem dynamically
, we also need to cache "*.meta.wasm" and the generated wasm project uner ~/.gear for re-using purposes.
Update this repo when gear-tech/gear updates.
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
scripts/generate-api.sh
and check if the project can be compiled,
No response
instroduce sign && verify ability in gear-program
The command would be like
gear key
sign <pk> <msg> —scheme <SCHEME>
verify <msg> <pk> —scheme <SCHEME>
/// list all avaible keys
list <keystore-path>
/// inspect from private key bytes, only get public from it momentary
inspect <pk-bytes> —scheme <SCHEME>
@EugenWay, @shamilsan feel free to comment on this
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.