-
Notifications
You must be signed in to change notification settings - Fork 108
PoS Block Producer: _connectFailingTransaction #673
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
PoS Block Producer: _connectFailingTransaction #673
Conversation
|
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
521a7a2 to
9bd8835
Compare
1bf8585 to
9bb0fa7
Compare
tholonious
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ship it!
lib/block_view.go
Outdated
| val, bytesRead := Uvarint( | ||
| extraData[FeeBucketRateMultiplierBasisPointsKey], | ||
| ) | ||
| if val > _basisPoints { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why I originally named this const _basisPoints... The appropriate name is _maxBasisPoints. Do you want to rename it in a followup PR? I can do it otherwise.
lib/block_view.go
Outdated
| maxUint64 := uint256.NewInt().SetUint64(math.MaxUint64) | ||
| if effectiveFeeU256.Cmp(maxUint64) > 0 { | ||
| effectiveFeeU256.SetUint64(math.MaxUint64) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The uint256 package has a nice little IsUInt64() function for this use
| maxUint64 := uint256.NewInt().SetUint64(math.MaxUint64) | |
| if effectiveFeeU256.Cmp(maxUint64) > 0 { | |
| effectiveFeeU256.SetUint64(math.MaxUint64) | |
| } | |
| if !effectiveFeeU256.IsUint64() { | |
| effectiveFeeU256 = uint256.NewInt().SetUint64(math.MaxUint64) | |
| } |
6aa8775 to
9fa4aad
Compare
9fa4aad to
1f62445
Compare
* dummy commit * ln/add-transactor-as-affected-pub-key (#675) * ln/add-transactor-as-affected-pub-key * address DH feedback --------- Co-authored-by: Lazy Nina <> * PoS Block Producer: TxnConnectStatusByIndex (#672) * TransactionConnectStatus and ConnectFailingTransaction * Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions" This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing changes made to 960001c. * Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"" This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce. * Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions" This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing changes made to a9f7827. * TransactionConnectStatus and ConnectFailingTransaction * Initial _connectFailingTransaction * ConnectFailingTransaction and GlobalParamsEntry updates * Fix merge conflicts * gofmt * Fix merge conflicts * Fix blockheight * Fix merge conflicts * gofmt * Revert connect failing transaction * Add TxnStatusConnectedIndex to block and header * Fix naming * Fix tests; remove asserts * Update comment * TransactionConnectStatus and ConnectFailingTransaction * Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions" This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing changes made to 960001c. * Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"" This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce. * Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions" This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing changes made to a9f7827. * TransactionConnectStatus and ConnectFailingTransaction * Initial _connectFailingTransaction * ConnectFailingTransaction and GlobalParamsEntry updates * Fix merge conflicts * gofmt * Fix merge conflicts * Fix merge conflicts * gofmt * Revert connect failing transaction * Add TxnStatusConnectedIndex to block and header * PoS Block Producer: _connectFailingTransaction (#673) * Revert "Revert connect failing transaction" This reverts commit e801101. * Revert * Tests * Lazy review * Simplify failing transaction fee math; add reused nonce validation * Review * PoS Block Producer: Mempool replace with higher fee (#676) * Add replace by higher fee feature to mempool * Add PKID and update map in NonceTracker * Fix nonce tracker on update global params; add more bulletproof tests * Change NonceTracker to use PublicKey * PoS Block Producer: Add Refresh Operation To PosMempool (#700) * Add Refresh; small test improvement * Rename receiver * Actually rename receiver * Remove block producer stuff * Fix Mempool interface * Fix test * PoS Block Producer: Safer ReadUvarint (#701) * Add Refresh; small test improvement * Rename receiver * Actually rename receiver * Remove block producer stuff * Fix Mempool interface * Fix test * Add RevolutionMetadata; Update varint encoding * Remove RevolutionMetadata * PoS Block Producer: MempoolTransaction Type (#703) * Revert "Remove Block Producer" This reverts commit 2f9fe64b34130f65a3a68f23835295c04d0444b7. * Add MempoolTransaction with timestamp * Remove BlockProducer * Fix tests * Simplify test * oops * PoS Block Producer: Data Structure (#704) * Revert "Remove Block Producer" This reverts commit 2f9fe64b34130f65a3a68f23835295c04d0444b7. * Add MempoolTransaction with timestamp * Remove BlockProducer * Fix tests * Simplify test * oops * Revert "Remove BlockProducer" This reverts commit 1c8bc9ded9838b33463b979b126ec519453cde4b. * Block producer code * Initial tests for block producer * More tests for block producer * Better comments and test * Move proposerRandomSeedHash to function signatures * Merge * Diamondhands review (#744) * Diamondhands review gofmt (#745) * Diamondhands review * gofmt * another gofmt * DH Pos Block Producer review (#754) --------- Co-authored-by: Lazy Nina <81658138+lazynina@users.noreply.github.com> Co-authored-by: iamsofonias <sofonias@deso.org>
* Revert "Revert connect failing transaction" This reverts commit e801101. * Revert * Tests * Lazy review * Simplify failing transaction fee math; add reused nonce validation * Review
* Revert "Revert connect failing transaction" This reverts commit e801101. * Revert * Tests * Lazy review * Simplify failing transaction fee math; add reused nonce validation * Review
* Revert "Revert connect failing transaction" This reverts commit e801101. * Revert * Tests * Lazy review * Simplify failing transaction fee math; add reused nonce validation * Review
* Revert "Revert connect failing transaction" This reverts commit e801101. * Revert * Tests * Lazy review * Simplify failing transaction fee math; add reused nonce validation * Review

No description provided.