-
Notifications
You must be signed in to change notification settings - Fork 100
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
sdk: PriorityFeeSubscriber init #585
Conversation
|
||
for (const { prioritizationFee } of rpcJSONResponse.result) { | ||
sum += prioritizationFee; | ||
max = Math.max(max, prioritizationFee); |
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.
i'd shy away using the max prioritizationFee
of the response since that can create a sticky effect on drift gas prices if drift SDK users become a large chunk of block space.
I think something like the prioritizationFee
of the latest slot will be sufficient (i..e if last block had a priority fee of 1000, then this class should return 1000).
Also note that the response from getRecentPrioritizationFees
is not sorted, so you will need to sort by slot
to get the above
* sdk: release v2.37.1-beta.7 * program: fix place_and_make/take_spot * amm_spread.rs: add conf_component logic (#577) * amm_spread.rs: add conf_component logic * update CHANGELOG.md * order subscriber event emitter * renaming new to update * checking for length > 0 before emitting * fixing new orders bug * sdk: release v2.37.1-beta.8 * program: add lp shares rebase (#568) * start test * improve lp_delta_quote * improve per_lp_delta_quote * init per_lp_base * add rebase functions (wip) * rm err msg * add controller rebase to proper locations * add rebase cargo test * (wip) k out of wack * fix rebase test and add more asserts * format fix * incorp basic example to typescript tests * fix rebase math in position.rs (wip) * wip continue * working baseAssetAmountWithUnsettledLp * mvp encapsulation of update_lp_market_position * src/user.ts: add perLpBase to empty position * remove logs * simplify base unit logic more * add get_per_lp_base_unit * simplify per_lp_fee and add numbers to test * properly set per_lp_base for lp_share=0 in mint_lp_shares (and add sdk/test) * incorp feedback / format * tests/liquidityProvider.ts: work with sdk change * admin.rs: add constraint on per_lp_base range * add apply_lp_rebase_to_perp_position to simulate_settled_lp_position * use get_per_lp_base_unit consistently (wip sdk test for negative lp base) * cut excess return values in calculate_lp_delta * fix getPerpPositionWithLPSettle with negative perLpBase delta --------- Co-authored-by: Chris Heaney <[email protected]> * sdk: release v2.37.1-beta.9 * bigz/oracle-auction-oracle-validity-test (#584) * sdk: fixes for getHealthComponents * sdk: release v2.37.1-beta.10 * sdk: add option for marginCategory to getFreeCollateral (#573) * sdk: release v2.37.1-beta.11 * wip save work * sdk: updates to priorityfeesubscriber * 25 default batch size * tests: fix liquidateSpot health checks * sdk: add debug for bulk account loader handleAccountCallbacks (#592) * sdk: add debug for bulk account loader handleAccountCallbacks * log callbacks individually * sdk: release v2.37.1-beta.12 * configurable in polling config * sdk: release v2.37.1-beta.13 * tests/driftClient.ts: add sleep * bigz/fix-liquidatePerpAndLp-test (#593) * bigz/fix-liquidatePerpAndLp-test * uncomment out assert * perpLpJit.ts: longer sleep for rc ts test * perpLpJit.ts: longer sleep for rc ts test * perpLpJit.ts: rm redundant check * prepegMarketOrderBaseAssetAmount.ts: add sleep * merge master * v2.38.0 * sdk: release v2.38.1-beta.0 * feedback updates * sdk: catch decoding error in polling drift client account subscriber * sdk: release v2.38.1-beta.1 * Revert "sdk: catch decoding error in polling drift client account subscriber" This reverts commit 36e0f0f. * sdk: use decodeUnchecked in bulk account loader * sdk: release v2.38.1-beta.2 * sdk: use decodeUnchecked in more places * sdk: release v2.38.1-beta.3 * Revert "sdk: use decodeUnchecked in more places" This reverts commit f11a3b0. * sdk: use decodeUnchecked in PollingUserStatsAccountSubscriber * sdk: fetchUserStatsAccount use decodeUnchecked * sdk: update anchor to 0.28.1-beta.2 (#595) * try 0.28.0 * try updating top dir anchor * anchor 0.28.1-beta.2 * fix prettify * CHANGELOG * sdk: release v2.38.1-beta.4 --------- Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Chris Heaney <[email protected]> Co-authored-by: bigzPubkey <[email protected]> Co-authored-by: Nour Alharithi <[email protected]> Co-authored-by: Evan Pipta <[email protected]>
subscribe to latest priority fees for set of addresses