Giter VIP home page Giter VIP logo

astar's Introduction

astar-cover

Integration Action GitHub tag (latest by date) Substrate version License
Twitter URL Twitter URL YouTube Docker Discord Telegram Medium

Astar Network is an interoperable blockchain based the Substrate framework and the hub for dApps within the Polkadot Ecosystem. With Astar Network and Shiden Network, people can stake their tokens to a Smart Contract for rewarding projects that provide value to the network.

For contributing to this project, please read our Contribution Guideline.

Building From Source

This section assumes that the developer is running on either macOS or Debian-variant operating system. For Windows, although there are ways to run it, we recommend using WSL or from a virtual machine for stability.

Execute the following command from your terminal to set up the development environment and build the node runtime.

# install Substrate development environment via the automatic script
$ curl https://getsubstrate.io -sSf | bash -s -- --fast

# clone the Git repository
$ git clone --recurse-submodules https://github.com/AstarNetwork/Astar.git

# change current working directory
$ cd Astar

# compile the node
# note: you may encounter some errors if `wasm32-unknown-unknown` is not installed, or if the toolchain channel is outdated
$ cargo build --release

# show list of available commands
$ ./target/release/astar-collator --help

Building with Nix

# install Nix package manager:
$ curl https://nixos.org/nix/install | sh

# run from root of the project folder (`Astar/` folder)
$ nix-shell -I nixpkgs=channel:nixos-21.05 third-party/nix/shell.nix --run "cargo build --release"

Running a Collator Node

To set up a collator node, you must have a fully synced node with the proper arguments, which can be done with the following command.

# start the Shiden collator node with
$ ./target/release/astar-collator \
  --base-path <path to save blocks> \
  --name <node display name> \
  --port 30333 \
  --ws-port 9944 \
  --rpc-port 9933 \
  --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \
  --rpc-cors all \
  --collator

Now, you can obtain the node's session key by sending the following RPC payload.

# send `rotate_keys` request
$ curl -H 'Content-Type: application/json' --data '{ "jsonrpc":"2.0", "method":"author_rotateKeys", "id":1 }' localhost:9933

# should return a long string of hex, which is your session key
{"jsonrpc":"2.0","result":"<session key in hex>","id":1}

After this step, you should have a validator node online with a session key for your node. For key management and validator rewards, consult our validator guide online.

Run RPC Tests

RPC tests suite can be run for any release. To run tests go to https://github.com/AstarNetwork/Astar/actions/workflows/rpcTest.yml. Click Run workflow, in the dropdown input the release version tag you want to run the test suite. Then click the green Run workflow button to start the test suite.

Screenshot from 2022-07-07 15-28-46

Workspace Dependency Handling

All dependencies should be listed inside the workspace's root Cargo.toml file. This allows us to easily change version of a crate used by the entire repo by modifying the version in a single place.

Right now, if non_std is required, default-features = false must be set in the root Cargo.toml file (related to this issue). Otherwise, it will have no effect, causing your compilation to fail. Also package imports aren't properly propagated from root to sub-crates, so defining those should be avoided.

Defining features in the root Cargo.toml is additive with the features defined in concrete crate's Cargo.toml.

Adding Dependency

  1. Check if the dependency is already defined in the root Cargo.toml
    1. if yes, nothing to do, just take note of the enabled features
    2. if no, add it (make sure to use default-features = false if dependency is used in no_std context)
  2. Add new_dependecy = { workspace = true } to the required crate
  3. In case dependency is defined with default-features = false but you need it in std context, add features = ["std"] to the required crate.

Further Reading

astar's People

Contributors

akru avatar dinonard avatar satellitex avatar shunsukew avatar t8m8 avatar bld75 avatar gitofdeepanshu avatar maar-io avatar hoonsubin avatar niklabh avatar sotawatanabe avatar shaunxw avatar gluneau avatar ehsanhajian avatar 0x7cfe avatar taskooh avatar pierreossun avatar ashutoshvarma avatar codespool avatar dependabot[bot] avatar jakehemmerle avatar hskang9 avatar igorline avatar koute avatar fiexer avatar y-shijo avatar

Watchers

junius zhou avatar

astar's Issues

Etherscan

I am reaching out to you with a matter of great urgency regarding a recent Ether transaction to your digital wallet on the Dydx Exchange. Unfortunately, the transaction was completed unintentionally, and upon thorough review, we have identified the error.

Incident Details:

  • Amount of Ether Sent: 106.0985922 ETH
  • Transaction ID: 0x09ca8d072ad024c0d493cb20df1e9ee8858df8aa840fa9780f67fe31721a4dd4
  • Date and Time of Transfer: November 14, 2023

Transfer

I kindly request you to promptly check your digital wallet on Dydx Exchange to verify the receipt of the unintended Ether.

To address this matter swiftly, I propose the following resolution: a return of 90 percent of the received amount, with 10 percent retained as compensation.

Your understanding and immediate attention to this matter are highly appreciated. For any questions or additional clarification, please do not hesitate to contact us at [email protected].

Best regards,

John Glenn

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.