当前位置: 首页 > 软件库 > Web3 > 区块链 >

in3

The IN3 client (written in C).
授权协议 View license
开发语言
所属分类 Web3、 区块链
软件类型 开源软件
地区 不详
投 递 者 西门梓
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Incubed Client in C

The Incubed client is a

  • Crypto-Economic
  • Non-syncronizing and stateless, but fully verifying
  • Minimal resource consuming

blockchain client (Crypto-Economic Client, Minimal Verification Client, Ultra Light Client). This version is written in C.

Most blockchains, such as Ethereum, require a client to connect to their blockchain network. Often, these clientsrequire a lot of storage, a very high bandwidth or constant computation. While this is possible to perform on laptops or desktop systems,mobile devices, mobile app, and even web applications struggle to meet these requirements. Currently the solution of choice is to use alight client or remote client on mobile devices. While this may work for mobile phones, most IoT devices are unable to run light clients.Connecting an IoT device to a remote node enables even low-performance IoT devices to be connected to blockchain. However, by using distinctremote nodes, the advantages of a decentralized network are undermined introducing a single point of failure. Also, it is unsecure becausethe client is not able to verify the results by itself. The same applies for mobile apps or web pages.The Trustless Incentivized Remote Node Network, in short Incubed, makes it possible to establish adecentralized and secure network of remote nodes and clients which are able to verify and validate the results, enabling trustworthy andfast access to blockchain for a large number of low-performance IoT, mobile devices, and web applications.

A more detailed explanation of in3 can be found here.

For information on the in3-node, please go here.

For information on the in3 typescript client, please go here.

Installation and Usage

package manager / Bindings Link Use case
Ubuntu Launchpad Installs libs and binaries on IoT devices or Linux-Systems

Add the slock.it ppa to your system
sudo add-apt-repository ppa:devops-slock-it/in3

install the commandline tool in3
apt-get install in3

install shared and static libs and header files
apt-get install in3-dev
Docker Hub Quick and easy way to get in3 client running as docker container
docker run -d -p 8545:8545 slockit/in3:latest --chainId=goerli -port 8545
More parameters and their descriptions can be found here.
Brew Easy to install on MacOS

Add a brew tap
brew tap slockit/in3

install all binaries and libraries
brew install in3
Release page Releases including precompiled libraries for major platforms. To build or compile against the incubed, see readthedocs.
WASM a WASM-Based npm module running in browsers or nodjs.
npm install --save in3-wasm
See examples on how to use it.
Java For integrating with java applications. Take the jar-file from the release.
javac -cp $IN3_JAR_LOCATION/in3.jar *.java
For infromation on how to use maven, examples and documentation see readthedocs

Example

Please have a look at the examples folder in the repo for more detailed examples.

CLI

in3 can be used on the command line in this manner:

in3 [options] method [arguments]

For example,

To get block number, run:

> in3 eth_blockNumber
8610795

A more detailed list with information on arguments can be found here.

C Code

Example C code can be found here

#include <in3/client.h>    // the core client
#include <in3/eth_basic.h> // use the basic module
#include <in3/in3_curl.h>  // transport implementation
#include <inttypes.h>
#include <stdio.h>

int main(int argc, char* argv[]) {
 // register a chain-verifier for basic Ethereum-Support, which is enough to verify blocks
 in3_register_eth_basic();

 in3_register_curl(); // use curl as the default for sending out requests

 in3_t* in3 = in3_for_chain(CHAIN_ID_MAINNET); // create new incubed client

 char *result, *error;  // prepare 2 pointers for the result.

 in3_ret_t res = in3_client_rpc(   // send raw rpc-request, which is then verified
     in3,                    //  the configured client
     "eth_getBlockByNumber", // the rpc-method you want to call.
     "[\"latest\",true]",    // the arguments as json-string
     &result,                // the reference to a pointer whill hold the result
     &error);                // the pointer which may hold a error message

 if (res == IN3_OK) {
   printf("Latest block : \n%s\n", result);
   free(result);
 } else {
   printf("Error verifing the Latest block : \n%s\n", error);
   free(error);
 }
 in3_free(in3);   // cleanup client after usage

}

A more detailed example with information on how to call functions can be found here.

Features

