solana documentaiton-developing-FAQ

When writing or interacting with Solana programs, there are common questions or challenges that often come up. Below are resources to help answer these questions.
ソラナのプログラムを書いたり、交流したりする際にはよくある質問や課題が出てくると思います。以下に、これらの質問に答えるためのリソースを照会します。

If not addressed here, the Solana #developers Discord channel is a great resource.
ここで取り上げていない場合は、ソラナのディスコード"#developers"チャンネルをご利用ください。

CallDepth error(コールデプスエラー)

This error means that that cross-program invocation exceeded the allowed invocation call depth.
このエラーはプログラム間呼び出しが許可された"call depth"を超えたことを意味します。

See cross-program invocation Call Depth
"cross-program invocation Call Depth"を参照してください。

CallDepthExceeded error(コールデプスエクシードエラー)

This error means the BPF stack depth was exceeded.
このエラーは"BPF stack depth"の範囲を超えたことを意味します。

See call depth
"call depth"を参照してください。

Computational constraints(計算上の制約)

See computational constraints
" computational constraints"を参照してください。

Float Rust types(フロートRustタイプ)

See float support
"float support"を参照してください。

Heap size(ヒープサイズ)

See heap
"heap"を参照してください。

InvalidAccountData(無効アカウントデータ)

This program error can happen for a lot of reasons. Usually, it's caused by passing an account to the program that the program is not expecting, either in the wrong position in the instruction or an account not compatible with the instruction being executed.
このプログラムエラーは様々な理由で発生します。通常は、プログラムが予期していないアカウントをプログラムに渡した場合に発生します。

An implementation of a program might also cause this error when performing a cross-program instruction and forgetting to provide the account for the program that you are calling.
プログラムの実装でも、プログラム間命令を実行していて、呼び出し元のプログラムのアカウントを提供するのを忘れていた場合に、このエラーが発生することがあります。

InvalidInstructionData(無効命令データ)

This program error can occur while trying to deserialize the instruction, check that the structure passed in matches exactly the instruction. There may be some padding between fields. If the program implements the Rust Pack trait then try packing and unpacking the instruction type T to determine the exact encoding the program expects:
このプログラムエラーは、命令をデシリアライズしようとしている間に発生することがあり、渡された構造体が命令と正確に一致していることを確認してください。フィールドあいだにパディングがあることがあります。プログラムが"Rust pack trait"を実装している場合は、プログラムが予期する正確なエンコードを決定するために命令"type T"のパッキングとアンパッキングを試みてください。

https://github.com/solana-labs/solana/blob/v1.4/sdk/program/src/program_pack.rs

MissingRequiredSignature(ミッシングリクワイアードシグネチャ)

Some instructions require the account to be a signer; this error is returned if an account is expected to be signed but is not.
一部の命令では、アカウントが署名者であることが要求されます。

An implementation of a program might also cause this error when performing a cross-program invocation that requires a signed program address, but the passed signer seeds passed to invoke_signed don't match the signer seeds used to create the program address create_program_address.
また、プログラムの実装が、署名付きのプログラムアドレスを必要とするプログラム間呼び出しを実行する際にもこのエラーが発生することがあります。これは"invoke_signed"渡された"signer seeds"がプログラムアドレス" create_program_address"の作成に使用された"signer seeds"と一致しないことが原因です。

rand Rust dependency causes compilation failure("rand Rust"の依存関係がコンパイルエラーを引き起こします)

See Rust Project Dependencies
"Rust Project Dependencies"を参照してください。

Rust restrictions(Rustの制限)

See Rust restrictions
"Rust restrictions"を参照してください。

Stack size(スタックサイズ)

See stack
"stack"を参照してください。

この記事が気に入ったらサポートをしてみませんか?