Skip to main content

All Questions

Tagged with
3 votes
1 answer
86 views

Handle big vector containing ton of structs

I'm looking for a way to handle a big struct. I want to understand how to create an account storing more than 10_000 structs inside is possible. Is there a simple way to do it? Or should I have to ...
GoT's user avatar
  • 75
0 votes
0 answers
8 views

During the registration in the Delegation Program, I mistakenly chose the business account type

During registration in the Delegation Program, I mistakenly chose to register a business account, but I am an individual, please help me with changing the account type to an individual
Евгений Конюхов's user avatar
0 votes
2 answers
32 views

Pay for PDA by a centralized wallet

I'm trying to build an app that will hold a user's wallet private key to sign for transactions and pay for the account from a centralized wallet that I own. I'm trying to avoid them having to approve ...
Christopher Nolan Buckley's user avatar
0 votes
1 answer
20 views

Mutate account data of a program by another program

I have a sender program, and a receiver program. What I want to do is, sender program has a account, data_account. I want sender program to call modify_data of receiver program, which in turn mutates ...
woodland's user avatar
3 votes
1 answer
147 views

What is the data size of a wallet account?

I want to calculate the minimum balance for Rent-except and have found code like this: const { Connection, clusterApiUrl, LAMPORTS_PER_SOL } = require('@solana/web3.js'); const connection = new ...
breeze wang's user avatar
0 votes
1 answer
47 views

Are Tx process parallel? How are the account data guaranteed not overrided each other by simultaneous Tx?

As stated in title. Does runtime sort all input account an add mutex-locker to those accounts that are mutable?
breeze wang's user avatar
0 votes
1 answer
37 views

The data that anchor' account stored surprise me, for a non-PDA account, it store all history input data. Why?

I play this https://beta.solpg.io/62d67703f6273245aca4f5fe example days ago. Just added more logs inside initialize() instruction. After invoke initialize() multiple times with different 'new_account' ...
breeze wang's user avatar
2 votes
3 answers
190 views

Extending struct fields in a PDA and ensuring compatibility

I need to extend the fields I have within a PDA. Some accounts are already live, so I want those to still be compatible with the new layout. As a simple illustrative example, consider this account ...
mega_creamery's user avatar
1 vote
2 answers
106 views

Are enums with associated values permitted?

Not sure if this is really an anchor or solana related question, since I am able to compile, just not to run tests. I can run code and test against code that has an account that has following enum: #[...
mega_creamery's user avatar
1 vote
1 answer
90 views

Get all accounts from ledger

To obtain all account information from the ledger, I used the following command: solana-ledger-tool --ledger /mnt/ledger/ accounts However, only the following information is printed, and the account ...
Solextra's user avatar
3 votes
1 answer
223 views

How do you repopen a closed account?

If an account has been closed with the following anchor context: #[account( mut, close = user, seeds = [ SEED_SCHEMA.as_bytes(), &user.key().as_ref()...
mega_creamery's user avatar
7 votes
2 answers
511 views

How to correctly read data from a Zero Copy account

I'm having trouble reading data in the client from a program with a zero copy account. I've defined the account as follows: #[account(zero_copy)] #[repr(packed)] pub struct EventQueue { header: ...
rumika howdie's user avatar
0 votes
0 answers
272 views

Solana rent account questoin

I have a question. If I hold solana token on my wallet - do I need to pay a rent for my account on chain ? I've red official documentation and I see that there is a garbage collector in solana chain ...
Andriy Vasyltsiv's user avatar
1 vote
1 answer
733 views

Error: AnchorError: AnchorError caused by account: base_account. Error Code: AccountNotInitialized

I wrote a Solana Program with two functions, one for the initialization of an account and a second to upload data to the account. While testing on localhost it was working fine, but when I uploaded it ...
Rounak Naik's user avatar
3 votes
1 answer
537 views

Can Solana Accounts be accessed by any Solana Program using its address?

If I have a deployed Solana Program which creates some Solana accounts for storing data in it. Can these Solana accounts be accessed by any other Solana program using the account addresses? I am ...
Rounak Naik's user avatar

15 30 50 per page