Skip to content

Commit

Permalink
[changelog] preparation for contract v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ochaloup committed Jul 10, 2024
1 parent c55c277 commit 848fc78
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 17 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## contract release v2.0.0 (2024-07-X)

* address: [`vBoNdEvzMrSai7is21XgVYik65mqtaKXuSdMBJ1xkW4`](https://explorer.solana.com/address/vBoNdEvzMrSai7is21XgVYik65mqtaKXuSdMBJ1xkW4)
* tag: [`contract-v2.0.0`](https://github.com/marinade-finance/validator-bonds/releases/tag/contract-v2.0.0), commit: [`TODO`](https://github.com/marinade-finance/validator-bonds/commit/TODO),
* tx: [`TODO`](https://explorer.solana.com/tx/TODO)
* anchor verify command:
```
git checkout TODO &&\
anchor verify --provider.cluster mainnet -p validator_bonds \
--env "GIT_REV=`git rev-parse --short HEAD`" --env 'GIT_REV_NAME=v2.0.0' vBoNdEvzMrSai7is21XgVYik65mqtaKXuSdMBJ1xkW4
```

### Breaking updates

* `SettlementClaim` account is not about to be used anymore. Deduplication of claiming will not be made with creating the PDA account
but using bitmap data structure in account `SettlementClaims` ([PR#73](https://github.com/marinade-finance/validator-bonds/pull/73/))

### Updates

* `fund_bond` instruction permits to fund `StakeAccount` in state `Activating` and not only fully activated stake accounts ([PR#74](https://github.com/marinade-finance/validator-bonds/pull/74))
* `claim_settlement` instruction permits to withdraw amount of SOL when exactly matching the size of the `StakeAccount` ([PR#70](https://github.com/marinade-finance/validator-bonds/pull/70))


## TS CLI&SDK [1.5.3](https://github.com/marinade-finance/validator-bonds/compare/v1.5.2...v1.5.3) (2024-06-30)

### Fixes
Expand Down
32 changes: 19 additions & 13 deletions packages/validator-bonds-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ solana-keygen grind --starts-with bnd:1
solana create-stake-account <stake-account-keypair> <Amount of SOL 1 for every 10,000 staked>

# To couple the created stake account with the vote account
# This causes the stake account to be in the Activating state.
solana delegate-stake <stake-account-pubkey> <vote-account-address>

<Wait for the stake to activate in the next epoch>

# Funding Bond by assigning the stake account with the SOL amount in it
validator-bonds fund-bond <vote-account-address> --stake-account <stake-account-pubkey>

Expand Down Expand Up @@ -242,7 +241,7 @@ when a validator under-performs or experiences a serious issue.
The funded stake account:

- **Must be delegated** to the vote account belonging to the bond account.
- **Must be fully activated**.
- **Must be activating or activated**.

All lamports held in the stake accounts are considered part of the protected stake amount.

Expand Down Expand Up @@ -504,14 +503,17 @@ Options:
-V, --version output the version number
-u, --cluster <cluster> solana cluster URL or a moniker (m/mainnet/mainnet-beta, d/devnet, t/testnet, l/localhost) (default: "mainnet")
-c <cluster> alias for "-u, --cluster"
-k, --keypair <keypair-or-ledger> Wallet keypair (path or ledger url in format usb://ledger/[<pubkey>][?key=<derivedPath>]). Wallet keypair is used to pay for the transaction fees and as default value for signers. (default: loaded from solana
config file or ~/.config/solana/id.json)
-k, --keypair <keypair-or-ledger> Wallet keypair (path or ledger url in format usb://ledger/[<pubkey>][?key=<derivedPath>]). Wallet keypair is used to pay for the transaction fees
and as default value for signers. (default: loaded from solana config file or ~/.config/solana/id.json)
--program-id <pubkey> Program id of validator bonds contract (default: vBoNdEvzMrSai7is21XgVYik65mqtaKXuSdMBJ1xkW4)
-s, --simulate Simulate (default: false)
-p, --print-only Print only mode, no execution, instructions are printed in base64 to output. This can be used for placing the admin commands to SPL Governance UI by hand. (default: false)
--skip-preflight Transaction execution flag "skip-preflight", see https://solanacookbook.com/guides/retrying-transactions.html#the-cost-of-skipping-preflight (default: false)
-p, --print-only Print only mode, no execution, instructions are printed in base64 to output. This can be used for placing the admin commands to SPL Governance UI
by hand. (default: false)
--skip-preflight Transaction execution flag "skip-preflight", see https://solanacookbook.com/guides/retrying-transactions.html#the-cost-of-skipping-preflight
(default: false)
--commitment <commitment> Commitment (default: "confirmed")
--confirmation-finality <confirmed|finalized> Confirmation finality of sent transaction. Default is "confirmed" that means for majority of nodes confirms in cluster. "finalized" stands for full cluster finality that takes ~8 seconds. (default: "confirmed")
--confirmation-finality <confirmed|finalized> Confirmation finality of sent transaction. Default is "confirmed" that means for majority of nodes confirms in cluster. "finalized" stands for
full cluster finality that takes ~8 seconds. (default: "confirmed")
--with-compute-unit-price <compute-unit-price> Set compute unit price for transaction, in increments of 0.000001 lamports per compute unit. (default: 10)
-d, --debug Printing more detailed information of the CLI execution (default: false)
-v, --verbose alias for --debug (default: false)
Expand All @@ -520,22 +522,26 @@ Options:
Commands:
init-config [options] Create a new config account.
configure-config [options] [address] Configure existing config account.
mint-bond [options] <address> Mint a Validator Bond token, providing a means to configure the bond account without requiring a direct signature for the on-chain transaction. The workflow is as follows: first, use this "mint-bond" to mint a
bond token to the validator identity public key. Next, transfer the token to any account desired. Finally, utilize the command "configure-bond --with-token" to configure the bond account.
mint-bond [options] <address> Mint a Validator Bond token, providing a means to configure the bond account without requiring a direct signature for the on-chain transaction.
The workflow is as follows: first, use this "mint-bond" to mint a bond token to the validator identity public key. Next, transfer the token to
any account desired. Finally, utilize the command "configure-bond --with-token" to configure the bond account.
init-bond [options] Create a new bond account.
configure-bond [options] <address> Configure existing bond account.
merge-stake [options] Merging stake accounts belonging to validator bonds program.
fund-bond [options] <address> Funding a bond account with amount of SOL within a stake account.
init-withdraw-request [options] [address] Initializing withdrawal by creating a request ticket. The withdrawal request ticket is used to indicate a desire to withdraw the specified amount of lamports after the lockup period expires.
init-withdraw-request [options] [address] Initializing withdrawal by creating a request ticket. The withdrawal request ticket is used to indicate a desire to withdraw the specified amount
of lamports after the lockup period expires.
cancel-withdraw-request [options] [address] Cancelling the withdraw request account, which is the withdrawal request ticket, by removing the account from the chain.
claim-withdraw-request [options] [address] Claiming an existing withdrawal request for an existing on-chain account, where the lockup period has expired. Withdrawing funds involves transferring ownership of a funded stake account to the specified
"--withdrawer" public key. To withdraw, the authority signature of the bond account is required, specified by the "--authority" parameter (default wallet).
claim-withdraw-request [options] [address] Claiming an existing withdrawal request for an existing on-chain account, where the lockup period has expired. Withdrawing funds involves
transferring ownership of a funded stake account to the specified "--withdrawer" public key. To withdraw, the authority signature of the bond
account is required, specified by the "--authority" parameter (default wallet).
pause [options] [address] Pausing Validator Bond contract for config account
resume [options] [address] Resuming Validator Bond contract for config account
show-config [options] [address] Showing data of config account(s)
show-event [options] <event-data> Showing data of anchor event
show-bond [options] [address] Showing data of bond account(s)
show-settlement [options] [address] Showing data of settlement account(s)
bond-address [options] <address> From provided vote account address derives the bond account address
help [command] display help for command
```
Expand Down
5 changes: 3 additions & 2 deletions programs/validator-bonds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@
the operator is required to merge all the `StakeAccounts` of the validator (delegated to the same `VoteAccount`)
first and then fund such `StakeAccount` into `Settlement`. And the instruction is then capable to split `StakeAccount`
with spill amount when needed.
- The creditor may claim the calculated amount from the `Settlement`. A deduplication
account, `SettlementClaim`, is created on-chain, referring to the fact that the protected event has already been claimed by the creditor.
- The creditor may claim the calculated amount from the `Settlement`.
From V2 there is created a bitmap structure on-chain named `SettlementClaims` that is created on-chain as a side-car to `Settlement` account.
When the protected event has already been claimed by the creditor the bitmap is updated to reflect the claim.
- The `Settlement` may be claimed only for a limited number of epochs, which is configured by the admin authority in `Config`.
After the elapsed time, the `Settlement` can be closed, and nothing more can be claimed.
- When the claim time availability elapses, the `Settlement` account can be closed, and the account rent is withdrawn.
Expand Down
3 changes: 1 addition & 2 deletions settlement-pipelines/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ There are 4 pipelines used for the binary commands.
* [claim-settlements](../.buildkite/claim-settlements.yml): Claims settlements when possible.
It is executed as a cron job once at a set interval. It checks the on-chain state to see if any settlements can be claimed.
The settlement can be claimed within the time range of `Settlement Creation + non-claimable slots` to `Settlement Creation Epoch - Config claimable epoch`.
* [close-settlements](../.buildkite/close-settlements.yml): Closes `Settlement` accounts, `SettlementClaim` accounts,
* [close-settlements](../.buildkite/close-settlements.yml): Closes `Settlement` and `SettlementClaims` accounts,
and resets the state of stake accounts to be associated back to the validator `Bond` when not claimed.
It verifies the on-chain state to see if the settlement has expired and if any `SettlementClaim` can be closed.
* [verify-settlements](../.buildkite/verify-settlements.yml): Loading `Settlement` merkle tree data
from gcloud and do if the on-chain state does not contain some unknown `Settlement` in comparison
to gcloud list.
Expand Down

0 comments on commit 848fc78

Please sign in to comment.