Commit Graph

275 Commits

Author SHA1 Message Date
Sebastian Bor 62f96fee96
Merge pull request #55 from blockworks-foundation/anchor-v0-26-0-upgrade
Upgrade anchor to v0.26.0
Note: test_all_deposits timeouts on the CI build but works locally and needs to be investigated separately
2022-12-22 11:30:20 +00:00
Connor O'Hara 3ef766d249 Added the required CHECK docs from Anchor 2022-12-22 09:21:35 +01:00
Sebastian Bor 8f9db44ec3 fix: Restore test_all_deposits() 2022-12-21 16:39:52 +00:00
Sebastian Bor e719ff5c27 wip: Disable test_all_deposits 2022-12-21 14:27:40 +00:00
Sebastian Bor e6ab5a0002 chore: Add test-sbf feature 2022-12-21 14:08:39 +00:00
Sebastian Bor 42b6c04858 chore: Update to test-sbf 2022-12-21 13:35:58 +00:00
Sebastian Bor 802efdd201 chore: Fix audit 2022-12-21 13:17:50 +00:00
Sebastian Bor dd6be5bef8 chore: Make Clippy happy 2022-12-21 13:10:19 +00:00
Sebastian Bor 367c43491f chore: Update anchor and solana build versions 2022-12-21 12:53:37 +00:00
Sebastian Bor fd850016e6 chore: Upgrade Anchor to 0.26.0 2022-12-21 12:41:09 +00:00
Christian Kamm 55b5ea2390 Update Cargo.toml with description/license/homepage 2022-05-05 07:38:22 +02:00
Christian Kamm a0ec63ad54 Add GPLv3 license 2022-05-05 07:38:22 +02:00
Christian Kamm 8410ddb310 Bump version to 0.2.4 2022-05-04 13:55:27 +02:00
Christian Kamm fe26040866 Update CHANGELOG for anchor dep upgrade 2022-05-04 13:50:50 +02:00
Christian Kamm 27f8ccb42c Update solana dependency 2022-05-04 13:50:50 +02:00
Christian Kamm 3e64c8195d update cli/ anchor dependency 2022-05-04 13:50:50 +02:00
Christian Kamm 8eee11a86a Ensure the behavior of the bump ix arguments is unchanged 2022-05-04 13:50:50 +02:00
Christian Kamm 233e5414f4 Use anchor's new require_*!() macros 2022-05-04 13:50:50 +02:00
Christian Kamm eb46a030d1 Upgrade anchor to 0.24.2 2022-05-04 13:50:50 +02:00
Christian Kamm 115349edb3 Bump version to 0.2.3
0.2.2 seems to have been published on npmjs 20 days ago, even if 0.2.1
is marked as the latest version. Skip 0.2.2.
2022-04-29 14:00:45 +02:00
Christian Kamm f5b692ab35 Upgrade anchor dependency, bump to version 0.2.2 2022-04-29 13:26:17 +02:00
Christian Kamm b9e70ee5c0 Upgrade spl-governance to 2.2.1
Instead of using a specific commit between 2.2.0 and 2.2.1.

