Giter Club home page Giter Club logo

casper-client-rs's People

Contributors

acstonecl avatar asladeofgreen avatar bors[bot] avatar bpr avatar casperlabs-bors-ng[bot] avatar darthsiroftardis avatar dwerner avatar edhastingscasperassociation avatar fizyk20 avatar fraser999 avatar georgepisaltu avatar goral09 avatar groussac avatar henrytill avatar hoffmannjan avatar marc-casperlabs avatar mpapierski avatar nilz3ro avatar rafal-ch avatar rob-casper avatar sacherjj avatar tomvasile avatar zacshowa avatar zie1ony avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

casper-client-rs's Issues

Sign Transaction command

Add a sign-transaction command to the client that adds support for signing previously created unsigned transactions similar to the sign-deploy command.

Update branding and company name

We should update any images in READMEs and in links (e.g. html_favicon_url and html_logo_url). We should also update the name "CasperLabs" to "Casper Labs" throughout the code (e.g. in doc comments, READMEs, Cargo.toml files)

Add infrastructure to craft transactions into the casper-client.

This ticket represents the work required to add a command to the casper-client that parses a transaction from the command line and builds an instance of the Transaction type for use in sending to a node via the RPC service, or for writing a transaction file that can later be signed by the client.

Client Library Updates 3 of 3

Add 3 new library functions to handle the RPC requests to the node/RPC-sidecar. This could again be one eight point ticket or three 3 point tickets. As with the work above the 3 smaller tickets would lead to nicer PR's

Update help string for subcommand query-global-state

The help string should list all the Key variants including their formatted form. Same should apply to any other subcommands which list the Key variants. Also ensure we consistently apply a space after each comma in the list, as this is not currently the case.

Error when installing casper-client via WSL (?) (some casper_execution_engine versions issue)

Hi, i'm new in Casper ecosystem and i try to install "casper-client" according to this official YT tutorial (https://www.youtube.com/watch?v=asZ4J1fMgk4&list=PL8oWxbJ-csEqjX2A1pprKuHzCBS8RMcmR&index=2).

I installed Rust, and Cargo via WSL on Windows and now i try to install casper-client - but got some compiling errors (you can see in screen from terminal)

casper_error

It is something connected to casper-execution-engine (version 2.0.1 vs 3.0.0) - newer version was released 2 days ago.

How to properly execute "cargo install casper-client" command?

Add support for the new "speculative_exec" endpoint

casper-network/casper-node#2880 downstream dependency

The new method should be called execute-deploy and require the following arguments:
* optional block identifier (as per get-block subcommand)
* deploy_file (as per send-deploy subcommand)

We should provide two new subcommands, speculative-put-deploy and speculative-send-deploy, mirroring put-deploy and send-deploy. Both subcommands should take an optional block identifier (as per get-block subcommand) to be used to specify the global state root to be used.

Internally, they should construct a JSON-RPC request and call the node's speculative_exec endpoint.

Research Spike

investigating of what needs to go into working on the client.

Support requesting the finalized deploys via get-deploy in the casper-client

The info_get_deploy RPC on the 1.5.0 node has been enhanced to support requesting the finalized approvals of the deploy via the addition of a new finalized_approvals: bool field in the request which defaults to false if not provided. The client's corresponding subcommand get-deploy should be extended to support setting this field to true.

Make --payment-amount in client optional for both native transfer subcommands

In the Rust client, we should support no payment-related args being provided in the transfer and make-transfer subcommands. In the case that no payment-related args are provided by the user, the deploy's payment code should be constructed so that it results in a standard payment of 2_500_000_000 motes. For reference, see https://github.com/casper-network/casper-node/blob/91b760341b2dd93da87ac9b903f510ea952e2cc1/client/lib/parsing.rs#L524-L527 and https://github.com/casper-network/casper-node/blob/91b760341b2dd93da87ac9b903f510ea952e2cc1/client/lib/parsing.rs#L228-L239

We should also update the help strings output to a user of the client, and the rustdoc comments around the relevant lib code to make it clear that payment-related args are stored as part of the deploy, but are otherwise unused.

copied issued from https://app.zenhub.com/workspaces/engineering-l1-60953fafb1945f0011a3592d/issues/gh/casper-network/casper-node/2074

Client Library Updates 3 of 3

Add 3 new library functions to handle the RPC requests to the node/RPC-sidecar. This could again be one eight point ticket or three 3 point tickets. As with the work above the 3 smaller tickets would lead to nicer PR's

Short argument "-p" for "--public-key" is broken in recent versions

It seems there was some rewrite recently and "-p" isn't an alias for "--public-key" anymore but for "purse-uref" as seen here:

const ARG_SHORT: &str = "p";

I experienced this with version 1.4.1 + 1.4.2. Version 1.3.3 is working.

The casper-client help account-address shows this info:

OPTIONS:
    -p, --public-key <FORMATTED STRING or PATH>
            This must be a properly formatted public key. The public key may instead be read in from a file, in which
            case enter the path to the file as the --public-key argument. The file should be one of the two public key
            files generated via the `keygen` subcommand; "public_key_hex" or "public_key.pem"

That also breaks the get-auction-info.sh script for providing account details -> I'll file a separate issue there if you can confirm that bug.

Here is the affected line:
https://github.com/make-software/casper-account-info-contract/blob/master/tools/get-account-info.sh#L65

Improve multisig support in casper-client-rs

We should support the creation of deploys where the session account is not automatically derived from the provided secret key. We should also make the provision of a secret key optional for the make-deploy and make-transfer subcommands

Allow `CLType::Any` as session args.

Often developers use their own structs with their own FromBytes implementation.
Then in smart contract code it is possible to write:

let arg: MyStruct = runtime::get_named_arg("arg");

Sadly it's not easy to construct such an argument with casper-client. There is a hack that can be used. Simply use an fix-sized array:

--session-arg "arg:byte_array_14='09000000536574506172616d7301'"

I'd like to able to write instead:

--session-arg "arg:any='09000000536574506172616d7301'"

Client Library Updates 1 of 3

Add 3 new library functions to handle the RPC requests to the node/RPC-sidecar. This could again be one eight point ticket or three 3 point tickets. As with the work above the 3 smaller tickets would lead to nicer PR's

support for the changes made to the info_get_deploy RPC in node 2.0.

This PR adds support for the changes made to the info_get_deploy RPC in node 2.0.

As part of the node 2.0 work, many types upon which the client depends have been moved to casper-types from casper-node, meaning these no longer need to be duplicated in the client library.

One point to note is that validation of a get-block response has been disabled. There will likely be a further change made in casper-types which will allow the JsonBlock type to be removed in favour of the actual Block type, and Block provides a public verify() method which will be suitable for this use case. Rather than spending time refactoring the validation logic, I have left it commented out in anticipation of it being replaced soon.

A final point to note is that the casper-types dependency has a patch specified in the manifest of casper-types = { git = "https://github.com/Fraser999/casper-node", branch = "2124-use-execution-journal" }. Once the node PR using this fork and branch merges, we should update the patch to casper-types = { git = "https://github.com/casper-network/casper-node", branch = "feat-2.0" }.

[Issue] Unable to run casper-client on Mac M1

Mac M1 users are not able to install casper-client version 1.5.0 installed via cargo install casper-client.

Steps to reproduce

brew update
xcode-select --install
brew install pkg-config
brew install openssl
cargo install casper-client

What should happen:

casper-client CLI tool should be installed by cargo, permitting use of casper-client commands like casper-client -V or casper-client get-state-root-hash

What actually happens:

All casper-client commands result in:

MacBook:/ user$ casper-client -V
Illegal instruction: 4

Debug info

This is broken using rust nightly.
Rustc:

user$ rustc --version
rustc 1.66.0 (69f9c33d7 2022-12-12)

Rustup:

user$ rustup --version
rustup 1.25.1 (bb60b1e89 2022-07-12)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.66.0 (69f9c33d7 2022-12-12)`

Cargo:

user$ cargo --version
cargo 1.66.0 (d65d197ad 2022-11-15)

And non-shallow checkout out brew:

git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow

2.0.0: bash auto-completion is broken

# Linux/Distri Version
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal

# System Information
$ uname -a
Linux hostname 5.4.0-153-generic #170-Ubuntu SMP Fri Jun 16 13:43:31 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

# Casper Client Version
$ casper-client -V
Casper client 2.0.0-438b660

# Generating the bash auto-completion script
$ sudo casper-client generate-completion
[sudo] password for XXX:
Wrote completion script for bash to /usr/share/bash-completion/completions

# Manually dot sourcing the generated file gives an error
$ . /usr/share/bash-completion/completions/casper-client
-bash: /usr/share/bash-completion/completions/casper-client: line 15: syntax error near unexpected token `client,account-address'
-bash: /usr/share/bash-completion/completions/casper-client: line 15: `            Casper client,account-address)'

So the current casper-client broke another existing feature.

I compared the generated file quickly to one from I think V 1.6 and it looks totally different.

Client Command Updates 1 of 3

Add 3 new commands to the client using this infrastructure developed in the first ticket #119 (Parsing and Buidling Transactions in the client).

Support speculative execution via the casper-client

The put-deploy, send-deploy and transfer subcommands should all be extended to support sending the deploy to the node's new speculative_exec endpoint. This should take the form of a new arg --speculative-exec for each subcommand which itself takes an optional value of a BlockIdentifier.

Client does not respect chainspec `deploys.max_deploy_size`

Background

I am using NCTL as my development environment and have customized the deploys.max_deploy_size in the chainspec, because the current deployment size limit is too small for running code such as the Risc0 verifier.

Despite increasing this limit, I am still encountering the following error:

deploy size of 1438228 bytes exceeds limit of 1048576

Issue

The casper-client contains a hardcoded deployment size limit which is manually kept in sync with the production environment. This hardcoded limit is not compatible with customized networks.

Suggestion

The ideal solution would be to enable the client to fetch limits directly from the chain specification. However, until such a feature is implemented, it might be more practical to disable client-side validation of the deployment size.

Client Library Updates 2 of 3

Add 3 new library functions to handle the RPC requests to the node/RPC-sidecar. This could again be one eight point ticket or three 3 point tickets. As with the work above the 3 smaller tickets would lead to nicer PR's

Add clap command for put-transaction RPC method

This ticket will be for adding another command to the client via clap, it will utilize the the work done to create transactions and include creating new code to craft and send the RPC request to a node.

Client updates to support the new transaction (deploy) type

Also, while I remember, L2 will need a ticket to update the client to make use of the new JSON-RPC endpoints. This will be a fairly large piece of work, and as we add/change functionality around the new TransactionV1 type, the client will likely often need a corresponding update. Until the client gets those updates, we won't be able to use nctl as is to exercise the new node functionality. I don't expect nctl tests to break while we're waiting for this, since we're continuing to support Deploy, but the sooner the client is updated, the sooner we can start building up the nctl tests for TransactionV1s

Client Library Updates 2 of 3

Add 3 new library functions to handle the RPC requests to the node/RPC-sidecar. This could again be one eight point ticket or three 3 point tickets. As with the work above the 3 smaller tickets would lead to nicer PR's

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.