Go implementation of the Ethereum protocol
Find a file
Daniel Liu 2563cd13ed
trie: cleanup stateTrie #25640 (#1113)
It's a trivial PR to hide the error log when the trie node is not found in the database. The idea for this change is for all TryXXX functions, the error is already returned and we don't need to fire a log explicitly.

Recently there are a few tickets #25613 #25589 reporting that the trie nodes are missing because of debug.SetHead. The root cause is after resetting, the chain rewinds to a historical point and re-imports the blocks on top.

Since the node is already synced and started to accept transactions previously, these transactions are still kept in the txpool and verified by txpool with a live state. This live state is constructed based on the live trie database, which is changed fast by node referencing and de-referencing.

Unfortunately, when we construct a live state(like the state in txpool), we don't reference the state we have. The blockchain will garbage collect the intermediate version nodes in another thread which leads the broken live state.

The best solution for this is to forcibly obtain a reference for all live states we create and call release function once it's used up. But it might end up with more junks persisted into disk. Will try to find an elegant solution later in the following PR.

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-09-24 07:45:06 +08:00
.github build: upgrade go to v1.25.1 (#1476) 2025-09-11 16:35:39 +08:00
accounts all: format golang files (#1548) 2025-09-21 19:41:54 +08:00
assets/images update README and include a logo photo 2022-07-24 21:44:58 +10:00
beacon beacon/types: add beacon chain data types (#27292) 2024-12-28 09:06:31 +08:00
bmt all: fix white space (#1529) 2025-09-21 19:01:34 +08:00
build go.mod: add tool section in module file #32598 (#1513) 2025-09-21 18:54:30 +08:00
cicd fix 2025-09-20 17:56:20 +04:00
cmd cmd: replace passPHRASE with passWORD in any user interactions #19932 (#1535) 2025-09-21 19:31:00 +08:00
common common: remove duplicate test cases #32624 (#1556) 2025-09-22 20:43:50 +08:00
consensus Merge pull request #1493 from XinFinOrg/fix-rewardhash 2025-09-23 12:49:12 +04:00
console console: fix the wrong error msg of datadir testcase #29183 (#1540) 2025-09-21 19:37:32 +08:00
containers/docker containers: drop vagrant support, noone's maintaining it 2018-03-14 13:23:40 +02:00
contracts all: remove deprecated uses of math.rand #26710 (#1549) 2025-09-22 20:42:14 +08:00
core core/state, trie: fix trie flush order for proper pruning #25581 (#1112) 2025-09-24 07:44:22 +08:00
crypto all: format golang files (#1548) 2025-09-21 19:41:54 +08:00
docker all: normalize flag's name 2024-11-25 16:39:29 +08:00
docs docs: update jsonrpc api document (#1468) 2025-09-11 08:45:23 +08:00
eth all: format golang files (#1548) 2025-09-21 19:41:54 +08:00
ethclient internal/ethapi: add block overrides to eth_call #26414 (#1332) 2025-09-09 14:39:59 +08:00
ethdb all: fix goimports (#1495) 2025-09-17 08:15:43 +08:00
ethstats ethstats: use timer instead of time.After in loops #29241 (#1454) 2025-09-13 10:06:25 +08:00
event all: remove deprecated uses of math.rand #26710 (#1549) 2025-09-22 20:42:14 +08:00
genesis all: update parameters for rollback 2025-04-12 11:38:27 +08:00
internal cmd, console, internal: support interrupting the js console #23387 (#1533) 2025-09-21 19:23:41 +08:00
log log: fix SetDefault for custom loggers #31368 (#1511) 2025-09-17 08:28:13 +08:00
metrics metrics: fix some typos in comments and names #31023 (#1557) 2025-09-22 20:44:29 +08:00
miner all: fix misspell (#1510) 2025-09-17 08:27:52 +08:00
node cmd, node, p2p: implement whitelist and blacklist for peers (#1331) 2025-08-20 15:14:56 +08:00
p2p all: remove deprecated uses of math.rand #26710 (#1549) 2025-09-22 20:42:14 +08:00
params style: change limitPenaltyEpoch in config to real meaning, avoid +1 (#1538) 2025-09-19 13:43:31 -07:00
rlp rlp: remove duplicate optionalAndTailField test case #32614 (#1515) 2025-09-17 08:48:19 +08:00
rpc all: format golang files (#1548) 2025-09-21 19:41:54 +08:00
swarm remove swarm as unused like eth 2024-05-13 21:34:40 +08:00
tests all: rename ChainId to ChainID #16853 (#1456) 2025-09-09 22:54:34 +08:00
trie trie: cleanup stateTrie #25640 (#1113) 2025-09-24 07:45:06 +08:00
XDCx XDCx: remove unused functions and variables (#1530) 2025-09-21 19:02:21 +08:00
XDCxDAO XDCx: remove unused functions and variables (#1530) 2025-09-21 19:02:21 +08:00
XDCxlending all: remove deprecated uses of math.rand #26710 (#1549) 2025-09-22 20:42:14 +08:00
.dockerignore dockerignore, internal/build: forward correct git folder 2017-11-12 22:52:41 +02:00
.gitattributes FIx Bad block error. 2021-09-17 17:59:06 +05:30
.gitignore build: support golangci-lint v1.63.4 2025-01-11 23:56:59 +08:00
.golangci.yml build: upgrade golangci-lint to v2.0.2 #31530 (#1466) 2025-09-10 17:22:29 +08:00
COPYING all: update license information 2015-07-07 14:12:44 +02:00
COPYING.LESSER all: update license information 2015-07-07 14:12:44 +02:00
Dockerfile build: fix BAD BLOCK error for consensus v1 and Go v1.24 v1.25 (#1482) 2025-09-12 09:52:52 +08:00
Dockerfile.bootnode build: fix BAD BLOCK error for consensus v1 and Go v1.24 v1.25 (#1482) 2025-09-12 09:52:52 +08:00
Dockerfile.node build: fix BAD BLOCK error for consensus v1 and Go v1.24 v1.25 (#1482) 2025-09-12 09:52:52 +08:00
go.mod go.mod: clean go.mod (#1553) 2025-09-22 20:43:20 +08:00
go.sum build/tools, go.mod: remove go-bindata #24744 (#1512) 2025-09-17 08:41:41 +08:00
interfaces.go ethclient: fix unmarshaling of ethereum.SyncProgress #24199 (#1367) 2025-08-22 16:41:28 +08:00
Makefile build: upgrade go to v1.25.1 (#1476) 2025-09-11 16:35:39 +08:00
README.md docs: add document for JSONRPC API (#1027) 2025-05-19 15:30:52 +08:00

XDPoSChain

XinFin XDPoSchain
Enterprise ready hybrid blockchain for global trade and finance


XinFin Hybrid Blockchain

XinFin Hybrid Blockchain is an Enterprise ready Blockchain for global trade and finance

Visit: XinFin.org Contribute: Developer Docs

XinFin Network XDPoS is community driven project to achieve the following

  • XinFin DPOS (XDPoS) consensus that selects 108 set of Masternodes to achieve a high throughput Energy efficient consensus with instant block finality

  • KYC Enforcement on Masternodes for Enterprise Adoption and compliance

  • Ability to port/relay limited set of data and transactions from privacy channels to public channel

  • Interoperability between applications hosted on Private Blockchains like Corda, Hyperledger, Quorum(JP Morgan) using relayers to XinFin Network

  • Customer Centric and consortium driven Governance to equally benefit the validators as well as providing comfort for large scale enterprise applications to be hosted on the Network. This achieves

    • Rapid Upgradability

    • DApps Standardisation for rapid commercialisation

    • Compliance with major global jurisdictions.

KYC for masternodes

OVERVIEW

To add a layer of KYC for masternodes in the current system and a sense of ownership amongst the masternodes hence tying such a cluster of masternodes to physical entity which can held accountable for its actions.

Design

We established a bidirectional connection between a candidate and its owner inorder to retrieve a candidate belonging to a specific owner & vice versa.

All the masternodes are recognized by the KYC of their owners and hence are considered as a single verified entity ( for eg. while voting for invalid KYC, only one vote is considered per such cluster )

The contract is very strict in handing out penalty for invalid KYC, it results loss of all funds invested in all of its candidates.

For eg. say A proposes condidates B,C,D by paying for its proposal cost. If at a later stage if some predecided amount of owners ( investors ) vote that a KYC for a A is invalid then A & all of its candidates (B,C,D) will lose their position & all their funds will be lost ( will remain with contract wallet ).

Documents

Document

For developers

Continues integration & delivery

See https://github.com/XinFinOrg/XDPoSChain/tree/dev-upgrade/cicd

To contribute

Simple create a pull request along with proper reasoning, we'll get back to you.

Our Channels : Telegram Developer Group or XDC.Dev