This is done to allow publishing to crates.io.
2022-04-25 13:45:46 +02:00
Christian Kamm cab2c1111e Add warning about spl-governance dependency upgrade 2022-04-14 11:50:51 +02:00
microwavedcola1 bb29cb7efc zero out voter completely
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-04-08 15:38:44 +02:00
Christian Kamm a3771f1d16 Add hint about how to get "anchor publish" to work to Cargo.toml
Since anchor doesn't upload the full source tree but does not seem to
rewrite the list of workspace members, "anchor publish" fails on the
"cli" workspace member.
2022-04-03 09:15:16 +02:00
Christian Kamm acd76e8031 Bump version to 0.2.1, introduce changelog 2022-04-03 08:43:04 +02:00
Christian Kamm 09ef15f869 Increase lockup period limit to 365 * 200
By request.
2022-04-03 08:19:31 +02:00
microwavedcola1 8bfb10fb9b pretty print, remove redundant examples
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-03-17 13:48:42 +01:00
Christian Kamm 6699b25e49 Deps: Update regex due to "cargo audit" security advisory
This has no effect on the voter stake registry program.
2022-03-10 12:38:02 +01:00
Christian Kamm b0660df3b9 Add function to compute the guaranteed locked vote power bonus
This is useful for other programs that may want to make decisions purely
based on the amount of weight generated from guaranteed-to-be-locked
tokens at a specific time.
2022-03-10 12:38:02 +01:00
Christian Kamm 2ea39ddc99 CI: Run Soteria only on the program 2022-02-28 12:27:06 +01:00
Christian Kamm 56850fe514 Cli: Add info about locked tokens in the future 2022-02-28 12:27:06 +01:00
Christian Kamm c510f25b87 Cli: Add binary to decode voter accounts 2022-02-28 12:27:06 +01:00
Christian Kamm 849aeba40a Update Anchor.toml for mainnet address 2022-02-15 14:08:21 +01:00
Christian Kamm a41616a9bc Bump version to 0.2.0 2022-02-14 10:54:08 +01:00
Christian Kamm 94e74a71e5 Comment updates 2022-02-14 10:51:13 +01:00
Christian Kamm dd51d3cbdd Renames
"unlocked_scaled_factor" was a confusing name because the value is
also used when computing vote weight for locked deposits. Rename to
"baseline_vote_weight_scaled_factor" and generally change "unlocked"
to "baseline" in several places.

Also rename "lockup_scaled_factor" to
"max_extra_lockup_vote_weight_scaled_factor" to highlight that it's just
the maximum contribution and that it's "extra" - on top of baseline.
2022-02-14 10:51:13 +01:00
Christian Kamm 4c5d896912 Tests: Bump max compute to 120k
The Grant instruction could randomly exceed 110k, likely due to deriving
account addresses. That would cause random ci test failure occasionally.
2022-02-14 09:10:39 +01:00
Christian Kamm 37d6bed309 CI: Only run for PRs and pushes to master 2022-02-14 09:10:39 +01:00
Christian Kamm 16d22648f7 Rename padding -> reserved and increase its size 2022-02-14 09:06:29 +01:00
Christian Kamm bb9738b12f Update to 0.1.11 2022-02-11 13:53:06 +01:00
Christian Kamm b7782dcd5c LogVoterInfo: Make range configurable
Previously the instruction was hardcoded to return 16 accounts. It
turned out that this number was too big for the current limits on
compute units.
2022-02-11 13:47:47 +01:00
microwavedcola1 ee7d51c229
Mc/update workflow to match solana version + do soteria scan and lint+tests on all branches to catch issues early on (#37)
* use solana version on ci, same as local, same as in cargo.toml in dev

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* run soteria scan and tests on all branches, so that devs can detect problems early

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* maybe this works to match all branches

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* try stable

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-10 20:35:39 +01:00
microwavedcola1 357648e4da bump version
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-10 19:37:56 +01:00
microwavedcola1 69767b2323
add note why clawback is possible when someone is engaged in an active proposal (#39)
* add comment

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* remove unused

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* fix test

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-10 19:34:48 +01:00
Sebastian Bor 7ff4ad2e23 chore: update version to 0.1.9 2022-02-09 13:59:52 +00:00
Christian Kamm 929c38f512 Withdraw: Never block withdraws of tokens without voting power
Previously being engaged in a proposal would prohibit these withdraws.
2022-02-09 10:31:06 +01:00
microwavedcola1 997767a06e Revert "use solana version on ci, same as local, same as in cargo.toml in dev"
This reverts commit b6e19da7e4.
2022-02-08 12:46:28 +01:00
microwavedcola1 b6e19da7e4 use solana version on ci, same as local, same as in cargo.toml in dev
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-08 12:32:56 +01:00
microwavedcola1 77642d7f0c
update solana dep (#36)
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-05 18:06:50 +01:00