case class BesuTxPoolNonceManager(conf: EthereumLedgerNodeConfig[AlreadyDeployed], loggerFactory: NamedLoggerFactory) extends NamedLogging with NonceManager with Product with Serializable
Transaction manager for Besu networks. Relies on the Besu API method txpool_besuPendingTransactions
.
The most important method is hydrate
: it fetches the complete transaction pool and the number of accepted
transactions so far. Based on that, it computes the next nonces which should be used.
Whenever an Ethereum transaction fails for any reason, we hydrate
the state of the transaction manager before
returning a result to getNonce
.
- Annotations
- @SuppressWarnings()
- Alphabetic
- By Inheritance
- BesuTxPoolNonceManager
- NonceManager
- Serializable
- Product
- Equals
- NamedLogging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new BesuTxPoolNonceManager(conf: EthereumLedgerNodeConfig[AlreadyDeployed], loggerFactory: NamedLoggerFactory)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- val conf: EthereumLedgerNodeConfig[AlreadyDeployed]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- lazy val ethereumAccount: Credentials
The Ethereum account that nonces are being managed for.
The Ethereum account that nonces are being managed for.
- Attributes
- protected
- Definition Classes
- BesuTxPoolNonceManager → NonceManager
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def getNonce: BigInteger
Return the next nonce that should be used for an Ethereum transaction by
ethereumAccount
.Return the next nonce that should be used for an Ethereum transaction by
ethereumAccount
. Needs to be thread-safe, i.e., needs to return correctly return the next, non-duplicate nonces even when called concurrently. The nonces returned should be such that they are the next nonces missing forethereumAccount
. For example, if the current nonce is 5, then the next two calls should return 5 and 6. If the implementation inspects the transaction pool, it should make also fill out potential 'gaps' in the transaction pool. For example, if the current nonce is 2, but the transaction pool already contains nonces with values 3 and 5, then the next calls should return 2, 4, 6, 7 etc.- Definition Classes
- BesuTxPoolNonceManager → NonceManager
- def hydrateBeforeNext(): Unit
Signal that the cached nonce should be refreshed before the next nonce is returned.
Signal that the cached nonce should be refreshed before the next nonce is returned.
- Definition Classes
- BesuTxPoolNonceManager → NonceManager
- val hydrateBeforeNextInternal: AtomicBoolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def logger: TracedLogger
- Attributes
- protected
- Definition Classes
- NamedLogging
- val loggerFactory: NamedLoggerFactory
- Definition Classes
- BesuTxPoolNonceManager → NamedLogging
- implicit def loggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noTracingLogger: Logger
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])