Releases: inkdevhub/swanky-node
v1.7.0
Changelog
Uplifted Substrate base version to polkadot-v0.9.43.
Client
Block height manipulation
Developers can forward blocks and revert blocks to requested block heights.
Forward blocks via RPC
Forwarding blocks to requested block height by calling engine_forwardBlocksTo
.
$ curl http://127.0.0.1:9944 -H "Content-Type:application/json;charset=utf-8" -d '{
"jsonrpc":"2.0",
"id":1,
"method":"engine_forwardBlocksTo",
"params": [120]
}'
Params
- Height
height
denotes an integral value that signifies the desired block height towards which the user intends to progress. If the value is lower than current height, RPC returns an error.
Revert blocks via RPC
Reverting blocks to requested block height by calling engine_revertBlocksTo
.
Note that reverting finalized blocks only works when node is launched with archive mode --state-pruning archive
(or --pruning archive
) since reverting blocks requires past blocks' states.
When blocks' states are pruned, RPC won't revert finalized blocks.
$ curl http://127.0.0.1:9944 -H "Content-Type:application/json;charset=utf-8" -d '{
"jsonrpc":"2.0",
"id":1,
"method":"engine_revertBlocksTo",
"params": [50]
}'
Params
- Height
height
denotes an integral value that represents the desired block height which the user intends to revert to. If the value is higher than current height, RPC returns an error.
Runtimes
Account Balance manipulation
For local development purpose, developers can manipulate any users' account balance via RPC without requiring their accounts' signatures and transaction cost to pay.
Get Account Balance
Getting users' account balance by balance_getAccount
method.
curl http://127.0.0.1:9944 -H "Content-Type:application/json;charset=utf-8" -d '{
"jsonrpc":"2.0",
"id":1,
"method":"balance_getAccount",
"params": ["5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", null]
}'
Params
- Account ID
account_id
is AccountID whose balance information you would like to check.
Set Free Balance
Free balance is amount of unreserved token owner can freely spend. balance_setFreeBalance
alters the amount of free token a specified account has.
curl http://127.0.0.1:9944 -H "Content-Type:application/json;charset=utf-8" -d '{
"jsonrpc":"2.0",
"id":1,
"method":"balance_setFreeBalance",
"params": ["5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", 120000000000000000000, null]
}'
Params
-
Account ID
account_id
isAccountID
whose balance you would like to modify. -
Free Balance
free_balance
is new Balance value you would like to set to accounts.
Arch | Link |
---|---|
MacOS universal |
Download |
Ubuntu amd64 |
Download |
Ubuntu arm64 |
Download |
v1.6.0
Changelog
Client
- Delayed finalize #61
By default, either manual or instant seal does not result in block finalization unless the engine_finalizeBlock
RPC is executed. However, it is possible to configure the finalization of sealed blocks to occur after a certain amount of time by setting the --finalize-delay-sec
option to a specific value, which specifies the number of seconds to delay before finalizing the blocks.
./target/release/swanky-node --finalize-delay-sec 5
In the above example, a setting of 5
seconds would result in the blocks being finalized five seconds after being sealed. In contrast, setting the value to 0
would lead to instant finalization, with the blocks being finalized immediately upon being sealed.
Arch | Link |
---|---|
MacOS universal |
Download |
Ubuntu amd64 |
Download |
Ubuntu arm64 |
Download |
v1.5.0
v1.4.0
v1.3.0
v1.2.0
v1.1.0
Changelog
Runtimes
- Uplifted base substrate branch to
polkadot-v0.9.37
which is compatible with the ink! 4.0.0 release https://github.com/paritytech/ink/releases/tag/v4.0.0. - Removed RMRK pallets and chain extensions.
Arch | Link |
---|---|
MacOS |
Download |
Ubuntu |
Download |
v1.0.0
swanky-node v1.0.0 supports ink! 4.0. For more info, please visit ink! 4.0.0-beta release page.
Notice that
This version started to support Substrate weight V2.
As of 2022/12/14, There's no UI available for swanky-node v1.0.0 until this issue get resolved polkadot-js/apps#8364.
Contracts UI is compatible with swanky-node v1.0.0
. https://contracts-ui.substrate.io/.
Changelog
Substrate version uplifted to polkadot-v0.9.33
Arch | Link |
---|---|
MacOS |
Download |
Ubuntu |
Download |