CasperLabs Releases Node 0.5

Medha Parlikar
CasperLabs
Published in
3 min readJul 10, 2019
Bonding transaction in Rust

CasperLabs is pleased to announce the release of Node 0.5.

With this release, it is possible to add nodes to the network and participate in consensus by sending a bonding request. The CasperLabs blockchain supports smart contracts that compile to WASM. Presently, compilation targets for Rust are available.

About This Release

This release completes the necessary features to support a public DevNet. Here we introduce validator bonding, unbonding and the Proof of Stake contract. This is one of the essential features of CBC-Casper — participants in consensus can join and leave the network without going through any proxy voting process. This feature is referred to as ‘permissionless’ in blockchain jargon, and is an essential property of high security blockchains.

Technical Details about the Release

Sending Deployments

Deployments (transactions) must now be signed using the public key associated with the account performing the deployment. Transactions being executed from a given account must employ a sequential nonce, to prevent replay attacks, and to ensure deterministic transaction execution for a given account.

Accounts and Purses

The CasperLabs blockchain uses accounts, and this is where tokens are stored, within purses. Accounts are only created in conjunction with a token transfer request and are secured with an ed25519 compatible key pair. When an account is created, a purse is created in the mint, tokens are transferred to the new purse, and a new account object is written to the global state under the passed PublicKey. The account also includes additional fields for thresholds, associated_keys, and account_activity, which will be important for account recovery, a feature planned for a future release.

As deploys are received from an account, the account public key is used to access the execution pre-state context from global state. The contract is executed, the execution effects are applied to the pre-state to compute the post-state and the post-state is stored in global state under the account’s public key. This post-state will now be the “pre-state” for the next deploy for the account.

Validator Bonding and Unbonding

CBC-Casper Proof of Stake enables validators to join and leave the network by sending a request to the network in the form of a special transaction known as a ‘bonding or unbonding request’. These requests invoke the Proof of Stake contract with a request to modify the set of validators that participate in consensus. A bonding request must include the following information:

  • The bond amount
  • The account holding the bond, which will also be the validator id.
  • Payment code (eventually this will be a call to a payment contract) to pay for the bonding request

Sending Bonding and Unbonding requests

Below is an example of a bonding request. A bonding contract is available in GitHub

casperlabs-client \--host 127.0.0.1 \--port 40401 \deploy \--from b9ae114d6093646ed4be6f7fe1f7e5533a5d52a3351f3f18030ea82b3d915d6b \--nonce $1 \--gas-price 1 \--session /bonding.wasm \ --payment bonding.wasm \--private-key ./account.private.key \--public-key ./account.public.key

Finalizing Transactions

The CBC-Casper protocol is provably safe. This means that a mathematical proof exists for the algorithm demonstrating that transactions once finalized by CBC-Casper, cannot be reversed. The Casper protocol achieves this by using a special algorithm to measure the level of finality achieved for a given block. Once a transaction has been submitted, it is possible to use the GraphQL interface located at port 40403 to obtain finalization information.

Description of release packaging

Release packaging will include:

  • Docker images available via DockerHub
  • Debian package
  • RPM package
  • tar.gz (Mac variant included)

Where do developers go to learn more and get started?

At release, links to installation packages and relevant documentation is available on GitHub.

Where will bugs be filed?

Report a bug on GitHub

Where do developers go for support?

Visit https://forums.casperlabs.io with questions, members of the core development team will respond.

About CasperLabs

CasperLabs is building a transformative blockchain for all applications that require a high degree of security, fast execution, and predictable economics. Our technology is built on the purest implementation of the proof-of-stake CBC-Casper protocol, designed by CasperLabs lead architect and Ethereum researcher Vlad Zamfir. We deliver a fully-decentralized, permissionless, public, and open source blockchain platform that supports developers with robust tools, application insights, and predictable fee structures.

--

--