ethereum

package module
v0.0.0-...-0b9f11a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

README

Healthy Chain – Healthy DAPP Project Based on Block Chain Technology white paper Healthy Chainteam

1、Project overview HealthyChain is a decentralized intelligent sports health management service platform, which is based on block chain technology, AI intelligent wearable hardware, distributed nodes, and jointly constructs and completes HealthyChain system to realize the global distributed service platform DAPP. Healthy Chain is committed to building a global sports health data exchange, trust exchange, value interconnection block chain sports fitness service platform, integrating sports social, e-commerce games, media information, building fitness for all, sharing a healthy global block chain sports financial ecosystem is Healthy Chain's mission 1.1 Internet+Development Course of Sports Fitness In this situation, HealthyChain team began to build a new generation of block chain technology to support the DAPP project of Internet + AI intelligent hardware products. A large number of research on active participation in sports shows that the economic method has the highest incentive effect and score, which means that people have the highest enthusiasm for sports finance. Healthy Chain actively provides innovative sports finance products, especially sports cash products, which stimulates more people's enthusiasm for participation and cultivates

sports habits for all. The original intention of HealthyChain Health Chain is to enable users to know their own sports data and health data at any time by using smart wearable hardware, and to exchange the sports data for the TOKEN award of HealthyChain. It is an effective exercise realization, using HealthyChain to distribute in the nodes of global sports venues and DAPP.The value sharing of platform content realizes the output and consumption of Token, gradually realizes the sharing of sports fitness venues and coaches, and any venue in the world with Healthy Chain nodes can exercise and exercise. In the future, users of Healthy Chain will gradually realize the diversified functions of social, payment, media, etc., improve user experience, and build up. Healthy Chain's healthy financial ecosystem. 1.2 Block chain is the general trend On October 31, 2008, Zhongbencong released the Bitcoin White Paper "A Point-to-Point Electronic Cash System", announcing the arrival of value transmission network. Bitcoin has many commendable designs, such as tamper-proof, data backup, relatively anonymous participants, and no need for other trusts. But its own trading performance and workload proof (POW) consensus mechanism has gradually revealed problems. Block chain technology is derived from Bitcoin. In the past two years, geeks have mainly

innovated around block chain's transaction performance, consensus algorithm, security anonymity, such as NEO, EOS, etc. to improve transaction performance; Proof of of Stake (POS), proof of delegated interest (DPOS), etc. Practical Byzantine Fault Tolerance(Practical Byzantine Fault Tolerance,PBFT for short) Enrichment and improvement of consensus algorithm, Zero-knowledge Proof (ZKP) and mixed currency to enhance transaction security. Healthy Chain DAPP will continue to build a basic platform, develop and iterate various products and commercial landing projects, gradually form a block chain economy with the core of sports, sports, health and rehabilitation medicine, improve the efficiency of the industry and promote the efficient and coordinated development of society. Health Chain DAPP ecology defines a new type of block chain economy. 1.3 HealthyChain.Meaning

  1. Token gives productivity to sports, fitness and training, makes content sharing, participants'biometric information and sports health data valuable, and makes it possible for people to keep fit, interact and exchange values without borders. 2) Block chain technology solves the problem of trust and value transfer. Only by decentralization can we achieve the true sense of fairness, openness and transparency, and more people will participate in the formation of an

ecological sports fitness business system. 3) Every gymnasium participating in the community will be a distributed node of Healthy Chain. The venue can reward HCT to get more customers and accept customers'payment for HCT, realize the circulation of HCT, let users optimize the environment of gymnasium in the sports and fitness industry, improve service and technology, and make the whole industry develop healthily and vigorously. 4) HealthyChain can develop a 3D motion track capture and recording system for professional athletes in the future. Wearable smart chips and advanced algorithms are used to record and present every movement and every training in 3D. It can be widely used in schools, sports training, medical diagnosis and other fields. 5) Advantages: Users use a variety of scenarios to support a variety of sports models, AI smart wearable hardware, big data, globalization, everyone can participate, so that sharing sports and fitness venues, sharing coaches is possible 1.4 HealthyChain.Development Planning Block chain technology is the most potential, imaginative and radical technological innovation in the world. The biggest characteristic of block chain is decentralization, which can realize the exchange of point-to-point value. It is

called value internet. The goal of HealthyChain is to create a single node where users and users can interact directly.As a big node, fitness venues are a strong cooperative ecological system with mutual cooperation, point-to-point exchange and value-driven under the consensus of the community and society. Healthy Chain will achieve these goals in three phases. Firstly, we use block chain technology to build a secure and stable DAPP platform, which can realize intelligent contracts and digital assets. At the same time, we will introduce intelligent hardware bracelets that can intelligently monitor movement and body status to ensure accurate and detailed user motion data and avoid cheating. Secondly, we use cloud data to meet different business needs, such as insurance, medical care, personal biometric authentication, personal credit records, etc. This stage will realize an evolving, easy-to-use, highly viscous and diversified DAP platform. Finally, through the virtual digital currency (HCT), we connect the data of each user, including the data interaction with other platforms (including non-block chains), and construct an interconnected, multi-dimensional data interrelated DAPP sports health financial ecosystem. Multidimensional data, such as personal credit, assets, production and consumption data, can better integrate community consensus, individual behavior and value exchange.

