Skip to content

Conversation

@AeonSw4n
Copy link
Contributor

No description provided.

@AeonSw4n AeonSw4n requested a review from a team as a code owner September 13, 2023 22:09
@AeonSw4n AeonSw4n force-pushed the p/failing-transactions-block-view-connect branch 2 times, most recently from 521a7a2 to 9bd8835 Compare September 15, 2023 00:04
@AeonSw4n AeonSw4n changed the title ConnectFailingTransaction Pos Block Producer: _connectFailingTransaction Sep 15, 2023
@AeonSw4n AeonSw4n changed the title Pos Block Producer: _connectFailingTransaction PoS Block Producer: _connectFailingTransaction Sep 15, 2023
@AeonSw4n AeonSw4n force-pushed the p/failing-transactions-block-view-connect branch from 1bf8585 to 9bb0fa7 Compare September 20, 2023 00:38
Copy link
Contributor

@tholonious tholonious left a comment

Choose a reason for hiding this comment

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

Ship it!

val, bytesRead := Uvarint(
extraData[FeeBucketRateMultiplierBasisPointsKey],
)
if val > _basisPoints {
Copy link
Contributor

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.

Comment on lines 3701 to 3727
maxUint64 := uint256.NewInt().SetUint64(math.MaxUint64)
if effectiveFeeU256.Cmp(maxUint64) > 0 {
effectiveFeeU256.SetUint64(math.MaxUint64)
}
Copy link
Contributor

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

Suggested change
maxUint64 := uint256.NewInt().SetUint64(math.MaxUint64)
if effectiveFeeU256.Cmp(maxUint64) > 0 {
effectiveFeeU256.SetUint64(math.MaxUint64)
}
if !effectiveFeeU256.IsUint64() {
effectiveFeeU256 = uint256.NewInt().SetUint64(math.MaxUint64)
}

@AeonSw4n AeonSw4n force-pushed the p/failing-transactions-block-view-connect branch from 6aa8775 to 9fa4aad Compare September 27, 2023 22:49
Base automatically changed from p/failing-transactions-status-in-block-header to feature/pos-block-producer September 27, 2023 22:49
@AeonSw4n AeonSw4n force-pushed the p/failing-transactions-block-view-connect branch from 9fa4aad to 1f62445 Compare September 27, 2023 23:12
@AeonSw4n AeonSw4n merged commit 3c29e71 into feature/pos-block-producer Sep 27, 2023
@AeonSw4n AeonSw4n deleted the p/failing-transactions-block-view-connect branch September 27, 2023 23:15
AeonSw4n added a commit that referenced this pull request Oct 26, 2023
* 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>
AeonSw4n added a commit that referenced this pull request Nov 2, 2023
* Revert "Revert connect failing transaction"

This reverts commit e801101.

* Revert

* Tests

* Lazy review

* Simplify failing transaction fee math; add reused nonce validation

* Review
AeonSw4n added a commit that referenced this pull request Nov 6, 2023
* Revert "Revert connect failing transaction"

This reverts commit e801101.

* Revert

* Tests

* Lazy review

* Simplify failing transaction fee math; add reused nonce validation

* Review
AeonSw4n added a commit that referenced this pull request Nov 8, 2023
* Revert "Revert connect failing transaction"

This reverts commit e801101.

* Revert

* Tests

* Lazy review

* Simplify failing transaction fee math; add reused nonce validation

* Review
AeonSw4n added a commit that referenced this pull request Nov 22, 2023
* Revert "Revert connect failing transaction"

This reverts commit e801101.

* Revert

* Tests

* Lazy review

* Simplify failing transaction fee math; add reused nonce validation

* Review
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.

4 participants