Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Producer incoming-transaction-queue-size-mb #7380

Merged
merged 8 commits into from
May 22, 2019
Merged

Conversation

heifner
Copy link
Contributor

@heifner heifner commented May 17, 2019

Change Description

  • Add producer_plugin incoming-transaction-queue-size-mb so that incoming transactions can be rejected with tx_resource_exhaustion exception when queue is full.
  • This is useful for a new transaction only connection option that is in work for the net_plugin.

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

plugins/producer_plugin/producer_plugin.cpp Outdated Show resolved Hide resolved
plugins/producer_plugin/producer_plugin.cpp Outdated Show resolved Hide resolved
deadline = block_deadline;
}
const auto& id = trx->id();
if( fc::time_point( trx->packed_trx()->expiration()) < block_time ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we used to do this check first, is there concern that block_time may move backwards? otherwise this seems like it may store an expired transaction in the _pending_incoming_transaction queue

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, I'm incorrect it was always in this order. But perhaps we should swap these now such that we check expiration before storing on the pending list.

Same with other early outs like is_known_unexpired_transaction . I am relatively sure that even when faced with forking conditions any transaction that returns true will end up on the unapplied transactions list and therefore not need to be duplicated in our pending queue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it that way because pending_block_time is not available if !chain.is_building_block(). Changed it to use either pending block time or head block time.

@heifner heifner merged commit 892f86a into develop May 22, 2019
@heifner heifner deleted the producer-resource-limit branch May 22, 2019 13:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants