Skip to main content
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
Results tagged with
Search options answers only not deleted user 36
1 vote

Can anyone create an account at a specific PDA address?

Who can create a PDA is up to the program under which PDA address space the account is to be created. …
trent.sol's user avatar
  • 4,585
7 votes

findProgramAddress() is not returning the original address created even though I'm using the...

Correct usage is to find the bump seed for the PDA first with findProgramAddress which is more expensive due to the need of iteratively grinding a hash that does not map to a byte-equivalent ed25519 public …
trent.sol's user avatar
  • 4,585
10 votes
Accepted

In a program, what is the difference between invoke and invoke_signed and when to use them?

The tl;dr version is that both are used to allow one program to invoke instructions of another, but invoke() is used when all signatures required to authorized the instruction are available prior to …
trent.sol's user avatar
  • 4,585
19 votes

What is a Program Derived Address (PDA) exactly?

Instead, ProgramB calls ProgramA's instruction via CPI with invoke_signed(), one parameter of which takes "seed" byte strings, which are hashed with ProgramB's Program ID to create a PDA which the runtime …
trent.sol's user avatar
  • 4,585
3 votes

How to check if a PDA account has/hasn't been initialized?

What "(de)initialized" looks like is up to your program. Typically it's a some combination of the assigned owner program, lamports balance, allocated data size and/or value(s) stored in the data. For …
trent.sol's user avatar
  • 4,585
5 votes

Why do PDAs need to be bumped so that they are not on the Ed25519 elliptic curve?

Instead, the runtime uses the PDA scheme to promote program-controlled authorities to signers artificially, assuming the appropriate seeds are provided. … PDAs are forced off-curve to ensure that it is impossible to generate a real ed25519 keypair that would allow attacker to bypass the program's logic by creating a real digital signature for the PDA pubkey …
trent.sol's user avatar
  • 4,585
2 votes

How to use PDAs instead of Hash maps

, you'll want to craft your PDA seed scheme such that you get unique entries under you program's address space. …
trent.sol's user avatar
  • 4,585