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

Clarification on TxPool's AssembleBlock function #6201

Open
pao-beep opened this issue Dec 18, 2024 · 0 comments
Open

Clarification on TxPool's AssembleBlock function #6201

pao-beep opened this issue Dec 18, 2024 · 0 comments

Comments

@pao-beep
Copy link

The comment below probably is creating some confusion for some on what deadline AssembleBlock uses thinking it's coming from agreement and dynamic lambda code even though it's from the node code. And deadline is no longer set by agreement in this merge #3165

This comment is on line 811 in TransactionPool code with associated code

            // The deadline was generated by the agreement, allocating ProposalAssemblyTime milliseconds for completing proposal

	asmStats.TransactionsLoopStartTime = int64(firstTxnGrpTime.Sub(pool.assemblyDeadline.Add(-pool.proposalAssemblyTime)))

AssembleBlock code talks of a deadline also
But I don't see agreement informing the deadline
TxPool's AssembleBlock sets assembly Deadline:
// AssembleBlock assembles a block for a given round, trying not to
// take longer than deadline to finish

Line 939 pool.assemblyDeadline = deadline

Instead node.go file sets the deadline in the below code
deadline := time.Now().Add(node.config.ProposalAssemblyTime)
ub, err := node.transactionPool.AssembleBlock(round, deadline)

Fix if I interpreted correctly,
Remove comments about deadline(AssemblyDeadline) being set by agreement

@pao-beep pao-beep changed the title Comment clarification on TxPool's AssembleBlock function Clarification on TxPool's AssembleBlock function Dec 18, 2024
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

1 participant