in3 Remote Client Light Client
Failsafe connection ✔️ ✔️
Automatic Nodelist updates ✔️ ✔️
Partial nodelist ✔️ ✔️
Multi-chain support ✔️ ✔️
Full verification of JSON-RPC methods ✔️
IPFS support ✔️ ✔️
Caching support ✔️
Proof-Levels ✔️
POA Support ✔️ ✔️ ✔️
Database setup size-minutes 0-instant️ 0-instant ~50Mb-minutes️
Uses IoT devices,Mobile,browser️ Mobile,browser️️ PC,Laptop️

Resources

Contributors welcome!

We at Blockchains believe in the power of the open source community. Feel free to open any issues you may come across, forkthe repository and integrate in your own projects. You can reach us on various social media platforms for any questionsand suggestions.

Got any questions?

Contact us on orsend us an email at team-in3@slock.it

LICENSE

COMMERCIAL LICENSE

Licensees holding a valid commercial license may use this software in accordancewith the commercial license agreement provided with the Software or, alternatively,in accordance with the terms contained in a written agreement between you andslock.it GmbH/Blockchains LLC. For licensing terms and conditions or furtherinformation please contact slock.it at in3@slock.it.Alternatively, this software may be used under the AGPL license as follows:

AGPL LICENSE

This program is free software: you can redistribute it and/or modify it under theterms of the GNU Affero General Public License as published by the Free SoftwareFoundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANYWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR APARTICULAR PURPOSE. See the GNU Affero General Public License for more details.[Permissions of this strong copyleft license are conditioned on making availablecomplete source code of licensed works and modifications, which include largerworks using a licensed work, under the same license. Copyright and license noticesmust be preserved. Contributors provide an express grant of patent rights.]You should have received a copy of the GNU Affero General Public License alongwith this program. If not, see https://www.gnu.org/licenses/.

  • #define OUT #define IN #define INOUT 在工程中会有类似于上面这种宏定义出现,到底表示什么意思呢?如下一段程序: #include<iostream> #define OUT #define IN #define INOUT void function1(OUT int* p) { *p = 10; return; } void function2(IN int*

  • In函数是什么函数?求解,此外问下In(x+1)的定义域,and why ln(x)是以e为底的x的对数。 x+1 > 0 得 x>-1 log(a)(b)函数叫做对数函数。对数函数中b的定义域是b>0,零和负数没有对数;a的定义域是a>0且a≠1。 函数中in是什么意思比如In2是什么意思,。。 是多少次方的意思,因为在电脑上不能直接打出次方的,就约定用这样的符号表示.如题中,就是指g的(-1)

  • MySQL 中的 IN 运算符用来判断表达式的值是否位于给出的列表中;如果是,返回值为 1,否则返回值为 0。 NOT IN 的作用和 IN 恰好相反,NOT IN 用来判断表达式的值是否不存在于给出的列表中;如果不是,返回值为 1,否则返回值为 0。 IN的语法格式如下: expr IN ( value1, value2, value3 ... valueN ) NOT IN的语法格式如下:

  • 一、in关键字 确定给定的值是否与子查询或列表中的值相匹配。in在查询的时候,首先查询子查询的表,然后将内表和外表做一个笛卡尔积,然后按照条件进行筛选。所以相对内表比较小的时候,in的速度较快。 select * from A where id in (select id from B) #等价于 for select id from B:先执行; 子查询 for select id from

  • 成功解决 File "pandas\_libs\parsers.pyx", line 2021, in pandas._libs.parsers.raise_parser_error pandas.errors.ParserError: Error tokenizing data. C error: Expected 2 fields in line 53, saw 3     目录 解决问题 解

  • 问题描述: 在ES中如何实现in和not in查询? 实现方案: ES中可以通过terms进行多值匹配查询,实现in和not in查询逻辑。 比如: "query": { "terms": { "name": [ "老万", "小明" ] } } 实战演示: 1、数据准备 创建订单索引order_index,并添加测试数据。 ## 删除

  •   Retrying in 5 seconds 上传镜像的时候,上传不上去,导致这个问题的原因是,权限不够,需要给这个容器扩展的特权 --privileged=true docker run --name register -p 5000:5000 -v /registry/public/repos:/var/lib/registry --privileged=true -d registry  

  • 经过排查我报错的原因是$set的传参问题 this.$set(data, 'rememberPass', this.rememberPass); 这里的data得是对象类型的,我这里是因为没有考虑到会有纯string类型的所以报错 加一个对于data类型的判断即可

相关阅读

相关文章

相关问答

相关文档