-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Permit batching transactions #1293
Comments
@mvines the indecies should be signed as well. I think we will need to change the entry point also |
Your SignedTransaction contains only the unsigned part. |
We've called it TransactionData in previous iterations. |
How about |
nevermind. I see how that'd break your Instruction definition. |
I updated the sketch to include:
|
I like it! |
Any feelings about that |
There are other ways to solve for huge transactions. Users could upload
transactions that get put together and then executed atomically.
Large sessions are hard to defend against spammers, so the piecemeal
approach might be better for us anyways.
I just hate to waste those bits on zeros :)
|
A more conservative design: #[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)]
pub struct Transaction {
/// A digital signature of `keys`, `interpreter_id`, `last_id`, `fee` and `bytecode`,
/// signed by `from`.
pub from_signature: Vec<Signature>,
// The owner of this transaction.
pub from: Pubkey,
/// A list of additional signatures. Each signature authorizes `bytecode` to spend
/// tokens from the corresponding Pubkey and to modify the memory it refers to.
/// It is a signature of the `from_signature` field and proves ownership of the
/// corresponding Pubkey.
pub authorizations: Vec<(Pubkey, Signature)>,
/// The addresses of additional memory referenced by `bytecode`. The
/// network hosts this memory, and uses these keys to identify them. If
/// memory has not yet been allocated for it, bytecode may spend its
/// tokens. Otherwise, bytecode may only read that pubkey's memory
/// and credit it tokens.
/// * keys[0] - Typically the process_id, which holds the process state.
pub keys: Vec<Pubkey>,
/// The address of the program that will interpret `bytecode`.
pub interpreter_id: Pubkey,
/// The ID of a recent ledger entry. This tells the network how long it's been
/// since this transaction was created and what recent transactions
/// the provided program is unaware of.
pub last_id: Hash,
/// The number of tokens paid for processing and storage of this transaction.
pub fee: i64,
/// The compiled data that will be interpreted by the interpreter at `interpreter_id`.
pub bytecode: Vec<u8>,
} Differences from existing code:
Differences from previous proposal:
|
Fixed in #1309 |
Wait, not so fast! We can't have a transaction signed by multiple keys yet. |
It couldn't before. Shouldn't that be a separate ticket? |
If you want. The multiple key requirement is right in the initial issue description though: // Indices into the `keys` vector vector indicating the `Pubkey`s that are
// expected to sign this `TransactionData` struct
pub signed_keys: Vec<u8> |
@aeyakovenko, do you plan to upgrade the |
Added #1531 to track just that sigverify work. |
@garious, yes, we need some way to pass a vector of signatures in the tx. |
Closing, as what remains here is #1531 |
…bs#1293) Bumps [rollup-plugin-copy](https://github.com/vladshcherbin/rollup-plugin-copy) from 3.3.0 to 3.4.0. - [Release notes](https://github.com/vladshcherbin/rollup-plugin-copy/releases) - [Commits](vladshcherbin/rollup-plugin-copy@3.3.0...3.4.0) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Run bank.process_transaction() instead of bank.load_program() directly in test_bank_load_program.
Right now a
Transaction
contains a single command to a single program. This means that more complex operations that require multiple commands to complete will run at the clockrate of finality.The proposal to resolve this is to permit multiple instructions to be batched within a single Transactions. Such a Transaction is only confirmed if all instructions within it successfully complete.
A sketch of what the current
Transaction
struct turns into is:The text was updated successfully, but these errors were encountered: