Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
0
votes
How to activate checked maths by default in a program?
No. There's no way to force the normal arithmetic operations into their checked equivalents. The checked equivalents require extra handling of their result and this can't be magically generated to do …
8
votes
Accepted
Can Solana Programs send network requests?
No. It is impossible to do IO tasks like network requests deterministically. There are many ways that the behavior of the request could change from one validator to another
4
votes
Accepted
Does anyone know if it is possible to do getProgramAccounts inside a solana onchain program?
No. This cannot be done. The address of all accounts a transaction intends to interact with must be declared up front, otherwise the runtime can't resolve write conflicts during scheduling. On deman …
1
vote
Build failure on MacBook Pro M1
Try building from a release tag rather than whatever commit you are here.
1
vote
How do I get Onchain, the timestamp in milliseconds at which a specific slot was finalized
You can't. The highest resolution on-chain wall timestamp available today is one second and available in the unix_timestamp field of the Clock sysvar.
Sampling theory states, via Nyquist, that there …
3
votes
Accepted
`AccountInfo::realloc` is limited to 10kb per instruction, transaction or block?
The docs and code are a little confusing around this point. It's 10kB per account, per top-level instruction.
3
votes
Accepted
Is `AccountInfo::realloc` limited to 10kb across all accounts or per account?
realloc() is implemented on AccountInfo. So per-account
0
votes
Is it possible to deploy a program from a key in a ledger?
Using a Ledger pubkey to reserve a program address (program id), while possible, doesn't particularly make sense. This keypair is only used once, during the initial deployment, then never needs to si …
1
vote
Accepted
Pros and cons: Ownership check Vs Pubkey Check
This is conflating an account's address with the use of a PDA, which is not a strict requirement. Any ed25519 keypair can also be used to claim an address at the public key's value. That is, while al …
4
votes
Difference in rent between a PDA or regular Account?
Little known fact: The 'A' in PDA stands for "address", not "account" (and even this is a misnomer). A PDA doesn't have to have an account allocated behind it at all to invoke_signed as a signer.
Ren …
1
vote
Subscribing Solana Transfers
An alternative to "subscribing" is to poll using the getBlocksWithLimit and getBlock JSONRPC methods (or your favorite SDK's wrappers).
getBlocksWithLimit is a light-weight call, that takes a start_sl …
1
vote
Is there any Risk to Reallocating an account size
Yes, it's safe to perform multiple reallocs. The per-tranasction limit is to rate-limit cluster-wide storage growth do a reasonable rate
1
vote
Sending SOL from account to PDA (or any other account) results in Error: Transaction simulat...
While @vicyyn is correct in that using SystemInstruction::Transfer requires that the source account be owned by the System Program (generally, only the program which owns an account may debit its lamp …
0
votes
increase solana compute budget on localnet
What you saw on twitter is not quite correct.
The maximum CU/tx is 1.4M, but only if you request more than the default. Without requesting, the max CU/tx is calculated as max(200k * instruction_count …
3
votes
Accepted
Signature verification failed in anchor while testing
I don't know much about anchor, but you appear to be passing a PublicKey where a Keypair is needed. Public keys cannot produce signatures, the corresponding private key is needed for that