Token carries the value of the ecological system. Holding HCT will obtain the basic services of various services in the financial ecological system of sports health, sports and fitness venues, sports and fitness surrounding malls, sharing sports and fitness community technology and data resources. 1.5 HealthyChain.Design Concept The goal of HealthyChain is to create a strong cooperative ecosystem in which users and users can interact directly, users can act as a single node, gymnasiums as a large node, cooperate with each other, exchange point to point, and drive by value under the consensus of the community and society. Health chain is committed to helping everyone build a reasonable and fun sports fitness scenario; through AI intelligent wearing equipment to collect user fitness, sports data and health data, to establish user health data information and upload to the chain, to provide valuable data for medical rehabilitation. Through the analysis of big data, we can provide scientific exercise method guidance and practical exercise plan, so that everyone can participate in sports and fitness to get better exercise and fitness experience and share the commercial value of sports. Finally, we can promote everyone to participate in sports, fitness, improve sub-health, and harvest strong physique. Keep a low carbon life. To this end, we design on the basis of the following principles and logic:

  1. Reasonable: In this ecosystem, every natural person and other business forms can participate in it. Our design scheme must benefit all parties in order to make the healthy chain ecology develop steadily for a long time. Only in this way can the block chain and Internet technology really serve the vision of people's life. 2) Fun: Fun can make more people participate in it easily, so that the body and mind can develop healthily. We design various funny functions to let everyone exercise, exercise, socialize and make money in a relaxed and joyful environment. 3) Fairness: The system treats each participant fairly, and this kind of fairness is generally acknowledged as fairness, which is supported by a decentralized block chain voting mechanism and intelligent contract. HealthyChain.Design Concept
  2. Opening and sharing: Opening and sharing is one of the design principles of the system. Faced with all kinds of individuals and institutions related to fitness and health, everyone and institutions can access the platform to share their

own skills, venues, equipment, data and other resources, so that the overall value of the system and the benefits of participants can be continuously improved. 5) Freedom: Each participant in the system can freely exchange skills, generate transactions, play together, and mine together. 6) Transparency: All transactions, exchanges, mining, social networking and other rules are established and implemented on the basis of block chains and smart contracts, to ensure that the payment and return, ability and resources are reasonably reflected, reciprocal transactions, and to ensure that the records of the whole process are open, transparent and unalterable. At this stage, HealthyChain is a digital currency asset issued on the basis of intelligent contracts using ETH block chains at the bottom. ETH can theoretically reach 1000TPS (transaction per second), each transfer and mining incentives need to pay commissions, for users, mining incentives may not arrive in real time. Later, based on the basic chain of DAG technology, we will put stability, security, scalability and ease of use in the first place in design. By introducing modular virtual machines, smart sandboxes, value exchange and bifurcation mechanisms, we can create an evolving, easy-to-use, low-cost and moderately customized block chain network, such as trustNote, to issue new digital assets.

DAG (directed acyclic graph) is called "directed acyclic graph". There is no block concept. Instead of packaging all data into blocks and linking blocks with blocks, each user can submit a data unit, which can contain many elements, such as transactions, messages and so on. DAG (Directed Acyclic Graph) is formed by linking data units with reference relation. DAG is characterized by asynchronizing the write operation of data units. A large number of wallet clients can write transaction data into DAG independently and asynchronically, which can support great concurrency and high speed. Furthermore, based on the DAG consensus mechanism, block-chain digital assets can be transferred at a very fast speed without any fees. For the fitness chain, after using the DAG basic chain, even if the number of users is increasing, token incentives can also be guaranteed to reach the accounts in real time. Healthy Chain believes that,Through technological innovation, we can solve the problem of trust between people and create a new network of production relations, better integrate community consensus, individual behavior and value exchange. After issuing new digital assets, digital assets will be guaranteed to be converted in equal proportion at this stage. 1.6 HealthyChain.Application scenarios Identity information establishment, credit inquiry. User identity authentication includes biological information, such as face recognition. With

the application of DAPP platform in cross-border e-commerce and the accumulation of block chain technology, credit-related data will be deposited in the chain. By authorization, users'syndrome letters can be searched, and a highly reliable credit mechanism can be evolved. User identity authentication, bioinformatics, credit information and other comprehensive information databases can be established to promote digital asset finance. For service. Through rehabilitation training, we can set up vital signs data, physical examination reports, biological health data such as genetic diseases and chronic diseases to link up, open up the problem of isolated medical examination and hospital information island, and provide detailed reference basis for health insurance companies, non-drug treatment, rehabilitation training and other institutions through user authorization, so as to protect them. Household privacy. Cross-border trade goods traceability, anti-counterfeiting. With the continuous iteration of DAPP, cross-border e-commerce will also be online in DAPP to support digital currency settlement, and use Token to change billing and malicious evaluation, to achieve real credit evaluation, to ensure that SKU is good and cheap. At the same time, block chain technology is gradually used to track, upload and verify the whole process of commodity import, which will give each cross-border import a unique "block identity" for consumers to check and verify, to ensure the authenticity and reliability of commodity sources, and

fundamentally eliminate counterfeits. HealthyChain Ecology already has partners of game manufacturers. After DAPP joins the game manufacturers in the later stage, Token will support the acquisition, circulation and trading of small game props. Global users, digital assets easy to trade. Under the premise of abiding by the laws of all countries, TOKEN is used to purchase and use goods of all countries conveniently and quickly, share the value of content, and trade in places where the Internet can be accessed, so as to imagine the function of convenient payment without borders. 1.7 Overview of HealthyChain Smart Handrings The first generation of smart hardware is a universal hardware bracelet that manages digital assets based on HealthyChain and establishes incentive systems for users through smart contracts. Intelligent bracelet has been cooperated by well-known factories in the industry, and engineering machines have been introduced. The first version of the smart bracelet will have similar functions as the existing bracelet. At the same time, it will be adapted to DAPP for health coin mining. The first batch of supporters from the HealthyChain community will use the mass-produced DAP

and HealthyChain bracelets after mass production, and continue to optimize the HealthyChain bracelets according to user feedback. Sports bracelet is a set of running, cycling, fast walking and other sports mode as one of the hardware equipment. As long as the power supply of the bracelet is kept on and connected to the mobile phone, all the functions of the ordinary bracelet can be realized. Based on HealthyChain's ecological incentive mechanism, users can contribute their own sports data to get HTC rewards, accurately collect user's sports data, effectively filter invalid steps, eliminate cheating, and encourage everyone to keep fit. The internal structure and configuration of each bracelet are highly unified when it leaves the factory, so as to ensure the stability of all bracelets and facilitate maintenance. 1.8 HealthyChain.Ecosphere

  1. Ordinary people: all the people who love sports, have the need for fitness and consciousness, the square dancing aunt

  2. Fitness and health service institutions: gym, dance room, yoga, Taekwondo hall, personal studio, etc. 3) The group of members of fitness institutions: paid members of fitness institutions

  3. Fitness Chain System Based on Block Chain: Health Chain System, Foundation and Community Service System

  4. Other business formats with business needs 1.9 Development Prospects of Health Chain

  5. The team has many years of practical experience in the fitness industry and tens of millions of precise fitness members. 2) There are hundreds of millions of people in the fitness market. 3) Intelligent Hardware Manufacturers Sharing Lenovo OEM

  6. Data show that in 2017, 37627 gyms in China have conservatively estimated annual membership of more than 100 million. The penetration rate of Chinese fitness population is only 0.79%, far less than 17.82% in the United States. China's fitness market still has tremendous room for growth. 5) Overseas developed countries have more and more people take fitness as an indispensable part of their lives, and the number of users in overseas markets is

huge. Prediction of the Number of Fitness Users in China (Unit: 100 million, Data Source: Data collation of the State General Administration of Sports)

2、Public chain(HCT) 2.1 Health uses Public Chain (HCT) is the digital asset passport of health chain ecosystem. It can be obtained through the health chain wearable intelligent hardware mining. The mining process is closely related to the use of scenarios, users'health status, and the operation of health institutions. The public chain (HCT) is the most important link in the health chain ecosystem. It plays the role of trading media, value transfer, rewards, game props, social lubricants and so on. It has a wide range of application scenarios. As the application scenarios become more and more extensive, the public chain (HCT) has long-term value-added expectations; and with the increasing difficulty of mining, the value of the public chain (HCT) will become higher and higher, and the earlier it is obtained, the greater value-added space will be obtained. 2.2 Public Chain (HCT) Incentive Mechanism Public Chain (HCT) is based on the design concept of HealthyChain smart hardware, connecting mobile phones and collecting user's trajectory. It combines hardware, mobile phones and user's motion integrated data principle to design a unique intelligent adjustment mining algorithm. Based on artificial intelligence, a scientific scoring mechanism is formulated according to the daily amount of exercise, the acceleration of specific scenes, the daily time

of exercise, the comprehensive data of exercise and the time cycle of fitness. According to the rating results of all users, tokens are awarded to users within each time cycle. In theory, the higher the score, the more token rewards. In HealthyChain's ecosystem, all users who adhere to fitness have the possibility of getting a public chain (HCT) award. Each incentive chain (HCT) indicates that users have paid sweat, time and spirit for fitness training. Public Chain (HCT) is essentially a proof of user's workload. The total amount of HCT incentives in each cycle decreases with time. The specific incentives can be found in the section of the fund utilization plan. 2.3 Public Chain (HCT) Trading Closed Loop

  1. National Mining: Users can open the fitness mode at any time of the day. When the fitness intelligent hardware detects the data of the user's movement speed and comprehensive data, it will automatically open the accelerated calculation mode for a certain period of time. Each time cycle, according to the user's surge situation, according to the system score. Mechanisms, give users a certain amount of token incentives, in order to encourage users to develop a habit of continuous exercise.

  2. Sports Fitness Venues Consumption Support: Fitness users are both producers and demanders. The public chain (HCT) awarded can be used to consume and pay for gyms and personal trainers that have access to the Health Chain system. 3) DAPP cross-border e-commerce consumer payment: within the scope permitted by law, can support the use of HCT partial or full deduction of the public chain (HCT) settlement, purchase the required goods, HCT consumption cycle. 4) Value exchange, fitness content sharing, reward reading and other fitness knowledge value payment circulation. 5) Business Drainage Award: Fitness venues are the producers. Fitness venues connect to HealthyChain from the system, purchase public chains (HCT) through third-party trading platform, and give users more public chains (HCT) incentives in HealthyChain system, in order to attract more users to join the gym and increase the continuing income of the gym. 4) Value exchange, fitness content sharing, reward reading and other fitness knowledge value payment circulation. 5) Merchant Drainage Award: Fitness venues are the producers. Fitness venues access Healthy Chain from the system, purchase health coins through a third-party trading platform, and give users more health money rewards in Healthy Chain system, so as to attract more users to join the

gym and increase the continuing income of the gym. 6) Shopping game props: HealthyChain relies on block chain technology, users can use the public chain (HCT) to exchange various services needed for sports and fitness, fitness venues can also attract more users to enter stores by issuing health money, forming a closed-loop transaction. 7) The total amount of the public chain (HCT) is constant, and the value of the public chain (HCT) will increase with the flow rate. As the public chain (HCT) continues to appreciate, we will continue to develop more trading scenarios suitable for the public chain (HCT). In theory, business transactions can be grafted onto the public chain (HCT). There are many application scenarios. 8) Transaction value transfer: Users get a certain amount of public chain (HCT) awards because of their fitness exercise, which can be used for consumer support and realize the value transfer of fitness exercise. Healthy Chain Trading Closed Loop

