This commit simplifies the transaction pool's gas price validation logic while maintaining network security through the existing minimum gas price requirement. Changes: - Set default PriceLimit to 0 (was 1), allowing transactions with zero tip - Remove PriceLimit >= 1 validation in config sanitization - Simplify Pending() method by using EffectiveGasTipIntCmp consistently - Unify validateTxBasics() logic to use GasTipCapIntCmp for all transactions Key Points: 1. Economic Protection: All transactions still require gasPrice >= 12.5 Gwei (enforced by GetMinGasPrice check in validateTx), providing sufficient protection against DoS attacks even with zero tip. 2. Miner Incentives: Since XDPoSChain includes baseFee in miner rewards (unlike standard EIP-1559), miners still earn the full gasPrice even when tip is 0. This maintains miner revenue while allowing greater flexibility. 3. Special Transactions: BlockSigner and Randomize contract transactions remain exempt from gas price checks, as they are critical for consensus. 4. Code Quality: Reduces complexity by 11 lines and unifies validation logic, making the codebase more maintainable. Security Analysis: - No nil pointer risks: EffectiveGasTipIntCmp has built-in nil handling - No DoS vulnerability: 12.5 Gwei minimum ensures economic cost per transaction - EIP-1559 compatible: Existing minGasPrice check covers all validation needs - Backward compatible: Only relaxes restrictions, doesn't break existing behavior This change benefits system transactions and special use cases while maintaining all existing security guarantees through the network's minimum gas price floor. |
||
|---|---|---|
| .github | ||
| accounts | ||
| assets/images | ||
| beacon | ||
| bmt | ||
| build | ||
| cicd | ||
| cmd | ||
| common | ||
| consensus | ||
| console | ||
| containers/docker | ||
| contracts | ||
| core | ||
| crypto | ||
| docker | ||
| docs | ||
| eth | ||
| ethclient | ||
| ethdb | ||
| ethstats | ||
| event | ||
| genesis | ||
| internal | ||
| log | ||
| metrics | ||
| miner | ||
| node | ||
| p2p | ||
| params | ||
| rlp | ||
| rpc | ||
| tests | ||
| trie | ||
| version | ||
| XDCx | ||
| XDCxDAO | ||
| XDCxlending | ||
| .dockerignore | ||
| .gitattributes | ||
| .gitignore | ||
| .golangci.yml | ||
| .pre-commit-config.yaml | ||
| COPYING | ||
| COPYING.LESSER | ||
| Dockerfile | ||
| Dockerfile.bootnode | ||
| Dockerfile.node | ||
| go.mod | ||
| go.sum | ||
| interfaces.go | ||
| Makefile | ||
| README.md | ||
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
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