Skip to content
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

Merged
merged 10 commits into from
Jul 10, 2024
Merged

[MTG-237] ci cd #17

merged 10 commits into from
Jul 10, 2024

Conversation

rwwwx
Copy link
Contributor

@rwwwx rwwwx commented Jul 9, 2024

No description provided.

@rwwwx rwwwx changed the base branch from main to refactor-and-bugfixing July 9, 2024 15:57
@StanChe StanChe changed the title Mgt 237 ci cd [MTG-237] ci cd Jul 10, 2024
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)
Copy link
Collaborator

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)

@@ -0,0 +1,8 @@
[advisories]
ignore = ["RUSTSEC-2024-0344", "RUSTSEC-2022-0093"] # ignore unfixable vulnerabilities
Copy link
Collaborator

@kstepanovdev kstepanovdev Jul 10, 2024

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?

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.

on:
push:
branches:
- master
Copy link
Collaborator

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

Copy link
Collaborator

@StanChe StanChe left a 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.

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)
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@@ -0,0 +1,8 @@
[advisories]
ignore = ["RUSTSEC-2024-0344", "RUSTSEC-2022-0093"] # ignore unfixable vulnerabilities

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.

@rwwwx rwwwx marked this pull request as ready for review July 10, 2024 12:50
@rwwwx rwwwx requested review from kstepanovdev and StanChe July 10, 2024 12:51
Copy link
Collaborator

@kstepanovdev kstepanovdev left a comment

Choose a reason for hiding this comment

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

good job!

@rwwwx rwwwx merged commit 3369062 into refactor-and-bugfixing Jul 10, 2024
3 checks passed
@rwwwx rwwwx deleted the MGT-237-CI-CD branch July 10, 2024 12:56
kstepanovdev pushed a commit that referenced this pull request Jul 11, 2024
fixed CI/CD, added README.md and cargo audit
kstepanovdev pushed a commit that referenced this pull request Jul 12, 2024
fixed CI/CD, added README.md and cargo audit
kstepanovdev added a commit that referenced this pull request Jul 22, 2024
* 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]>
kstepanovdev added a commit that referenced this pull request Jul 22, 2024
* 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]>
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