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

vote cost #33269

Closed
tao-stones opened this issue Sep 15, 2023 · 7 comments
Closed

vote cost #33269

tao-stones opened this issue Sep 15, 2023 · 7 comments
Assignees

Comments

@tao-stones
Copy link
Contributor

Problem

Be good to know how the vote cost in mainnet-beta look like,

  • the percentage of 2 sig vs 1 sig
  • the min/max/median of tx data size
  • the min/max/median of account sizes

Proposed Solution

@tao-stones tao-stones self-assigned this Sep 15, 2023
@tao-stones
Copy link
Contributor Author

tao-stones commented Sep 15, 2023

replaying mainnet-beta ledger, looks like vote transactions load static amount of accounts:

  • first signer account (node account): 0 bytes
  • vote account: 3731 bytes
  • SysvarC1ock111..., 40 bytes
  • SysvarS1otHashes111..., 20488 bytes
  • Vote111..., 19 bytes.
    So that total to 24_278 bytes (less than 32K page size)

Didn't see 2 signature votes. (edited)

It gives me confidence to set a static CU for vote transactions: 1 * signatures + 2 * write locks + 1 vote builtin ix + 24_278 bytes cost = 3428 CU, pretty much same as they are counted today. (edited)

Hopefully I didn't miss anything, wdyt @t-nelson @AshwinSekar @apfitzge

@7layermagik
Copy link

7layermagik commented Sep 20, 2023

Hmm I think that is wrong actually -- most votes just pay 0.000005 sol and have one signer as far as I know. Having two signers for all those votes is a pretty huge cost. Here's an example transaction from us: https://explorer.solana.com/tx/5UCfUbvNmU2KMSZzoptEg64n9BAb6mTNcZ7YrohQg3zP2vG2tDKwzTYA4n7kyCY6yXN8SMv7GaCSCLkt434AW8EX

@tao-stones
Copy link
Contributor Author

thanks for pointing out, I'll rerun with larger data set.

@tao-stones
Copy link
Contributor Author

Ah, my script mis-labeled write-locks to "signatures". updated comment.

@t-nelson
Copy link
Contributor

this is just the cost of votes that fit is_simple_vote(), right?

@tao-stones
Copy link
Contributor Author

this is just the cost of votes that fit is_simple_vote(), right?

correct.

Are there other vote transactions allowed other than "simple-vote"? Does it not drop/ignore vote if it comes with part of normal transaction (eg a normal transaction includes a vote instruction)?

@t-nelson
Copy link
Contributor

t-nelson commented Sep 20, 2023

shouldn't be dropped, no. but won't be prioritized as a vote either, just treated as normal transaction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants