Help us shape the future of Go! Take the 2026 Go Developer Survey

parallel-nonces

command
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: Apache-2.0, MIT Imports: 11 Imported by: 0

README

Parallel Nonces

Overview

Demonstrates how to send multiple transactions in parallel using Tempo's 2D nonce system.

Traditional Ethereum transactions require sequential nonces, forcing you to wait for each transaction to be included before sending the next. Tempo's 2D nonce system solves this by allowing each "nonce key" to have its own independent sequence counter.

How It Works

Each transaction has two nonce-related fields:

  • NonceKey: A 192-bit sequence key that identifies which nonce lane to use
  • Nonce: The current value within that lane

By using different nonce keys, you can send multiple transactions in parallel without waiting for confirmations. Each nonce key maintains its own independent sequence.

NonceKey 0: tx(nonce=0) → tx(nonce=1) → tx(nonce=2)
NonceKey 1: tx(nonce=0) → tx(nonce=1)              ← runs in parallel with key 0
NonceKey 2: tx(nonce=0)                            ← runs in parallel with keys 0 and 1

Running

  1. Copy the environment file and configure your settings:
cp env.example .env
  1. Edit .env with your values:
TEMPO_PRIVATE_KEY=0x...        # Your private key
TEMPO_RECIPIENT_ADDRESS=0x...  # Recipient address
  1. Run the example:
go run main.go

Use Cases

  • High-throughput applications: Send many transactions without waiting for confirmations
  • Batch operations: Process multiple independent operations concurrently
  • Time-sensitive transactions: Submit parallel transactions to reduce latency

Documentation

Overview

Command parallel-nonces demonstrates how to send multiple transactions in parallel using Tempo's 2D nonce system with different nonce keys.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL