nearcore | Reference client for NEAR Protocol | Blockchain library

 by   near Rust Version: 1.34.0 License: GPL-3.0

kandi X-RAY | nearcore Summary

kandi X-RAY | nearcore Summary

nearcore is a Rust library typically used in Blockchain, Nodejs applications. nearcore has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has medium support. You can download it from GitHub.

NEAR's purpose is to enable community-driven innovation to benefit people around the world. To achieve this purpose, NEAR provides a developer platform where developers and entrepreneurs can create apps that put users back in control of their data and assets, which is the foundation of "Open Web" movement. One of the components of NEAR is the NEAR Protocol, an infrastructure for server-less applications and smart contracts powered by a blockchain. NEAR Protocol is built to deliver usability and scalability of modern PaaS like Firebase at fraction of the prices that blockchains like Ethereum charge.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              nearcore has a medium active ecosystem.
              It has 2064 star(s) with 471 fork(s). There are 78 watchers for this library.
              There were 3 major release(s) in the last 12 months.
              There are 646 open issues and 2258 have been closed. On average issues are closed in 175 days. There are 59 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of nearcore is 1.34.0

            kandi-Quality Quality

              nearcore has no bugs reported.

            kandi-Security Security

              nearcore has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              nearcore is licensed under the GPL-3.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              nearcore releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of nearcore
            Get all kandi verified functions for this library.

            nearcore Key Features

            No Key Features are available at this moment for nearcore.

            nearcore Examples and Code Snippets

            No Code Snippets are available at this moment for nearcore.

            Community Discussions

            QUESTION

            Why do Env variables like signer_account_id cause error: ProhibitedInView?
            Asked 2021-Apr-29 at 11:21

            I'm getting a ProhibitedInView error for a simple view function that does the following

            ...

            ANSWER

            Answered 2021-Apr-29 at 11:21

            On the context of a view functions, there is no such thing as:

            • signer_account_id
            • signer_account_pk
            • predecessor_account_id

            It is not required to sign any message to run a view function, and moreover it is not allowed. It is more like inspecting a contract anonymously, nothing should be paid for that, and the result is independent from the caller. Because of this there is no signer_account_id and signer_account_pk.

            On the other hand, it is not possible to make a cross-contract call, if you are initiating this call in view mode. Because of this there is no predecessor_account_id available, since signer_account_id is not available, and it is impossible that this was called from another contract.

            Source https://stackoverflow.com/questions/67313056

            QUESTION

            Is it safe for the default NEAR TLA to have a FullAccess key?
            Asked 2021-Apr-26 at 11:29

            I noticed that the near top level account on NEAR MainNet has got this access key associated with it:

            ...

            ANSWER

            Answered 2021-Apr-26 at 11:29

            I'm pretty sure you cannot affect a subaccount from the parent like this. If someone deletes the near account, your account would not be affected. and unless the near account itself is holding a FullAccess key to subaccounts, it doesn't control them

            This would also be easy to test. On TestNet try creating a subaccount and deleting it from the parent. If you don't have a FullAccess key to an account then your DeleteAccount action will be rejected by the network.

            Source https://stackoverflow.com/questions/67264964

            QUESTION

            How can I add my telemetry server to nearcore config.json?
            Asked 2020-Jun-10 at 16:48

            I want to read telemetry data from nearcore and I know the node is compatible with Prometheus. The file config.json contains the voice telemetry, which points to NEAR block explorer:

            ...

            ANSWER

            Answered 2020-Jun-08 at 22:24

            You'll need to host a near explorer: https://github.com/near/near-explorer and use its url as telemetry server. Telemetry request is outbound traffic from neard (request is from neard to the explorer), so you don't need to open any port for neard node.

            Source https://stackoverflow.com/questions/62272067

            QUESTION

            Can't compile nearcore project after last RocksDB version bump
            Asked 2020-Mar-14 at 15:25

            Here are the important parts of the error

            ...

            ANSWER

            Answered 2019-Dec-04 at 05:49

            You'll need to install llvm and clang

            Unfortunately there isn't a way to automatically check for and include this that I know of.

            The Near team should update the relevant Dockerfile(s) and add something to docs.nearprotocol.com

            to fix this error run:

            apt install llvm clang
            ... or ...
            brew install llvm clang

            Source https://stackoverflow.com/questions/59169661

            QUESTION

            Is there any way to inspect the contents of the RocksDB instance used by NEAR Protocol?
            Asked 2020-Mar-14 at 15:24

            Disclosure: I work with NEAR and am currently on-boarding.

            When I start up a local node on a clean machine I see that a .near folder is created in my home directory with a few configuration files (exact files seem to depend on which start_ script I run). Another folder appears inside of the .near folder called data.

            Running strings ~/.near/data/*.sst in the folder spits out a few lines starting with the string "rocksdb" which led me to this reference to RocksDB

            Is there any way to inspect the contents of a node's RocksDB instance?

            I found Keylord but it crashes when I try to configure a new connection to the database (by pointing the connection to ~/.near/data). I didn't pursue that thread.

            PSA1: sometimes it's useful to backup the ~/.near folder between node restarts if you want to reset the environment or avoid reusing old data while troubleshooting

            ...

            ANSWER

            Answered 2019-Nov-14 at 18:25

            The content of RocksDB is serialized using our own binary serialization format (http://borsh.io/), so you won't be able to examine the content with general-purpose third-party tools

            Source https://stackoverflow.com/questions/58863331

            QUESTION

            What mechanism Near Protocol has in place to prevent gas price feedback loop causing it to soar?
            Asked 2019-Dec-04 at 22:00

            Influenced by the discussion here, I wonder what mechanisms Near has in place from stopping the gas price from soaring if transactions volume goes down? If gas price soars too high up it will de-incentivize users from submitting more transactions creating a feedback loop leading to eventually having no transactions in the system.

            ...

            ANSWER

            Answered 2019-Dec-04 at 22:00

            If I understand the economics correctly, the gas price goes down if the block is not full. Meaning the gas used is lower than the gas limit. So if there are no transactions, then the gas price should actually go down instead of going up.

            Source https://stackoverflow.com/questions/59185108

            QUESTION

            do all NEAR blockchain transactions require a receiver account?
            Asked 2019-Nov-19 at 19:41

            reading through some documentation here and saw that part of the definition of a transaction is that all actions are performed "on top of the receiver's account" and also that the receiver account is "the account towards which the transaction will be routed."

            also in the nearlib SDK, the transactions interface includes a method called signTransaction that requires receiverId as a parameter

            ...

            ANSWER

            Answered 2019-Nov-19 at 17:17

            Conceptually every transaction always has a sender and a receiver, even though sometimes they might be the same. Because we always convert a transaction to a receipt that is sent to the receiver, it doesn't matter conceptually whether they are the same, even though in implementation there might be a difference.

            Source https://stackoverflow.com/questions/58938914

            QUESTION

            how does NEAR Protocol recommend local development?
            Asked 2019-Nov-14 at 16:52

            disclosure: I work with NEAR and am currently onboarding

            based on the docs (docs.nearprotocol.com) and diving into the nearcore/scripts folder, looks like there are currently 5 ways to start a local node for development and testing (ie. developing DApps, integrating with or contributing to the platform) as well as validating (as part of NEAR Stakewars)

            they all have the option of starting a Docker container or compiling and running the code natively

            (see repo on GitHub @nearprotocol/nearcore/scripts/start_*)

            the two that seem most useful to a DApp developer are

            • start_localnet and
            • start_testnet

            the first launches a node that is totally isolated to local development while the second connects to the NEAR TestNet (via a common list of bootnodes and a telemetry URL)

            which of the above does NEAR recommend for local development?

            for completeness, here all 5 startup scripts:

            • start_localnet
              totally isolated, not related to NEAR TestNet at all (no bootnodes nor telemetry)
            • start_testnet
              connected to NEAR TestNet via bootnodes and telemetry. apparently can also reuse existing genesis.json file if found
            • start_stakewars
              if you're participating in NEAR Stakewars, this is your startup script
            • start_unittest
              used by nearcore, near-bindgen and near-evm
            • start_staging_testnet
              used by near-bindgen examples "cross-contract-high-level"

            PSA1: near-bindgen has some well documented examples -- if you don't already, just decide now that you want to learn Rust

            PSA2: near-evm seems like a proof of concept that lets you run Ethereum Smart Contracts on the NEAR Platform

            ...

            ANSWER

            Answered 2019-Nov-14 at 16:38

            Normally start_testnet should be enough as it lets developers to deploy and test their contract on testnet, which I assume is what most developers want. However, there are certain cases where start_localnet is preferable. For example, if you want to use a different genesis for whatever reason (One reaons I can see is that if you want to see how much things cost with different config parameters), or if testnet is unstable, or if you want to run customized nearcore code that maybe incompatible with testnet code.

            Source https://stackoverflow.com/questions/58861338

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install nearcore

            You can download it from GitHub.
            Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.

            Support

            The workflow and details of setup to contribute are described in CONTRIBUTING.md, and security policy is described in SECURITY.md. To propose new protocol changes or standards use Specification & Standards repository.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/near/nearcore.git

          • CLI

            gh repo clone near/nearcore

          • sshUrl

            git@github.com:near/nearcore.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Blockchain Libraries

            bitcoin

            by bitcoin

            go-ethereum

            by ethereum

            lerna

            by lerna

            openzeppelin-contracts

            by OpenZeppelin

            bitcoinbook

            by bitcoinbook

            Try Top Libraries by near

            near-sdk-rs

            by nearRust

            near-api-js

            by nearJavaScript

            core-contracts

            by nearRust

            create-near-app

            by nearTypeScript

            near-wallet

            by nearJavaScript