3、Product Solutions 3.1 Product Solutions At present, the popular design scheme of Internet product is MVP (Minimum viable product). Starting from a minimal viable product, seed users are accumulated. According to the feedback from seed users and background monitoring data, products of Tencent are optimized rapidly and continuously. QQ and Weixindu are products of Tencent Department. In this way, what millet company calls "small step, fast iteration" is also different from each other. HealthyChain's DAP and compatible hardware Bracelet products will adopt this overlapping mode. HealthyChain.The product iteration scheme will be carried out step by step. MVP products will only realize the mining of hand rings on the basis of basic functions of hand rings, such as movement mode (such as walking, climbing, running, cycling), data synchronization (real-time heart rate, real-time steps, real-time calories, sleep time). In the following stage, DAPP will gradually realize the industry compatibility of multi-brand bracelets. For users of other bracelets, such as millet and Huawei bracelets, we can also access our DAPP to achieve national fitness, Bracelet mining function, and obtain corresponding tokens. In the future, it can even be similar to smart watches, smart glasses and other bracelets. He has access to smart devices. Ultimately, our DAPP will be a mature ecological community in

which supporters of the fitness chain community can make fitness friends, mine for money, and use HCT tokens to buy a variety of products and services in the community's Healthy Chain confectionery store. 3.2 Operational plan Because Healthy Chain DAPP is a step-by-step, step-by-step optimization path model, only seed users need to join the Healthy Chain community in the early stage to participate in our product optimization work. We anticipate that different promotion methods will be adopted at different stages to achieve different user levels, and eventually we will put the concept of national fitness, national mining into the hearts of users who love life. HealthyChain DAPP. Product Operation Roadmap 4、Technical scheme 4.1 Healthy Chain Mining Mechanism The health chain is based on artificial intelligence. It formulates a scientific scoring mechanism according to the daily amount of exercise, the acceleration of specific scenes, the daily time of exercise, the comprehensive data of exercise and the time cycle of fitness. In each time cycle, users will issue tokens to users based on the health chain intelligent hardware, connected mobile phones,

uploaded user fitness data and track, combined with the fitness chain scoring mechanism. The total amount of tokens rewarded in each cycle decreases with time. 4.2 Wearable Smart Hardware for Health Chain Wearable intelligent hardware of health chain is an important terminal of fitness chain system, including intelligent bracelet, intelligent fitness equipment, intelligent gym and so on. Only when users wear smart hardware, their fitness data will be transmitted to the fitness chain scoring system. The first generation of fitness bracelets will record the user's heart rate, sleep, steps, calories and other data, supporting a variety of sports models, such as running, cycling, fast walking, etc 4.3 Health Chain Technology Architecture The health chain system architecture is mainly divided into three layers: service layer, system layer and DAPP layer. The service layer mainly includes four basic services: big data service, AI intelligent service, scoring system and block chain service. User's wearable equipment generates time series data at every moment. Big data service is responsible for carrying and storing massive movement data, and analyzing and processing the data. Scoring system is the core service of token reward.

According to user's movement data, all fitness users'movement data are evaluated in each time cycle. AI intelligent service mainly provides intelligent scoring, scientific fitness plan recommendation and other services. Block chain service is the basic service of health chain. The system layer is a function module built on the service layer to provide services for DAPP. It mainly includes data collection function, message notification function, token reward function, fitness plan recommendation function, online shopping mall function and so on. DAPP is an application directly connected with intelligent devices such as smart hand rings. All smart devices that can access the health chain need to be connected to DAPP before they can connect the whole health chain. DAPP not only connects with smart hand environment protection, but also includes token wallet, sports community, online shopping mall and other functions. Intelligent devices are responsible for identifying users'fitness patterns, collecting sports data, uploading data to the system through the connection with DAPP, and receiving token awards.

5、Risk statement 5The following risks exist in this project. Investors should pay attention to them. 5.1. Market risk Market risk means that the fitness chain is not accepted by the fitness crowd, or not attracted enough users, resulting in insufficient profit support. In view of this, the way to avoid danger for the fitness chain team is as follows Draw lessons from similar product operation experience, and improve Healthy Chain; Take advantage of the experience accumulated by the founding team in fitness service to incubate platform ecology and generate profits.. 5.2. Technical risk Technological risk refers to the major problems of underlying technology, which lead to the failure of HealthyChain system to achieve expected functions, or the failure of data link due to the technical problems of intelligent hardware. For technical risks, the HealthyChain team adopts the following hedging methods: Based on mature, open source and secure block chain technology, HealthyChain system is developed using a framework that has been approved and verified by commercial customers.

Actively recruit and absorb more high-end technical talents to join the R&D team, and strengthen the strength of the R&D team. 5.3. Compliance risk Compliance risk refers to the risk that HealthyChain violates local laws and regulations in the process of subscribing for funds and conducting business, which results in the business being unable to continue. For compliance risk, the HealthyChain team adopts the following hedging methods: Operating teams and decision-making committees adopt distributed operation to eliminate single-point risks. Locally, it operates within the current legal framework. 5.4. Capital risk Capital risk refers to major losses of project funds, such as stolen funds, loss of funds, large depreciation of reserves, etc. The hedging methods adopted by the fund risk operation team are as follows: The reserve fund is managed by multi-signature wallet plus cold storage. Under the 5-7 multi-signature mode, when multiple directors fail to perform their duties at the same time, the reserve fund will face risks. The operation team has rich experience in wind control, which can effectively control project risks and protect the fundamental interests of users.

