Go implementation of the Ethereum protocol
Find a file
Daniel Liu bfbb024dc4
core/vm/program: evm bytecode-building utility #30725 (#1801)
In many cases, there is a need to create somewhat nontrivial bytecode. A
recent example is the verkle statetests, where we want a `CREATE2`- op
to create a contract, which can then be invoked, and when invoked does a
selfdestruct-to-self.

It is overkill to go full solidity, but it is also a bit tricky do
assemble this by concatenating bytes. This PR takes an approach that
has been used in in goevmlab for several years.

Using this utility, the case can be expressed as:
```golang
	// Some runtime code
	runtime := program.New().Ops(vm.ADDRESS, vm.SELFDESTRUCT).Bytecode()
	// A constructor returning the runtime code
	initcode := program.New().ReturnData(runtime).Bytecode()
	// A factory invoking the constructor
	outer := program.New().Create2AndCall(initcode, nil).Bytecode()
```

We have a lot of places in the codebase where we concatenate bytes, cast
from `vm.OpCode` . By taking tihs approach instead, thos places can be made a
bit more maintainable/robust.

Co-authored-by: Martin HS <martin@swende.se>
2025-12-08 13:01:55 +05:30
.github build: upgrade go to v1.25.1 (#1476) 2025-09-11 16:35:39 +08:00
accounts all: use slices.Sort() to sort strings (#1712) 2025-12-07 15:49:13 +05:30
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 bmt: fix unused warnings (#1825) 2025-12-08 12:52:37 +05:30
build Makefile, build: remove unused xgo (#1812) 2025-12-08 12:58:22 +05:30
cicd consensus, params: remove SkipV2Validation, close XFN-151 (#1730) 2025-11-14 21:53:05 +05:30
cmd cmd: remove slave mode and flag XDCSlaveModeFlag (#1824) 2025-12-08 12:53:05 +05:30
common all: use 0x-prefix for Address type in log (#1830) 2025-12-07 15:36:36 +05:30
consensus consensus: fix unused warnings (#1815) 2025-12-08 12:57:14 +05:30
console all: use slices.Sort() to sort strings (#1712) 2025-12-07 15:49:13 +05:30
containers/docker containers: drop vagrant support, noone's maintaining it 2018-03-14 13:23:40 +02:00
contracts all: use 0x-prefix for Address type in log (#1830) 2025-12-07 15:36:36 +05:30
core core/vm/program: evm bytecode-building utility #30725 (#1801) 2025-12-08 13:01:55 +05:30
crypto crypto: validate hash length in nocgo Sign #33104 (#1773) 2025-11-14 20:10:48 +05:30
docker all: normalize flag's name 2024-11-25 16:39:29 +08:00
docs core, docs: add solidity document, close XFN-68 (#1670) 2025-11-14 16:25:42 +05:30
eth eth/ethconfig: update file gen_config.go (#1822) 2025-12-08 12:54:20 +05:30
ethclient internal/ethapi: eth_simulateV1 #27720 (#1606) 2025-11-08 16:09:18 +05:30
ethdb all: use slices.Sort() to sort strings (#1712) 2025-12-07 15:49:13 +05:30
ethstats all: fix whitespace error of golangci-lint, remove extra empty lines (#1676) 2025-11-17 11:16:09 +05:30
event all: use WaigGroup.Go() to simplify code (#1699) 2025-11-29 17:17:08 +05:30
genesis consensus, params: remove SkipV2Validation, close XFN-151 (#1730) 2025-11-14 21:53:05 +05:30
internal Makefile, build: remove unused xgo (#1812) 2025-12-08 12:58:22 +05:30
log all: replace strings.Split with more efficient strings.SplitSeq (#1698) 2025-12-07 15:42:23 +05:30
metrics cmd/XDC, metrics/prometheus: fix staticcheck QF1012 (#1713) 2025-12-07 16:03:06 +05:30
miner all: rework trc21 (#1777) 2025-11-18 11:24:56 +05:30
node all: use slices.Sort() to sort strings (#1712) 2025-12-07 15:49:13 +05:30
p2p p2p: fix unused warnings (#1804) 2025-12-08 13:01:07 +05:30
params params: refactor Description() for ChainConfig (#1697) 2025-12-07 15:40:07 +05:30
rlp all: use slices.Sort() to sort strings (#1712) 2025-12-07 15:49:13 +05:30
rpc all: replace strings.Split with more efficient strings.SplitSeq (#1698) 2025-12-07 15:42:23 +05:30
tests tests: delete unused parameter (#1819) 2025-12-08 12:55:54 +05:30
trie trie: use slices package for sorting #27496 (#1703) 2025-12-07 15:43:53 +05:30
version all: upgrade package version #30638 (#1745) 2025-11-15 16:46:54 +05:30
XDCx all: use 0x-prefix for Address type in log (#1830) 2025-12-07 15:36:36 +05:30
XDCxDAO all: fix whitespace error of golangci-lint, remove extra empty lines (#1676) 2025-11-17 11:16:09 +05:30
XDCxlending all: use 0x-prefix for Address type in log (#1830) 2025-12-07 15:36:36 +05:30
.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
.pre-commit-config.yaml docs: implement git client hook for developers, close #1578 (#1584) 2025-10-08 12:32:26 +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 add default env to runtime image 2025-09-25 15:52:05 +04:00
Dockerfile.bootnode add default env to runtime image 2025-09-25 15:52:05 +04:00
Dockerfile.node add default env to runtime image 2025-09-25 15:52:05 +04:00
go.mod go.mod: tidy go mod file (#1821) 2025-12-08 12:55:12 +05:30
go.sum update package version: 2025-10-07 15:28:17 +04:00
interfaces.go ethclient: fix unmarshaling of ethereum.SyncProgress #24199 (#1367) 2025-08-22 16:41:28 +08:00
Makefile Makefile, build: remove unused xgo (#1812) 2025-12-08 12:58:22 +05:30
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