nearcore | Reference client for NEAR Protocol | Blockchain library
kandi X-RAY | nearcore Summary
kandi X-RAY | nearcore Summary
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
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of nearcore
nearcore Key Features
nearcore Examples and Code Snippets
Community Discussions
Trending Discussions on nearcore
QUESTION
I'm getting a ProhibitedInView error for a simple view function that does the following
...ANSWER
Answered 2021-Apr-29 at 11:21On 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.
QUESTION
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:29I'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.
QUESTION
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:24You'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.
QUESTION
Here are the important parts of the error
...ANSWER
Answered 2019-Dec-04 at 05:49You'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
QUESTION
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:25The 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
QUESTION
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:00If 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.
QUESTION
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:17Conceptually 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.
QUESTION
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 existinggenesis.json
file if found - start_stakewars
if you're participating in NEAR Stakewars, this is your startup script - start_unittest
used bynearcore
,near-bindgen
andnear-evm
- start_staging_testnet
used bynear-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:38Normally 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.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install nearcore
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
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page