6、Disclaimer Nothing in this white paper constitutes a legal, financial, commercial or tax recommendation, and you should consult your own legal, financial, tax or other professional consultants before engaging in any related activities. Neither the HealthyChain Foundation nor any member of the project team nor any third-party service provider shall bear any damage or loss that may be incurred directly or indirectly by accessing this white paper material, or by accessing the website or other materials published by the Foundation. All content will be applied to all the Foundation's targets, including but not limited to promoting research, design and development, and advocating the value of interconnection and trust exchange of global and open source HealthyChain global information and communication network systems to promote safe and harmonious development of ecosystems. This white paper is for general information purposes only and does not constitute a prospectus, quotation document, securities quotation, investment request or any sale of any product, project or asset (whether digital or otherwise). The following information may not be exhaustive or contain any elements of the contractual relationship. There is no guarantee of the accuracy or completeness of such information, nor any statement, guarantee or commitment to the accuracy or completeness of such information. The white

paper includes information obtained from third-party sources, and the Foundation and/or HealthyChain team did not independently verify the accuracy or completion of such information. There is no guarantee of the accuracy or completeness of such information, nor any statement, guarantee or commitment to the accuracy or completeness of such information This white paper does not constitute any intention of the Healthy Chain team to sell HCT coins and does not provide any form of investment decision. Nothing contained in this white paper can be used as a promise or statement to represent the future Healthy Chain cloud. The agreement between the Foundation (or its affiliates) and you is related to any sale or purchase of HCT and is governed only by the separate terms and conditions of other agreements. When reading this white paper, you will acquiesce in the following information: (a) You acknowledge, understand and agree that HCT may be of no value, not for speculative investment, and that any subject has no guarantee of the value or liquidity of HCT; (b) No foundation, its affiliates or members of the HealthyChain team are responsible for the value, transferability, liquidity of HCT and the market provided by any third party for HCT; (c) In any HCT purchase decision, you do not rely on any statement stated in this white paper; (d) You need to be accountable for your investment funds (as the case may be)

(e) If you are a citizen, resident (taxpayer or other), resident or green card holder of a country whose laws, decrees, provisions, treaties, or administrative acts do not recognize a security token or the investment product, you recognize, understand and agree that you are not allowed to participate in HCT purchasing activities. The Foundation will not make any statements, guarantees or commitments to any entity or individual. HCT users should carefully consider and evaluate all risks and uncertainties related to HCT sales (including financial and legal risks and other uncertainties). The information contained in this white paper is for community discussion only and is not legally binding. HCT's sale agreement shall be a separate token purchase agreement. If there is any inconsistency between the token purchase agreement and the white paper, the token purchase agreement shall prevail. The contents of the white paper and all statements, statements, interviews and oral statements in press releases or anywhere (including statements about intentions, beliefs or current expectations regarding market conditions, business strategies and plans, financial situation, specific provisions and risk management practices). In view of the fact that these statements involve known and unknown risks, uncertainties and other factors that may lead to different actual future

outcomes from the above-mentioned forward-looking statements, we recommend that you do not rely too heavily on these forward-looking statements. White Paper information is updated only to the date of the White Paper, and HealthyChain is not liable for these forward-looking statements or for events after the date of the White Paper update (whether explicit or implied). This white paper can be translated into other languages. In case of conflicts or ambiguities between the translated versions, the English version shall prevail. No part of this white paper shall be reproduced, distributed or disseminated in any way without the prior written consent of the Foundation.

Documentation

Overview

Package ethereum defines interfaces for interacting with Ethereum.

Index

Constants

This section is empty.

Variables

View Source
var NotFound = errors.New("not found")

NotFound is returned by API methods if the requested item does not exist.

Functions

This section is empty.

Types

type CallMsg

type CallMsg struct {
	From     common.Address  // the sender of the 'transaction'
	To       *common.Address // the destination contract (nil for contract creation)
	Gas      uint64          // if 0, the call executes with near-infinite gas
	GasPrice *big.Int        // wei <-> gas exchange ratio
	Value    *big.Int        // amount of wei sent along with the call
	Data     []byte          // input data, usually an ABI-encoded contract method invocation
}

CallMsg contains parameters for contract calls.

type ChainReader

type ChainReader interface {
	BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
	BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
	HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
	HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
	TransactionCount(ctx context.Context, blockHash common.Hash) (uint, error)
	TransactionInBlock(ctx context.Context, blockHash common.Hash, index uint) (*types.Transaction, error)

	// This method subscribes to notifications about changes of the head block of
	// the canonical chain.
	SubscribeNewHead(ctx context.Context, ch chan<- *types.Header) (Subscription, error)
}

ChainReader provides access to the blockchain. The methods in this interface access raw data from either the canonical chain (when requesting by block number) or any blockchain fork that was previously downloaded and processed by the node. The block number argument can be nil to select the latest canonical block. Reading block headers should be preferred over full blocks whenever possible.

The returned error is NotFound if the requested item does not exist.

type ChainStateReader

type ChainStateReader interface {
	BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error)
	StorageAt(ctx context.Context, account common.Address, key common.Hash, blockNumber *big.Int) ([]byte, error)
	CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error)
	NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error)
}

ChainStateReader wraps access to the state trie of the canonical blockchain. Note that implementations of the interface may be unable to return state values for old blocks. In many cases, using CallContract can be preferable to reading raw contract storage.

type ChainSyncReader

type ChainSyncReader interface {
	SyncProgress(ctx context.Context) (*SyncProgress, error)
}

