-
Notifications
You must be signed in to change notification settings - Fork 0
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
[MTG-237] ci cd #17
[MTG-237] ci cd #17
Conversation
.cargo/audit.toml
Outdated
deny = [] # exit on error if unmaintained dependencies are found | ||
format = "terminal" # "terminal" (human-readable report) or "json" | ||
quiet = true # Only print information on error | ||
show_tree = false # Show inverse dependency trees along with advisories (default: true) |
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.
Add a newline everywhere (you might want to do this as a default setting on a file save, just like cargo fmt
)
.cargo/audit.toml
Outdated
@@ -0,0 +1,8 @@ | |||
[advisories] | |||
ignore = ["RUSTSEC-2024-0344", "RUSTSEC-2022-0093"] # ignore unfixable vulnerabilities |
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.
It's not an error, but why those two specifically?
Nvm, I have seen a comment. Why are they unfixable though?
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'm also curious.
Probably that's because of solana-ed25519-dalek
dependency in solana itself. The fix in the library had been merged 3 weeks ago, so I assume the issue should gone soon in the next versions.
.github/workflows/ci-cargo-audit.yml
Outdated
on: | ||
push: | ||
branches: | ||
- master |
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.
Our main branch is main
I suppose
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.
Great job. Those unfixables are for solana to upgrade their libs, so we'd better change the comment and watch out when those may be fixed.
.cargo/audit.toml
Outdated
deny = [] # exit on error if unmaintained dependencies are found | ||
format = "terminal" # "terminal" (human-readable report) or "json" | ||
quiet = true # Only print information on error | ||
show_tree = false # Show inverse dependency trees along with advisories (default: true) |
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.
Why not showing the tree? it might be helpful to understand what should we update?
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.
As for me it was very noisy, so I thought it would be nice to remove this tree. But if you think different I will change it.
.cargo/audit.toml
Outdated
@@ -0,0 +1,8 @@ | |||
[advisories] | |||
ignore = ["RUSTSEC-2024-0344", "RUSTSEC-2022-0093"] # ignore unfixable vulnerabilities |
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'm also curious.
Probably that's because of solana-ed25519-dalek
dependency in solana itself. The fix in the library had been merged 3 weeks ago, so I assume the issue should gone soon in the next versions.
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.
good job!
fixed CI/CD, added README.md and cargo audit
fixed CI/CD, added README.md and cargo audit
* initial design * fix tests for delegated initial design * Extend extend_stake instruction with delegate parameter Extend deposit_mining instruction with delegate parameter * Refactor and make arithmetic operations more readable * Add tests for delegated staking * minor fix * [MTG-237] ci cd (#17) fixed CI/CD, added README.md and cargo audit * Change ordering for PartialOrd and Ord for LockupPeriod * refactor * refactor asserts * remove redundant substraction from delegated stake check * Forbid mining account from closing if it has stake_from_others * remove useless comment * add delegate_mining field to the withdraw_mining && remove verification for weighted stake since it's done on the staking contract * initial design * fix tests for delegated initial design * Extend extend_stake instruction with delegate parameter Extend deposit_mining instruction with delegate parameter * Refactor and make arithmetic operations more readable * Add tests for delegated staking * Change ordering for PartialOrd and Ord for LockupPeriod * refactor * refactor asserts * remove redundant substraction from delegated stake check * Forbid mining account from closing if it has stake_from_others * remove useless comment * add delegate_mining field to the withdraw_mining && remove verification for weighted stake since it's done on the staking contract * remove useless imports * add more packing on closing account * update tests * remove redundant packing * [mtg-308] (#24) * add change delegate function * change_delegate: add an early return for the case when new_delegate_mining and old_delegate_mining are the same * satisfy clippy * [mtg-297] add stake_from_others for rewards calculations (#26) * add change delegate function * change_delegate: add an early return for the case when new_delegate_mining and old_delegate_mining are the same * satisfy clippy * add stake_from_others for rewards calculations * satisfy clippy * update tests && rebase * Add refreshing of rewards for delegate mining each time it's stake_from_others changes * Update programs/rewards/src/instruction.rs Co-authored-by: Stanislav Cherviakov <[email protected]> * minor fix after merge commit --------- Co-authored-by: Stanislav Cherviakov <[email protected]> --------- Co-authored-by: Matiukhin Vlad <[email protected]> Co-authored-by: Stanislav Cherviakov <[email protected]>
* rename RestakeDeposit to ExtendStake * add days lockup days to Flex * imporove uninitialize assertion * rename RewardPool:fill to RewardPool:distribute * from now fill cannot be invoked if rewards equals to zero * refactor DistributeRewards::process * refactor withdraw_mining * add fn for mining account closing * deposit_authority don't have to be mutable in close_mining ix * use more clear variable for RewardCalculator::update_index * regenerate IDL and clients * Initialize rewards-pool deposit authority signature (#15) * Initialize rewards-pool deposit authority signature * fixed comments and fmt * Throw an error instead of returning Ok() when 'rewards == 0' * removed elvis operator * [MTG-237] ci cd (#17) fixed CI/CD, added README.md and cargo audit * Fix comment in instruction.rs * Forbid closing mininig if there are pending rewards * Add comment regarding closing accounts * Unify Contexts && verification checks (#21) Unify Contexts and verification checks * mtg-425: Error handling improvements (#22) improved error handling * Threw an error if `weighted_stake_diffs.entry()` is empty (#25) Threw an error if `weighted_stake_diffs.entry()` is empty * [Mtg-296] delegated staking extend staking with delegate parameter (#18) * initial design * fix tests for delegated initial design * Extend extend_stake instruction with delegate parameter Extend deposit_mining instruction with delegate parameter * Refactor and make arithmetic operations more readable * Add tests for delegated staking * minor fix * [MTG-237] ci cd (#17) fixed CI/CD, added README.md and cargo audit * Change ordering for PartialOrd and Ord for LockupPeriod * refactor * refactor asserts * remove redundant substraction from delegated stake check * Forbid mining account from closing if it has stake_from_others * remove useless comment * add delegate_mining field to the withdraw_mining && remove verification for weighted stake since it's done on the staking contract * initial design * fix tests for delegated initial design * Extend extend_stake instruction with delegate parameter Extend deposit_mining instruction with delegate parameter * Refactor and make arithmetic operations more readable * Add tests for delegated staking * Change ordering for PartialOrd and Ord for LockupPeriod * refactor * refactor asserts * remove redundant substraction from delegated stake check * Forbid mining account from closing if it has stake_from_others * remove useless comment * add delegate_mining field to the withdraw_mining && remove verification for weighted stake since it's done on the staking contract * remove useless imports * add more packing on closing account * update tests * remove redundant packing * [mtg-308] (#24) * add change delegate function * change_delegate: add an early return for the case when new_delegate_mining and old_delegate_mining are the same * satisfy clippy * [mtg-297] add stake_from_others for rewards calculations (#26) * add change delegate function * change_delegate: add an early return for the case when new_delegate_mining and old_delegate_mining are the same * satisfy clippy * add stake_from_others for rewards calculations * satisfy clippy * update tests && rebase * Add refreshing of rewards for delegate mining each time it's stake_from_others changes * Update programs/rewards/src/instruction.rs Co-authored-by: Stanislav Cherviakov <[email protected]> * minor fix after merge commit --------- Co-authored-by: Stanislav Cherviakov <[email protected]> --------- Co-authored-by: Matiukhin Vlad <[email protected]> Co-authored-by: Stanislav Cherviakov <[email protected]> --------- Co-authored-by: Kyrylo Stepanov <[email protected]> Co-authored-by: Matiukhin Vlad <[email protected]> Co-authored-by: rwwwx <[email protected]>
No description provided.