-
Notifications
You must be signed in to change notification settings - Fork 114
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
Updates for Oracles to transition to helium-lib #401
Open
michaeldjeffrey
wants to merge
15
commits into
master
Choose a base branch
from
mj/oracles-updates
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There is a |
You going to fix that up? This PR got lost in an ocean of noise but I'm spending some time in helium-lib again |
The Data Credits Key is not SubDao specific.
The solana_sdk provides a `read_keypair_file` function, but it returns a Result with a Box<dyn Error>. Rather than recreate all those functions for a wrapped Keypair, I thought to start with an easy conversion from one to the other. So you can read the keypair with the solana_sdk, then very quickly turn it into a helium-lib keypair. Bring the discussion!!!
The module is named boosting so there is hopefully less confusion with the existance of `helium_anchor_lang::hexboosting` that is autogenerated.
You can directly read a helium_lib::Keypair from a file that is a solana keypair.
michaeldjeffrey
force-pushed
the
mj/oracles-updates
branch
from
October 22, 2024 21:54
e47dd51
to
ec815c5
Compare
we can not go all the way back to 0.28 because of solana-sdk. So we go back as far as we can without causing problems for upstream things like oracles.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Companion Oracles PR helium/oracles#850
dc::burn_delegated()
The
iot_packet_verifier
andmobile_packet_verifier
in Oracles burn DC on behalf of OUI operators and Data Users respectively.boosting::start_boost()
The
boost_manager
starts the clock for boosted hexes when they have yielded their first rewards in an epoch.Because
helium_lib
also re-exportshelium_anchor_gen::hexboosting
, I named the moduleboosting
to hopefully be different enough to avoid confusion.Multiple hexes can have their boost periods started in a single transaction. Currently, whoever is calling
start_boost()
needs to make sure to restrict the number of boosted hexes it is providing. It would make sense to me to put that inhelium-lib
and potentially return multiple transactions for the caller to submit, but I haven't gotten there yet, and have not been able to think of a nice way to provide control over transaction sizes.ReadWrite
moved tohelium-lib
You can now Read and Write a Keypair use the
std::io
traits. A convenience methodKeypair::read_from_file
has been added.#### Added Keypair conversionIn trying to keep the separation betweensolana_sdk::signer::keypair::Keypair
andhelium_lib::keypair::Keypair
, rather than providing ahelium_lib
version ofsolana_sdk::signature::read_keypair_file
, I added aFrom
impl to go from solana to helium-lib.solana_sdk::signature::read_keypair_file
returns aBox<dyn std::error::Error>
to coverio::Error
and aserde_json::Error
. I wasn't sure of a nice way to add this error tohelium_lib::error::Error
, so I opted for the conversion.