ChainSyncReader wraps access to the node's current sync status. If there's no sync currently running, it returns nil.

type ContractCaller

type ContractCaller interface {
	CallContract(ctx context.Context, call CallMsg, blockNumber *big.Int) ([]byte, error)
}

A ContractCaller provides contract calls, essentially transactions that are executed by the EVM but not mined into the blockchain. ContractCall is a low-level method to execute such calls. For applications which are structured around specific contracts, the abigen tool provides a nicer, properly typed way to perform calls.

type FilterQuery

type FilterQuery struct {
	BlockHash *common.Hash     // used by eth_getLogs, return logs only from block with this hash
	FromBlock *big.Int         // beginning of the queried range, nil means genesis block
	ToBlock   *big.Int         // end of the range, nil means latest block
	Addresses []common.Address // restricts matches to events created by specific contracts

	// The Topic list restricts matches to particular event topics. Each event has a list
	// of topics. Topics matches a prefix of that list. An empty element slice matches any
	// topic. Non-empty elements represent an alternative that matches any of the
	// contained topics.
	//
	// Examples:
	// {} or nil          matches any topic list
	// {{A}}              matches topic A in first position
	// {{}, {B}}          matches any topic in first position, B in second position
	// {{A}, {B}}         matches topic A in first position, B in second position
	// {{A, B}, {C, D}}   matches topic (A OR B) in first position, (C OR D) in second position
	Topics [][]common.Hash
}

FilterQuery contains options for contract log filtering.

type GasEstimator

type GasEstimator interface {
	EstimateGas(ctx context.Context, call CallMsg) (uint64, error)
}

GasEstimator wraps EstimateGas, which tries to estimate the gas needed to execute a specific transaction based on the pending state. There is no guarantee that this is the true gas limit requirement as other transactions may be added or removed by miners, but it should provide a basis for setting a reasonable default.

type GasPricer

type GasPricer interface {
	SuggestGasPrice(ctx context.Context) (*big.Int, error)
}

GasPricer wraps the gas price oracle, which monitors the blockchain to determine the optimal gas price given current fee market conditions.

type LogFilterer

type LogFilterer interface {
	FilterLogs(ctx context.Context, q FilterQuery) ([]types.Log, error)
	SubscribeFilterLogs(ctx context.Context, q FilterQuery, ch chan<- types.Log) (Subscription, error)
}

LogFilterer provides access to contract log events using a one-off query or continuous event subscription.

Logs received through a streaming query subscription may have Removed set to true, indicating that the log was reverted due to a chain reorganisation.

type PendingContractCaller

type PendingContractCaller interface {
	PendingCallContract(ctx context.Context, call CallMsg) ([]byte, error)
}

PendingContractCaller can be used to perform calls against the pending state.

type PendingStateEventer

type PendingStateEventer interface {
	SubscribePendingTransactions(ctx context.Context, ch chan<- *types.Transaction) (Subscription, error)
}

A PendingStateEventer provides access to real time notifications about changes to the pending state.

type PendingStateReader

type PendingStateReader interface {
	PendingBalanceAt(ctx context.Context, account common.Address) (*big.Int, error)
	PendingStorageAt(ctx context.Context, account common.Address, key common.Hash) ([]byte, error)
	PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)
	PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
	PendingTransactionCount(ctx context.Context) (uint, error)
}

A PendingStateReader provides access to the pending state, which is the result of all known executable transactions which have not yet been included in the blockchain. It is commonly used to display the result of ’unconfirmed’ actions (e.g. wallet value transfers) initiated by the user. The PendingNonceAt operation is a good way to retrieve the next available transaction nonce for a specific account.

type Subscription

type Subscription interface {
	// Unsubscribe cancels the sending of events to the data channel
	// and closes the error channel.
	Unsubscribe()
	// Err returns the subscription error channel. The error channel receives
	// a value if there is an issue with the subscription (e.g. the network connection
	// delivering the events has been closed). Only one value will ever be sent.
	// The error channel is closed by Unsubscribe.
	Err() <-chan error
}

Subscription represents an event subscription where events are delivered on a data channel.

type SyncProgress

type SyncProgress struct {
	StartingBlock uint64 // Block number where sync began
	CurrentBlock  uint64 // Current block number where sync is at
	HighestBlock  uint64 // Highest alleged block number in the chain
	PulledStates  uint64 // Number of state trie entries already downloaded
	KnownStates   uint64 // Total number of state trie entries known about
}

SyncProgress gives progress indications when the node is synchronising with the Ethereum network.

type TransactionReader

type TransactionReader interface {
	// TransactionByHash checks the pool of pending transactions in addition to the
	// blockchain. The isPending return value indicates whether the transaction has been
	// mined yet. Note that the transaction may not be part of the canonical chain even if
	// it's not pending.
	TransactionByHash(ctx context.Context, txHash common.Hash) (tx *types.Transaction, isPending bool, err error)
	// TransactionReceipt returns the receipt of a mined transaction. Note that the
	// transaction may not be included in the current canonical chain even if a receipt
	// exists.
	TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
}

TransactionReader provides access to past transactions and their receipts. Implementations may impose arbitrary restrictions on the transactions and receipts that can be retrieved. Historic transactions may not be available.

Avoid relying on this interface if possible. Contract logs (through the LogFilterer interface) are more reliable and usually safer in the presence of chain reorganisations.

The returned error is NotFound if the requested item does not exist.

type TransactionSender

type TransactionSender interface {
	SendTransaction(ctx context.Context, tx *types.Transaction) error
}

