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

bug: celestia RPC CLI still uses fee + gasLimit for some commands #3174

Closed
jcstein opened this issue Feb 9, 2024 · 2 comments
Closed

bug: celestia RPC CLI still uses fee + gasLimit for some commands #3174

jcstein opened this issue Feb 9, 2024 · 2 comments
Assignees
Labels
bug Something isn't working external Issues created by non node team members

Comments

@jcstein
Copy link
Member

jcstein commented Feb 9, 2024

Celestia Node version

v0.13.0

OS

macOS

Install tools

Docs

Others

No response

Steps to reproduce it

export NODE_STORE=$HOME/.celestia-light-mocha-4
celestia state delegate celestiavaloper1ukk0l6ce58zq3snad5vn24vy7pdk9r8hva6nz9 1 --help
Sends a user's liquid tokens to a validator for delegation.

Usage:
  celestia state delegate [valAddress] [amount] [fee] [gasLimit] [flags]

Flags:
  -h, --help   help for delegate

Global Flags:
      --node.store string   The path to root/home directory of your Celestia Node Store
      --token string        Authorization token
      --url string          Request URL (default "http://localhost:26658")

Expected result

celestia state delegate celestiavaloper1ukk0l6ce58zq3snad5vn24vy7pdk9r8hva6nz9 1 --help
Sends a user's liquid tokens to a validator for delegation.

Usage:
  celestia state delegate [valAddress] [amount] [gasPrice] [flags]

Actual result

Above

Relevant log output

No response

Notes

This is not the only one, as an example here is state.Undelegate:

celestia state undelegate --help
Undelegates a user's delegated tokens, unbonding them from the current validator.

Usage:
  celestia state undelegate [valAddress] [amount] [fee] [gasLimit] [flags]

Flags:
  -h, --help   help for undelegate

Global Flags:
      --node.store string   The path to root/home directory of your Celestia Node Store
      --token string        Authorization token
      --url string          Request URL (default "http://localhost:26658")
@jcstein jcstein added the bug Something isn't working label Feb 9, 2024
@github-actions github-actions bot added the external Issues created by non node team members label Feb 9, 2024
@vgonkivs
Copy link
Member

State module requires fee and gas limit params:

type Module interface {
// AccountAddress retrieves the address of the node's account/signer
AccountAddress(ctx context.Context) (state.Address, error)
// Balance retrieves the Celestia coin balance for the node's account/signer
// and verifies it against the corresponding block's AppHash.
Balance(ctx context.Context) (*state.Balance, error)
// BalanceForAddress retrieves the Celestia coin balance for the given address and verifies
// the returned balance against the corresponding block's AppHash.
//
// NOTE: the balance returned is the balance reported by the block right before
// the node's current head (head-1). This is due to the fact that for block N, the block's
// `AppHash` is the result of applying the previous block's transaction list.
BalanceForAddress(ctx context.Context, addr state.Address) (*state.Balance, error)
// Transfer sends the given amount of coins from default wallet of the node to the given account
// address.
Transfer(
ctx context.Context, to state.AccAddress, amount, fee state.Int, gasLimit uint64,
) (*state.TxResponse, error)
// SubmitTx submits the given transaction/message to the
// Celestia network and blocks until the tx is included in
// a block.
SubmitTx(ctx context.Context, tx state.Tx) (*state.TxResponse, error)
// SubmitPayForBlob builds, signs and submits a PayForBlob transaction.
SubmitPayForBlob(
ctx context.Context,
fee state.Int,
gasLim uint64,
blobs []*blob.Blob,
) (*state.TxResponse, error)
// CancelUnbondingDelegation cancels a user's pending undelegation from a validator.
CancelUnbondingDelegation(
ctx context.Context,
valAddr state.ValAddress,
amount,
height,
fee state.Int,
gasLim uint64,
) (*state.TxResponse, error)
// BeginRedelegate sends a user's delegated tokens to a new validator for redelegation.
BeginRedelegate(
ctx context.Context,
srcValAddr,
dstValAddr state.ValAddress,
amount,
fee state.Int,
gasLim uint64,
) (*state.TxResponse, error)
// Undelegate undelegates a user's delegated tokens, unbonding them from the current validator.
Undelegate(
ctx context.Context,
delAddr state.ValAddress,
amount, fee state.Int,
gasLim uint64,
) (*state.TxResponse, error)
// Delegate sends a user's liquid tokens to a validator for delegation.
Delegate(
ctx context.Context,
delAddr state.ValAddress,
amount, fee state.Int,
gasLim uint64,
) (*state.TxResponse, error)
// QueryDelegation retrieves the delegation information between a delegator and a validator.
QueryDelegation(ctx context.Context, valAddr state.ValAddress) (*types.QueryDelegationResponse, error)
// QueryUnbonding retrieves the unbonding status between a delegator and a validator.
QueryUnbonding(ctx context.Context, valAddr state.ValAddress) (*types.QueryUnbondingDelegationResponse, error)
// QueryRedelegations retrieves the status of the redelegations between a delegator and a validator.
QueryRedelegations(
ctx context.Context,
srcValAddr,
dstValAddr state.ValAddress,
) (*types.QueryRedelegationsResponse, error)
}

@jcstein
Copy link
Member Author

jcstein commented Feb 19, 2024

understood. it threw me off at first, but i understand from this and release notes, why this isn't an issue. thanks @vgonkivs 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external Issues created by non node team members
Projects
None yet
Development

No branches or pull requests

2 participants