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

Optimized the dependency metadata structure #804

Merged
merged 2 commits into from
Apr 5, 2023
Merged

Conversation

pratikspatil024
Copy link
Member

In this PR, I removed the first 2 elements in the TxDependency structure: the Transaction index and flag informing about delaying the fee transfer.

@pratikspatil024 pratikspatil024 requested review from cffls and a team April 3, 2023 08:56

if len(header.TxDependency) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we check if len(header.TxDependency) == len(tasks)? If lengths mismatch, we shouldn't use any dependency data.

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice idea. Thanks!

miner/worker.go Outdated
Comment on lines 1152 to 1154
if ok1 || ok2 {
// 0 -> delay is not allowed
tempDeps[i] = append(tempDeps[i], 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should still keep this check. When delay is not allowed, we simply set dependency to empty, so validators will directly run serial execution.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that will be nice.

@pratikspatil024 pratikspatil024 merged commit 480ccf2 into block-stm Apr 5, 2023
@pratikspatil024 pratikspatil024 deleted the pos-1385 branch April 5, 2023 05:43
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

Successfully merging this pull request may close these issues.

2 participants