TransactionSender wraps transaction sending. The SendTransaction method injects a signed transaction into the pending transaction pool for execution. If the transaction was a contract creation, the TransactionReceipt method can be used to retrieve the contract address after the transaction has been mined.

The transaction must be signed and have a valid nonce to be included. Consumers of the API can use package accounts to maintain local private keys and need can retrieve the next available nonce using PendingNonceAt.

Directories

Path Synopsis
Package accounts implements high level Ethereum account management.
Package accounts implements high level Ethereum account management.
abi
Package abi implements the Ethereum ABI (Application Binary Interface).
Package abi implements the Ethereum ABI (Application Binary Interface).
abi/bind
Package bind generates Ethereum contract Go bindings.
Package bind generates Ethereum contract Go bindings.
keystore
Package keystore implements encrypted storage of secp256k1 private keys.
Package keystore implements encrypted storage of secp256k1 private keys.
usbwallet
Package usbwallet implements support for USB hardware wallets.
Package usbwallet implements support for USB hardware wallets.
usbwallet/internal/trezor
Package trezor contains the wire protocol wrapper in Go.
Package trezor contains the wire protocol wrapper in Go.
cmd
bootnode
bootnode runs a bootstrap node for the Ethereum Discovery Protocol.
bootnode runs a bootstrap node for the Ethereum Discovery Protocol.
clef
signer is a utility that can be used so sign transactions and arbitrary data.
signer is a utility that can be used so sign transactions and arbitrary data.
evm
evm executes EVM code snippets.
evm executes EVM code snippets.
faucet
faucet is a Ether faucet backed by a light client.
faucet is a Ether faucet backed by a light client.
geth
geth is the official command-line client for Ethereum.
geth is the official command-line client for Ethereum.
internal/browser
Package browser provides utilities for interacting with users' browsers.
Package browser provides utilities for interacting with users' browsers.
p2psim
p2psim provides a command-line client for a simulation HTTP API.
p2psim provides a command-line client for a simulation HTTP API.
puppeth
puppeth is a command to assemble and maintain private networks.
puppeth is a command to assemble and maintain private networks.
rlpdump
rlpdump is a pretty-printer for RLP data.
rlpdump is a pretty-printer for RLP data.
utils
Package utils contains internal helper functions for go-ethereum commands.
Package utils contains internal helper functions for go-ethereum commands.
Package common contains various helper functions.
Package common contains various helper functions.
bitutil
Package bitutil implements fast bitwise operations.
Package bitutil implements fast bitwise operations.
compiler
Package compiler wraps the Solidity compiler executable (solc).
Package compiler wraps the Solidity compiler executable (solc).
hexutil
Package hexutil implements hex encoding with 0x prefix.
Package hexutil implements hex encoding with 0x prefix.
math
Package math provides integer math utilities.
Package math provides integer math utilities.
mclock
Package mclock is a wrapper for a monotonic clock source
Package mclock is a wrapper for a monotonic clock source
Package consensus implements different Ethereum consensus engines.
Package consensus implements different Ethereum consensus engines.
clique
Package clique implements the proof-of-authority consensus engine.
Package clique implements the proof-of-authority consensus engine.
ethash
Package ethash implements the ethash proof-of-work consensus engine.
Package ethash implements the ethash proof-of-work consensus engine.
contracts
chequebook
Package chequebook package wraps the 'chequebook' Ethereum smart contract.
Package chequebook package wraps the 'chequebook' Ethereum smart contract.
ens
Package core implements the Ethereum consensus protocol.
Package core implements the Ethereum consensus protocol.
asm
Provides support for dealing with EVM assembly instructions (e.g., disassembling them).
Provides support for dealing with EVM assembly instructions (e.g., disassembling them).
bloombits
Package bloombits implements bloom filtering on batches of data.
Package bloombits implements bloom filtering on batches of data.
rawdb
Package rawdb contains a collection of low level database accessors.
Package rawdb contains a collection of low level database accessors.
state
Package state provides a caching layer atop the Ethereum state trie.
Package state provides a caching layer atop the Ethereum state trie.
types
Package types contains data types related to Ethereum consensus.
Package types contains data types related to Ethereum consensus.
vm
Package vm implements the Ethereum Virtual Machine.
Package vm implements the Ethereum Virtual Machine.
vm/runtime
Package runtime provides a basic execution model for executing EVM code.
Package runtime provides a basic execution model for executing EVM code.
bn256
Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
bn256/cloudflare
Package bn256 implements a particular bilinear group at the 128-bit security level.
Package bn256 implements a particular bilinear group at the 128-bit security level.
bn256/google
Package bn256 implements a particular bilinear group.
Package bn256 implements a particular bilinear group.
secp256k1
Package secp256k1 wraps the bitcoin secp256k1 C library.
Package secp256k1 wraps the bitcoin secp256k1 C library.
Package ethstats implements the network stats reporting service.
Package ethstats implements the network stats reporting service.
htc
Package eth implements the Ethereum protocol.
Package eth implements the Ethereum protocol.
downloader
Package downloader contains the manual full chain synchronisation.
Package downloader contains the manual full chain synchronisation.
fetcher
Package fetcher contains the block announcement based synchronisation.
Package fetcher contains the block announcement based synchronisation.
filters
Package filters implements an ethereum filtering system for block, transactions and log events.
Package filters implements an ethereum filtering system for block, transactions and log events.
tracers
Package tracers is a collection of JavaScript transaction tracers.
Package tracers is a collection of JavaScript transaction tracers.
tracers/internal/tracers
Package tracers contains the actual JavaScript tracer assets.
Package tracers contains the actual JavaScript tracer assets.
Package ethclient provides a client for the Ethereum RPC API.
Package ethclient provides a client for the Ethereum RPC API.
internal
debug
Package debug interfaces Go runtime debugging facilities.
Package debug interfaces Go runtime debugging facilities.
ethapi
Package ethapi implements the general Ethereum API functions.
Package ethapi implements the general Ethereum API functions.
guide
Package guide is a small test suite to ensure snippets in the dev guide work.
Package guide is a small test suite to ensure snippets in the dev guide work.
jsre
Package jsre provides execution environment for JavaScript.
Package jsre provides execution environment for JavaScript.
jsre/deps
Package deps contains the console JavaScript dependencies Go embedded.
Package deps contains the console JavaScript dependencies Go embedded.
web3ext
package web3ext contains geth specific web3.js extensions.
package web3ext contains geth specific web3.js extensions.
les
Package les implements the Light Ethereum Subprotocol.
Package les implements the Light Ethereum Subprotocol.
flowcontrol
Package flowcontrol implements a client side flow control mechanism
Package flowcontrol implements a client side flow control mechanism
Package light implements on-demand retrieval capable state and chain objects for the Ethereum Light Client.
Package light implements on-demand retrieval capable state and chain objects for the Ethereum Light Client.
Package log15 provides an opinionated, simple toolkit for best-practice logging that is both human and machine readable.
Package log15 provides an opinionated, simple toolkit for best-practice logging that is both human and machine readable.
Go port of Coda Hale's Metrics library
Go port of Coda Hale's Metrics library
exp
Hook go-metrics into expvar on any /debug/metrics request, load all vars from the registry into expvar, and execute regular expvar handler
Hook go-metrics into expvar on any /debug/metrics request, load all vars from the registry into expvar, and execute regular expvar handler
Package miner implements Ethereum block creation and mining.
Package miner implements Ethereum block creation and mining.
Package geth contains the simplified mobile APIs to go-ethereum.
Package geth contains the simplified mobile APIs to go-ethereum.
p2p
Package p2p implements the Ethereum p2p network protocols.
Package p2p implements the Ethereum p2p network protocols.
discover
Package discover implements the Node Discovery Protocol.
Package discover implements the Node Discovery Protocol.
discv5
Package discv5 implements the RLPx v5 Topic Discovery Protocol.
Package discv5 implements the RLPx v5 Topic Discovery Protocol.
enr
Package enr implements Ethereum Node Records as defined in EIP-778.
Package enr implements Ethereum Node Records as defined in EIP-778.
nat
Package nat provides access to common network port mapping protocols.
Package nat provides access to common network port mapping protocols.
netutil
Package netutil contains extensions to the net package.
Package netutil contains extensions to the net package.
protocols
Package protocols is an extension to p2p.
Package protocols is an extension to p2p.
simulations
Package simulations simulates p2p networks.
Package simulations simulates p2p networks.
Package rlp implements the RLP serialization format.
Package rlp implements the RLP serialization format.
Package rpc provides access to the exported methods of an object across a network or other I/O connection.
Package rpc provides access to the exported methods of an object across a network or other I/O connection.
signer
rules/deps
Package deps contains the console JavaScript dependencies Go embedded.
Package deps contains the console JavaScript dependencies Go embedded.
api
api/http
A simple http server interface to Swarm
A simple http server interface to Swarm
bmt
Package bmt provides a binary merkle tree implementation used for swarm chunk hash
Package bmt provides a binary merkle tree implementation used for swarm chunk hash
log
network/simulations
You can run this simulation using
You can run this simulation using
pot
Package pot see doc.go
Package pot see doc.go
pss
Pss provides devp2p functionality for swarm nodes without the need for a direct tcp connection between them.
Pss provides devp2p functionality for swarm nodes without the need for a direct tcp connection between them.
pss/client
simple abstraction for implementing pss functionality
simple abstraction for implementing pss functionality
shed
Package shed provides a simple abstraction components to compose more complex operations on storage data organized in fields and indexes.
Package shed provides a simple abstraction components to compose more complex operations on storage data organized in fields and indexes.
storage/feed
Package feeds defines Swarm Feeds.
Package feeds defines Swarm Feeds.
storage/feed/lookup
Package lookup defines feed lookup algorithms and provides tools to place updates so they can be found
Package lookup defines feed lookup algorithms and provides tools to place updates so they can be found
storage/localstore
Package localstore provides disk storage layer for Swarm Chunk persistence.
Package localstore provides disk storage layer for Swarm Chunk persistence.
storage/mock
Package mock defines types that are used by different implementations of mock storages.
Package mock defines types that are used by different implementations of mock storages.
storage/mock/db
Package db implements a mock store that keeps all chunk data in LevelDB database.
Package db implements a mock store that keeps all chunk data in LevelDB database.
storage/mock/mem
Package mem implements a mock store that keeps all chunk data in memory.
Package mem implements a mock store that keeps all chunk data in memory.
storage/mock/rpc
Package rpc implements an RPC client that connect to a centralized mock store.
Package rpc implements an RPC client that connect to a centralized mock store.
storage/mock/test
Package test provides functions that are used for testing GlobalStorer implementations.
Package test provides functions that are used for testing GlobalStorer implementations.
Package tests implements execution of Ethereum JSON tests.
Package tests implements execution of Ethereum JSON tests.
Package trie implements Merkle Patricia Tries.
Package trie implements Merkle Patricia Tries.
whisper
mailserver
Package mailserver provides a naive, example mailserver implementation
Package mailserver provides a naive, example mailserver implementation
whisperv5
Package whisperv5 implements the Whisper protocol (version 5).
Package whisperv5 implements the Whisper protocol (version 5).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL