<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Developers Forum for XinFin XDC Network: Gary</title>
    <description>The latest articles on Developers Forum for XinFin XDC Network by Gary (@gary).</description>
    <link>https://www.xdc.dev/gary</link>
    <image>
      <url>https://www.xdc.dev/images/amdZ-aBQ1VVTJcdF4H7wCAeL1T6kypBLVM9HM6omS4o/rs:fill:90:90/mb:500000/ar:1/aHR0cHM6Ly93d3cu/eGRjLmRldi91cGxv/YWRzL3VzZXIvcHJv/ZmlsZV9pbWFnZS8x/NjkvMTI3YTc2YWUt/YzE3OS00NzQxLThm/NTktZGI0ZTJkOGZl/NmYyLmpwZWc</url>
      <title>Developers Forum for XinFin XDC Network: Gary</title>
      <link>https://www.xdc.dev/gary</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://www.xdc.dev/feed/gary"/>
    <language>en</language>
    <item>
      <title>Securing XDC with Post-Quantum Signatures</title>
      <dc:creator>Gary</dc:creator>
      <pubDate>Sat, 16 Aug 2025 14:31:36 +0000</pubDate>
      <link>https://www.xdc.dev/gary/securing-xdc-with-post-quantum-signatures-2j86</link>
      <guid>https://www.xdc.dev/gary/securing-xdc-with-post-quantum-signatures-2j86</guid>
      <description>&lt;p&gt;This proposal for making XDC post-quantum (PQ) secure encompasses three key components: consensus layer, transaction layer, and DApp layer. The consensus layer involves upgrading signatures within XDC 2.0 (replacing ECDSA), the transaction layer introduces new PQ-signed transaction types, and the DApp layer implements PQ cryptography within the EVM.&lt;/p&gt;

&lt;h2&gt;
  
  
  Upgrade Workflow
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Consensus Layer
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Deploy a smart contract for PQ public key registration. The smart contract maintains a map from existing addresses to PQ public keys, allowing nodes to maintain existing addresses while adopting PQ keys. Note: this preserves masternode addresses during the transition.&lt;/li&gt;
&lt;li&gt;Implement PQ signatures in consensus V2 for block headers, votes, timeouts, QCs and TCs. Signature verification will utilize the registration contract to retrieve PQ public keys.&lt;/li&gt;
&lt;li&gt;Require all masternodes and observers to register PQ public keys. Schedule a hard fork to activate PQ signatures and disable ECC in consensus operations.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Transaction Layer
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Introduce PQ signatures at the transaction layer through new transaction types, leveraging the existing registration contract.&lt;/li&gt;
&lt;li&gt;Integrate PQ signatures into wallet toolkits (e.g., MetaMask). &lt;em&gt;Note: Significant development effort required.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Schedule a hard fork to enable PQ signatures while maintaining legacy signature support for compatibility.&lt;/li&gt;
&lt;li&gt;Facilitate wallet migration by allowing users to register PQ public keys while retaining their existing addresses.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  DApp Layer
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Implement PQ signatures in virtual machine precompiles. &lt;em&gt;Note: Substantial development effort; recommended to coordinate with Ethereum core developers.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Enable DApp migration through smart contract upgrades incorporating PQ signatures. &lt;em&gt;Note: Significant implementation requirements.&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Implementation Challenges
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Performance Considerations&lt;/strong&gt;: PQ signatures may increase block size by 10-100x.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backward Compatibility&lt;/strong&gt;: Legacy signatures will coexist with PQ signatures, requiring user action for full PQ security.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Comment on Account Abstraction
&lt;/h2&gt;

&lt;p&gt;Contrary to some Ethereum community perspectives, account abstraction alone cannot achieve full PQ security. While account abstraction offers flexibility for users' PQ implementation, the bundler still requires PQ-secure implementation at the transaction layer. &lt;/p&gt;

&lt;h2&gt;
  
  
  Analysis
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Implementation Roadmap
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Timeframe&lt;/th&gt;
&lt;th&gt;Ecosystem Impact&lt;/th&gt;
&lt;th&gt;User Experience&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Consensus&lt;/td&gt;
&lt;td&gt;Major consensus change (~2-3 years)&lt;/td&gt;
&lt;td&gt;Seamless for masternodes&lt;/td&gt;
&lt;td&gt;Mandatory upgrade&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Transaction&lt;/td&gt;
&lt;td&gt;Comparable to EIP-1559 (~2 years)&lt;/td&gt;
&lt;td&gt;Moderate impact for upgraders&lt;/td&gt;
&lt;td&gt;Optional transition&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DApp&lt;/td&gt;
&lt;td&gt;Dependent on Ethereum timeline&lt;/td&gt;
&lt;td&gt;Moderate impact for upgraders&lt;/td&gt;
&lt;td&gt;Developer discretion&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The consensus layer upgrade requires 2-3 years for implementation while maintaining seamless operation for masternodes, though it will require every masternode's participation. The transaction layer implementation, comparable in scope to Ethereum's EIP-1559 with an estimated 2-year timeline, will have moderate ecosystem impact limited to users who choose to upgrade. DApp layer remains contingent on Ethereum's development timeline, similarly offering optional adoption for developers while maintaining moderate ecosystem impact.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cryptographic Options
&lt;/h3&gt;

&lt;p&gt;Three NIST-standardized PQ signatures currently exist: FALCON, Dilithium (ML-DSA), and SPHINCS. Community discussions on Ethereum forums indicate FALCON as the preferred option. However, with NIST continuing to evaluate additional PQ signatures, final selection remains premature.&lt;/p&gt;

&lt;h2&gt;
  
  
  Proof of Concept on XDC codebase
&lt;/h2&gt;

&lt;p&gt;We have implemented a proof-of-concept of consensus layer post-quantum signature demonstrating Falcon signatures for both block signing and consensus quorum certificate (QC) signing. Benchmark results for verifying a block with no transaction show:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Verification time&lt;/strong&gt;: 0.138 ms per operation, with Falcon signature verification as the primary computational cost&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Block size components&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Block signature: 652 bytes&lt;/li&gt;
&lt;li&gt;Extra data (including Falcon signatures with corresponding signer addresses): 49562 bytes for 73 masternodes&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As a comparison, current XDC's block verification takes 0.017 ms and signature is 65 bytes. Extra data is around 5000 bytes.&lt;/p&gt;

&lt;p&gt;This PoC confirms the technical feasibility of implementing post-quantum signatures in our consensus mechanism, as well as the block size concern.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hardware Environment
&lt;/h3&gt;

&lt;p&gt;The benchmark is performed in the following environment.&lt;/p&gt;

&lt;p&gt;​​- OS​​: Windows 10 (64-bit)&lt;br&gt;
​​- CPU​​: Intel Core i5-10600KF @ 4.10GHz (6 cores, 12 threads)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;​​Memory​​: 64GB @ 2667MHz&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Codebase Implementation
&lt;/h3&gt;

&lt;p&gt;The proof-of-concept implementation is available in the &lt;a href="https://github.com/XinFinOrg/XDPoSChain/tree/poc_falcon"&gt;https://github.com/XinFinOrg/XDPoSChain/tree/poc_falcon&lt;/a&gt; under the &lt;code&gt;poc_falcon&lt;/code&gt; branch.&lt;/p&gt;
&lt;h4&gt;
  
  
  Reproduction Instructions
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Golang environment&lt;/li&gt;
&lt;li&gt;Windows system (for direct execution) OR Falcon compilation tools for other platforms&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Setup Process:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;For Windows Systems:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git clone &lt;span class="nt"&gt;-b&lt;/span&gt; poc_falcon https://github.com/XinFinOrg/XDPoSChain.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;For Non-Windows Systems:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git clone &lt;span class="nt"&gt;-b&lt;/span&gt; poc_falcon https://github.com/XinFinOrg/XDPoSChain.git
   git clone https://github.com/zhenfeizhang/falcon-go.git
   &lt;span class="nb"&gt;cd &lt;/span&gt;falcon-go &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; make
   &lt;span class="nb"&gt;cp&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; c falcon ../XDPoSChain/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Execution:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;XDPoSChain
go &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;-benchmem&lt;/span&gt; &lt;span class="nt"&gt;-run&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;^&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nt"&gt;-bench&lt;/span&gt; ^BenchmarkVerifyHeaderFalcon&lt;span class="nv"&gt;$ &lt;/span&gt;github.com/XinFinOrg/XDPoSChain/consensus/tests/engine_v2_tests
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The proposed post-quantum security implementation for XDC is technically feasible but requires fundamental, full-stack change. The decision among emerging post-quantum cryptographic algorithms remains premature. &lt;/p&gt;

&lt;h2&gt;
  
  
  Appendix
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Ethereum's Roadmap
&lt;/h2&gt;

&lt;p&gt;According to official Ethereum documentation, &lt;strong&gt;full quantum resistance for core protocols remains in the research phase and may require several years for implementation&lt;/strong&gt; (&lt;a href="https://ethereum.org/en/roadmap/future-proofing/"&gt;https://ethereum.org/en/roadmap/future-proofing/&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;Key discussions from ethresearch:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://ethresear.ch/t/so-you-wanna-post-quantum-ethereum-transaction-signature/21291"&gt;https://ethresear.ch/t/so-you-wanna-post-quantum-ethereum-transaction-signature/21291&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ethresear.ch/t/falcon-as-an-ethereum-transaction-signature-the-good-the-bad-and-the-gnarly/21512"&gt;https://ethresear.ch/t/falcon-as-an-ethereum-transaction-signature-the-good-the-bad-and-the-gnarly/21512&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ethresear.ch/t/the-road-to-post-quantum-ethereum-transaction-is-paved-with-account-abstraction-aa/21783"&gt;https://ethresear.ch/t/the-road-to-post-quantum-ethereum-transaction-is-paved-with-account-abstraction-aa/21783&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;The third reference proved particularly insightful, demonstrating that account abstraction alone cannot resolve the fundamental PQ security challenge, as bundler transactions remain dependent on ECDSA signatures.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>🔄 Proposal: XDC Network Reward Mechanism Upgrade</title>
      <dc:creator>Gary</dc:creator>
      <pubDate>Mon, 21 Apr 2025 13:40:27 +0000</pubDate>
      <link>https://www.xdc.dev/gary/proposal-xdc-network-reward-mechanism-upgrade-3kkc</link>
      <guid>https://www.xdc.dev/gary/proposal-xdc-network-reward-mechanism-upgrade-3kkc</guid>
      <description>&lt;p&gt;The XDC Network is evolving — and so is its reward mechanism.&lt;/p&gt;

&lt;p&gt;This article outlines a detailed proposal to upgrade how rewards are calculated and distributed in the XDC Network’s XDC 2.0’s Consensus. This builds on our earlier discussion and introduces new logic to better recognize node contributions while preparing the network for future security and scalability.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🧠 Background: How Rewards Work Today&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In the current XDC Network’s consensus model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rewards are distributed every epoch&lt;/strong&gt;, not every block.
&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;epoch&lt;/strong&gt; equals 900 blocks (XDC 1.0) or 900 rounds (XDC 2.0).
&lt;/li&gt;
&lt;li&gt;At the start of each epoch, a total reward (currently 5000 XDC) is allocated, defined by the parameter &lt;code&gt;XDPoSConfig.Reward&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;🔧 Current Reward Flow (3 Steps):&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Count Contributions&lt;/strong&gt;: Only block signers who were Master Nodes are counted.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Calculate Reward&lt;/strong&gt;: The protocol uses a fixed reward per epoch (e.g., 5000 XDC).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Distribute Rewards&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;90% to the &lt;strong&gt;owner&lt;/strong&gt; of each contributing signer
&lt;/li&gt;
&lt;li&gt;10% to the &lt;strong&gt;Foundation Wallet&lt;/strong&gt; (xdc92a289fe95a85c53b8d0d113cbaef0c1ec98ac65)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🚀 What’s Changing: Introducing Protector &amp;amp; Observer Nodes&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;We're proposing a &lt;strong&gt;multi-tiered node reward system&lt;/strong&gt;, where &lt;em&gt;three types of nodes&lt;/em&gt; will now receive fixed, per-node rewards based on their rank and contribution:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;th&gt;Rank by Stake Cap&lt;/th&gt;
&lt;th&gt;Total Nodes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Master Nodes&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1 – 108&lt;/td&gt;
&lt;td&gt;108&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Protector Nodes&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;109 – 324&lt;/td&gt;
&lt;td&gt;216&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Observer Nodes&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;325 – 1324&lt;/td&gt;
&lt;td&gt;1000&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each role will have a predefined per-epoch reward — but only if they &lt;em&gt;actively contribute&lt;/em&gt; to network health.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;💰 Proposed Per-Epoch Rewards&lt;/strong&gt;
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;th&gt;XDC Contribution&lt;/th&gt;
&lt;th&gt;Annual Rewards&lt;/th&gt;
&lt;th&gt;Approx. Per Epoch Reward&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Master Node&lt;/td&gt;
&lt;td&gt;10,000,000 XDC&lt;/td&gt;
&lt;td&gt;1,000,000 XDC&lt;/td&gt;
&lt;td&gt;≈ &lt;strong&gt;57&lt;/strong&gt; XDC&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Protector Node&lt;/td&gt;
&lt;td&gt;10,000,000 XDC&lt;/td&gt;
&lt;td&gt;800,000 XDC&lt;/td&gt;
&lt;td&gt;≈ &lt;strong&gt;45&lt;/strong&gt; XDC&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Observer Node&lt;/td&gt;
&lt;td&gt;10,000,000 XDC&lt;/td&gt;
&lt;td&gt;400,000 XDC&lt;/td&gt;
&lt;td&gt;≈ &lt;strong&gt;23&lt;/strong&gt; XDC&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This is a &lt;strong&gt;major shift&lt;/strong&gt; — rewards are now fixed &lt;strong&gt;per contributing node&lt;/strong&gt;, rather than dynamically split.&lt;/p&gt;

&lt;p&gt;Technically, no restriction to Contribute more XDC compared to 10,000,000 XDC to become a Masternode or protector node but Per EPoch Rewards will remain the same. Higher XDC contribution increases probability to be masternode as timestamp based validation will be replaced with new updates which includes XDC Contribution, Timestamp (to check longevity of node), Hardware/ Network resources allocated to the Masternode/Protector Node/Observer Node. &lt;/p&gt;

&lt;p&gt;⚠️ Inactive nodes (no contribution during epoch) will receive &lt;strong&gt;no rewards&lt;/strong&gt; also provision of penalty to serve few epoch before start getting rewards. &lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🔍 Technical Enhancements&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The new configuration will be managed via the upgraded V2Config struct:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type V2Config struct {  
    MasternodeReward     float64 `json:"masternodeReward"`  
    ProtectorReward      float64 `json:"protectorReward"`  
    ObserverReward       float64 `json:"observerReward"`  
    MaxProtectorNodes    int    `json:"maxProtectorNodes"`  
    MaxObserverNodes     int    `json:"maxObserverNodes"`  
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Implementation Steps:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Pull candidates from the parent state of the epoch switch block.
&lt;/li&gt;
&lt;li&gt;Rank by &lt;strong&gt;Candidate Cap&lt;/strong&gt; (stake from owner + voters).
&lt;/li&gt;
&lt;li&gt;Assign roles (Master, Protector, Observer).
&lt;/li&gt;
&lt;li&gt;Distribute fixed rewards to the &lt;strong&gt;owner&lt;/strong&gt; of each &lt;strong&gt;contributing&lt;/strong&gt; node. Also distribute rewards to the &lt;strong&gt;Foundation Wallet&lt;/strong&gt; according to the &lt;strong&gt;90/10 split&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;📈 Future-Proofing the Network&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;While the reward values proposed are grounded in staking math and real-world logic, &lt;strong&gt;they are subject to change&lt;/strong&gt; based on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Transaction volume
&lt;/li&gt;
&lt;li&gt;Network activity
&lt;/li&gt;
&lt;li&gt;Validator participation
&lt;/li&gt;
&lt;li&gt;New edge cases that emerge in production&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🌟 Why This Is Unique&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This model introduces a &lt;strong&gt;first-of-its-kind&lt;/strong&gt;, &lt;strong&gt;tiered validator reward system&lt;/strong&gt; in the blockchain space.&lt;/p&gt;

&lt;p&gt;To our knowledge, &lt;strong&gt;no other blockchain&lt;/strong&gt; has implemented a structure that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Recognizes not just core validators, but &lt;em&gt;mid-tier and observer nodes&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Distributes &lt;strong&gt;fixed per-node&lt;/strong&gt; rewards based on participation
&lt;/li&gt;
&lt;li&gt;Provides room for &lt;strong&gt;adaptive scalability&lt;/strong&gt; via upgradable node caps and reward values&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But with innovation comes risk:&lt;/p&gt;

&lt;p&gt;⚠️ As this model is unprecedented, &lt;strong&gt;no guarantee&lt;/strong&gt; exists that it will work flawlessly in all conditions.&lt;br&gt;&lt;br&gt;
 High network traffic, edge-case validator behaviors, and real-world operations may necessitate future refinements.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🧪 Security &amp;amp; Activation&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This upgrade will be rolled out as a &lt;strong&gt;hard fork&lt;/strong&gt;, requiring:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;full security audit&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rigorous testnet simulations&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;A clearly defined activation block (e.g., &lt;code&gt;TIPUpgradeReward \= big.NewInt(XXXX)&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🧩 Final Thoughts&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The XDC Network is on a journey of rapid technical innovation. This reward upgrade is a big leap forward — one that honors contribution, encourages decentralization, and positions XDC for long-term sustainability.&lt;/p&gt;

&lt;p&gt;We welcome feedback from developers, node operators, and community members to refine this proposal before implementation.&lt;/p&gt;

&lt;p&gt;Let’s build the future of contribute-based reward systems — together.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Please note&lt;/strong&gt;: There is nothing new in this proposal — it simply reinforces the original vision that has been in place since day one. We are not changing anything, only aligning the implementation more closely with XDC’s core principles.&lt;/p&gt;




&lt;p&gt;✍️ &lt;em&gt;Questions or thoughts? Comment below.&lt;/em&gt;  &lt;/p&gt;

</description>
      <category>xdc</category>
      <category>blockchain</category>
      <category>reward</category>
      <category>governance</category>
    </item>
    <item>
      <title>[Informative] Block Structure in XDPoS 2.0</title>
      <dc:creator>Gary</dc:creator>
      <pubDate>Sat, 02 Sep 2023 18:01:14 +0000</pubDate>
      <link>https://www.xdc.dev/gary/block-structure-in-xdc-20-2lo8</link>
      <guid>https://www.xdc.dev/gary/block-structure-in-xdc-20-2lo8</guid>
      <description>&lt;p&gt;Blocks are the core data structure in a blockchain. Each block has a batch of transactions that should be executed. Besides transactions, there are metadata that is crucial to the consensus algorithm, which are stored in block headers. Transactions in XDPoS 2.0 are the same as those in XDPoS 1.0, so this document focuses on block headers. The following sections describe the fields of block headers in XDPoS 2.0.&lt;/p&gt;

&lt;h2&gt;
  
  
  Block Header's Extra Data
&lt;/h2&gt;

&lt;p&gt;XDPoS 2.0 requires the block header to carry extra consensus data. The &lt;code&gt;extra_data&lt;/code&gt; field of the block header is an ideal place for this purpose because it does not cause breaking changes to the header structure. More specifically, we redefined this field, and in this section we first describe the new structure and also introduce the old structure for completeness.&lt;/p&gt;

&lt;h3&gt;
  
  
  New Fields in Block Header's Extra Data
&lt;/h3&gt;

&lt;p&gt;XDPoS 2.0 requires these new fields in block header's extra data:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field name&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Round&lt;/td&gt;
&lt;td&gt;integer (int64)&lt;/td&gt;
&lt;td&gt;Round is the basic tick of XDPoS2.0' consensus algorithm (chained Hotstuff). Each round has a different and deterministic block proposer (a.k.a. leader) from the master list. This Round is the time when this block is proposed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;QuorumCert&lt;/td&gt;
&lt;td&gt;QuorumCert (described below)&lt;/td&gt;
&lt;td&gt;The quorum certificate (QuorumCert, QC) for the parent block, which consists of the signatures from 2/3 of the master nodes.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These fields are RLP-encoded as bytes and injected into extra data.&lt;/p&gt;

&lt;h4&gt;
  
  
  QuorumCert struct
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Block infos.&lt;/strong&gt; First, a QuorumCert has all the block infos that a vote contains. The infos include the voted block's hash, round, and block number. These three fields are combined into a structure called &lt;code&gt;ProposedBlockInfo&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Signatures.&lt;/strong&gt; Second, it has signatures from 2/3 of the master nodes on these block infos. In practice, it may be a concatenated array of signatures. The signer’s address can be derived from the signature. The signature is secp256k1, which is currently used in XDPoS 1.0. Each signature is 65 bytes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Extra Data of XDPoS 1.0
&lt;/h3&gt;

&lt;p&gt;The extra data in header of XDPoS 1.0 consists of three parts: vanity, signers, and seal. The table below gives a description for them.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Bytes&lt;/th&gt;
&lt;th&gt;Part&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Reason for changing&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;First 32 bytes&lt;/td&gt;
&lt;td&gt;Vanity&lt;/td&gt;
&lt;td&gt;Reserved for fixed unique bytes for each master node.&lt;/td&gt;
&lt;td&gt;Not used in XDPoS.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Middle bytes&lt;/td&gt;
&lt;td&gt;Signers&lt;/td&gt;
&lt;td&gt;The list of master nodes for the coming epoch, whose addresses are concatenated into one byte-array. Non-empty only in checkpoint headers.&lt;/td&gt;
&lt;td&gt;Replaced by &lt;code&gt;header.Validators&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Last 65 bytes&lt;/td&gt;
&lt;td&gt;Seal&lt;/td&gt;
&lt;td&gt;The signature of the block proposer for the block.&lt;/td&gt;
&lt;td&gt;Replaced by &lt;code&gt;header.Validator&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;As you can see in the following sections, the signers and seal part are replaced by other fields in the headers. And the vanity part is removed since it is not used. Therefore, we can have a completely new structure of extra data in XDPoS 2.0.&lt;/p&gt;

&lt;h2&gt;
  
  
  Exsting Header Fields with Updated Definitons
&lt;/h2&gt;

&lt;p&gt;Apart from the extra data, these fields exist in XDPoS 1.0 blocks and we keep these fields but use them in a different way in XDPoS 2.0.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field name&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Before change&lt;/th&gt;
&lt;th&gt;After change&lt;/th&gt;
&lt;th&gt;Reason for changing&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Coinbase&lt;/td&gt;
&lt;td&gt;address&lt;/td&gt;
&lt;td&gt;It’s all zeros.&lt;/td&gt;
&lt;td&gt;Change it to the leader’s (or proposer's) address.&lt;/td&gt;
&lt;td&gt;Convenient to query who is the leader.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Difficulty&lt;/td&gt;
&lt;td&gt;integer (big.Int)&lt;/td&gt;
&lt;td&gt;It’s computed in a function calcDifficulty and adaptively changes.&lt;/td&gt;
&lt;td&gt;Change it to a constant.&lt;/td&gt;
&lt;td&gt;Difficulty is not used in XDPoS 2.0.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Validator&lt;/td&gt;
&lt;td&gt;bytes&lt;/td&gt;
&lt;td&gt;It’s the second signature in XDPoS 1.0.&lt;/td&gt;
&lt;td&gt;Change it to the leader’s signature.&lt;/td&gt;
&lt;td&gt;The second signature is not used in XDPoS 2.0.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Validators&lt;/td&gt;
&lt;td&gt;bytes&lt;/td&gt;
&lt;td&gt;It’s the M1M2 mapping, and only valid if this block is a checkpoint block.&lt;/td&gt;
&lt;td&gt;Change it to the list of master nodes' addresses. The addresses are concatenated into bytes. And it is also only valid if this block is an epoch switch block. If not epoch switch, this is empty bytes.&lt;/td&gt;
&lt;td&gt;The M1M2 mapping is not used in XDPoS 2.0.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Unchanged Fields in Block Headers
&lt;/h2&gt;

&lt;p&gt;These fields are used in the same way as in XDPoS 1.0. No change is needed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  ParentHash&lt;/li&gt;
&lt;li&gt;  UncleHash&lt;/li&gt;
&lt;li&gt;  Root&lt;/li&gt;
&lt;li&gt;  TxHash&lt;/li&gt;
&lt;li&gt;  ReceiptHash&lt;/li&gt;
&lt;li&gt;  Bloom&lt;/li&gt;
&lt;li&gt;  Number&lt;/li&gt;
&lt;li&gt;  GasLimit&lt;/li&gt;
&lt;li&gt;  GasUsed&lt;/li&gt;
&lt;li&gt;  Time&lt;/li&gt;
&lt;li&gt;  MixDigest&lt;/li&gt;
&lt;li&gt;  Nonce&lt;/li&gt;
&lt;li&gt;  Penalties&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Report on fixing CVEs</title>
      <dc:creator>Gary</dc:creator>
      <pubDate>Sun, 14 May 2023 12:21:30 +0000</pubDate>
      <link>https://www.xdc.dev/gary/report-on-fixing-cves-3b40</link>
      <guid>https://www.xdc.dev/gary/report-on-fixing-cves-3b40</guid>
      <description>&lt;p&gt;Our team surveyed go-ethereum (geth) security vulnerabilities on CVE details website (&lt;a href="https://www.cvedetails.com/vulnerability-list/vendor_id-17524/product_id-51210/Ethereum-Go-Ethereum.html"&gt;https://www.cvedetails.com/vulnerability-list/vendor_id-17524/product_id-51210/Ethereum-Go-Ethereum.html&lt;/a&gt;) and spotted several ones that could affect XDC. Here is a list of the vulnerabilities.&lt;/p&gt;

&lt;h1&gt;
  
  
  1. CVE-2022-29177
&lt;/h1&gt;

&lt;p&gt;This vulnerability is about using an index &lt;code&gt;d&lt;/code&gt; of type uint to access an array &lt;code&gt;discReasonToString&lt;/code&gt;, and the index bound check is done by converting &lt;code&gt;d&lt;/code&gt; to &lt;code&gt;int(d)&lt;/code&gt; and checking whether &lt;code&gt;len(discReasonToString) &amp;lt; int(d)&lt;/code&gt;. This check misses the situation where &lt;code&gt;int(d)&lt;/code&gt; could be negative. We fix the check to &lt;code&gt;len(discReasonToString) &amp;lt;= int(d) || int(d) &amp;lt; 0&lt;/code&gt;.&lt;br&gt;
In XDC codebase, our team finds that we cannot use geth fix (ethereum#24507) since modifying &lt;code&gt;DiscReason&lt;/code&gt; to &lt;code&gt;uint8&lt;/code&gt; messes up the message encoding.&lt;br&gt;
Status: Merged into branch dev-upgrade.&lt;br&gt;
Links:&lt;br&gt;
&lt;a href="https://www.cvedetails.com/cve/CVE-2022-29177/"&gt;https://www.cvedetails.com/cve/CVE-2022-29177/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/XinFinOrg/XDPoSChain/pull/242"&gt;https://github.com/XinFinOrg/XDPoSChain/pull/242&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  2. CVE-2021-39137
&lt;/h1&gt;

&lt;p&gt;This vulnerability is caused by pointer misusage in the Go language. It is fixed by using &lt;code&gt;CopyBytes&lt;/code&gt; to copy bytes rather than using the same pointer.&lt;br&gt;
Status: Merged into branch master.&lt;br&gt;
Links:&lt;br&gt;
&lt;a href="https://www.cvedetails.com/cve/CVE-2021-39137/"&gt;https://www.cvedetails.com/cve/CVE-2021-39137/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/XinFinOrg/XDPoSChain/commit/b5abbfed79084fdd188837d645d13db229b2d5d0"&gt;https://github.com/XinFinOrg/XDPoSChain/commit/b5abbfed79084fdd188837d645d13db229b2d5d0&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  3. CVE-2020-26241
&lt;/h1&gt;

&lt;p&gt;This vulnerability is about the wrong implementation of the data copy native contract. It is fixed by using &lt;code&gt;CopyBytes&lt;/code&gt; to copy bytes.&lt;br&gt;
Status: PR created.&lt;br&gt;
Links:&lt;br&gt;
&lt;a href="https://www.cvedetails.com/cve/CVE-2020-26241/"&gt;https://www.cvedetails.com/cve/CVE-2020-26241/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/XinFinOrg/XDPoSChain/pull/255"&gt;https://github.com/XinFinOrg/XDPoSChain/pull/255&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  4. CVE-2018-16733
&lt;/h1&gt;

&lt;p&gt;This vulnerability is about the attacker using incorrect starting and ending block numbers to trace blocks. If the starting block number is larger than the ending one, the program would be stuck in an infinite loop. We fix it by checking the starting and ending block numbers.&lt;br&gt;
Status: PR created.&lt;br&gt;
Links:&lt;br&gt;
&lt;a href="https://www.cvedetails.com/cve/CVE-2018-16733/"&gt;https://www.cvedetails.com/cve/CVE-2018-16733/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/XinFinOrg/XDPoSChain/pull/251/files"&gt;https://github.com/XinFinOrg/XDPoSChain/pull/251/files&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  5. CVE-2018-12018
&lt;/h1&gt;

&lt;p&gt;This vulnerability is about the attacker using a negative &lt;code&gt;skip&lt;/code&gt; number to cause an infinite loop. We fix it by checking the &lt;code&gt;skip&lt;/code&gt; number.&lt;br&gt;
Links:&lt;br&gt;
&lt;a href="https://www.cvedetails.com/cve/CVE-2018-12018/"&gt;https://www.cvedetails.com/cve/CVE-2018-12018/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/XinFinOrg/XDPoSChain/pull/250"&gt;https://github.com/XinFinOrg/XDPoSChain/pull/250&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Unrelated CVEs
&lt;/h1&gt;

&lt;p&gt;These CVEs are unrelated since it does not exist in XDC:&lt;br&gt;
&lt;a href="https://www.cvedetails.com/cve/CVE-2018-19184/"&gt;https://www.cvedetails.com/cve/CVE-2018-19184/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.cvedetails.com/cve/CVE-2020-26264/"&gt;https://www.cvedetails.com/cve/CVE-2020-26264/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.cvedetails.com/cve/CVE-2021-41173/"&gt;https://www.cvedetails.com/cve/CVE-2021-41173/&lt;/a&gt;&lt;br&gt;
These CVEs are unrelated since they are about ethash consensus and XDC uses XDPoS consensus:&lt;br&gt;
&lt;a href="https://www.cvedetails.com/cve/CVE-2022-37450/"&gt;https://www.cvedetails.com/cve/CVE-2022-37450/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.cvedetails.com/cve/CVE-2021-42219/"&gt;https://www.cvedetails.com/cve/CVE-2021-42219/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.cvedetails.com/cve/CVE-2020-26240/"&gt;https://www.cvedetails.com/cve/CVE-2020-26240/&lt;/a&gt;&lt;br&gt;
This CVE is solved by using the latest Go language:&lt;br&gt;
&lt;a href="https://www.cvedetails.com/cve/CVE-2020-26242/"&gt;https://www.cvedetails.com/cve/CVE-2020-26242/&lt;/a&gt;&lt;br&gt;
This CVE is solved automatically since we have a gas limit for blocks:&lt;br&gt;
&lt;a href="https://www.cvedetails.com/cve/CVE-2018-20421/"&gt;https://www.cvedetails.com/cve/CVE-2018-20421/&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Proposal on EVM upgrade</title>
      <dc:creator>Gary</dc:creator>
      <pubDate>Sun, 06 Nov 2022 15:32:31 +0000</pubDate>
      <link>https://www.xdc.dev/gary/proposal-on-evm-upgrade-532m</link>
      <guid>https://www.xdc.dev/gary/proposal-on-evm-upgrade-532m</guid>
      <description>&lt;p&gt;This article analyzes the feasibility of upgrading Xinfin network's EVM to Ethereum latest EVM. There are three types of potential upgrades:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;feature upgrade,&lt;/li&gt;
&lt;li&gt;bug fix,&lt;/li&gt;
&lt;li&gt;other small PRs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We will analyze separately. Then in each section, we provide a conclusion of whether we should apply the upgrade or not, and if yes, how.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version Comparison
&lt;/h2&gt;

&lt;p&gt;Since Xinfin's last EVM upgrade (commit &lt;a href="https://github.com/XinFinOrg/XDPoSChain/tree/b5abbfed79084fdd188837d645d13db229b2d5d0"&gt;link&lt;/a&gt;), there are the following new EVM-related hard forks (reverse chronologically ordered):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://ethereum.org/en/upgrades/merge/"&gt;The Merge&lt;/a&gt;, which changes Ethereum consensus to the Beacon Chain proof-of-stake system. Xinfin works with XDPoS consensus, thus this hard fork is unnecessary.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The London hard fork&lt;/strong&gt; contains two EVM-related EIPs: &lt;a href="https://eips.ethereum.org/EIPS/eip-3198"&gt;EIP-3198: BASEFEE opcode&lt;/a&gt; and &lt;a href="https://eips.ethereum.org/EIPS/eip-3529"&gt;EIP-3529: Reduction in refunds&lt;/a&gt;. As the EIP title suggests, the former enables BASEFEE opcode and the latter changes the gas calculating rule.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The Berlin hard fork&lt;/strong&gt; contains these EIP:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://eips.ethereum.org/EIPS/eip-2929"&gt;EIP-2929: Gas cost increases for state access opcodes&lt;/a&gt;. As the EIP title suggests, it changes the gas calculating rule.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://eips.ethereum.org/EIPS/eip-2930"&gt;EIP-2930: Optional access lists&lt;/a&gt;. This EIP introduces a new type of transaction which contains an access list.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://eips.ethereum.org/EIPS/eip-2718"&gt;EIP-2718: Typed Transaction Envelope&lt;/a&gt;, required by EIP-2930.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As illustrated above, the Merge hard fork is unnecessary for Xinfin. On the contrary, the London hard fork and the Berlin hard fork is crucial for Xinfin as they are necessary to make Xinfin's EVM compatible with latest DApps. These two hard forks include a new opcode and a new type of transaction, which is necessary to upgrade the EVM funcionality, and two modifications to the gas rule, which give a more accurate estimation of the time needed to process EVM opcodes.&lt;/p&gt;

&lt;p&gt;In short, it is recommended to adopt the new EVM feature in the London and Berlin hard fork, which includes a new opcode, two modification to gas rule, and a new type of transaction.&lt;/p&gt;

&lt;p&gt;In addition, there is an opcode &lt;code&gt;push0&lt;/code&gt; which is not in final status yet, but it's in Ethereum's codebase now. It can be put onto the pending list of EVM upgrade.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bug fix
&lt;/h2&gt;

&lt;p&gt;Looking through a few recent PRs on Ethereum (with search filter "EVM") &lt;a href="https://github.com/ethereum/go-ethereum/pulls?q=is%3Apr+evm"&gt;Pull requests · ethereum/go-ethereum&lt;/a&gt;), there is no bug fix PR. However, labeling is not often used for PRs. So it will take some effort to study them and understand their goals and changes to the code. For instance, to understand whether they are small improvement, or bug fix, or a major feature. It will take some effort to pick the major PRs (such as EIPs) among the small ones and to skim through more PRs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Other Small PRs
&lt;/h2&gt;

&lt;p&gt;The majority of Ethereum PRs (with filter "EVM") are small ones, each of which contains few lines of codes and are easy to port to Xinfin codebase.&lt;/p&gt;

&lt;p&gt;By looking through the recent PRs, we found that they only provide minor improvements, such as renaming &lt;code&gt;SUICIDE&lt;/code&gt; to &lt;code&gt;SELFDESTRUCT&lt;/code&gt;, use &lt;code&gt;uint256&lt;/code&gt; rather than &lt;code&gt;big.Int&lt;/code&gt;, etc. No bug fix PR is in recent PRs so they are unnecessary for Xinfin.&lt;/p&gt;

&lt;h2&gt;
  
  
  A short summary of unique features of Xinfin
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Precompiled contracts
&lt;/h3&gt;

&lt;p&gt;Xinfin has the following unique precompiled contracts (and Ethereum does not have them), &lt;code&gt;core/vm/contracts.go&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ringSignatureVerifier{},
bulletproofVerifier{},
XDCxLastPrice{},
XDCxEpochPrice{},
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  XDCx trading
&lt;/h3&gt;

&lt;p&gt;The XDCx trading logic is inside evm. &lt;code&gt;core/vm/evm.go&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to do the upgrade
&lt;/h2&gt;

&lt;p&gt;After illustrating the current status of Xinfin and Ethereum EVM and their comparisons, we come to the following conclusion on how to do the upgrade:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Overriding Xinfin code by Ethereum code is infeasible, since there are unique features of Xinfin and Ethereum does not have them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Merging the whole Ethereum EVM is cumbersome, as there will be a huge amount of code conflicts and a dedicated team is needed to handle them. Even if the merge is handled for PRs separately, the huge number of PRs still make it difficult.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Specific hard-fork feature upgrade is necessary&lt;/strong&gt;: features such as new opcodes and new gas rules are necessary to make Xinfin EVM compatible to the latest DApps and reduce the vulnerability of gas-fee related attacks. There needs to be a dedicated upgrading team to port the aforementioned EIPs. And the workload of the EIPs are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EIP-2929: &lt;a href="https://github.com/ethereum/go-ethereum/pull/21509"&gt;this PR&lt;/a&gt;, 28 changed files with 980 additions and 73 deletions (lines of code).&lt;/li&gt;
&lt;li&gt;EIP-2930: &lt;a href="https://github.com/ethereum/go-ethereum/pull/21502"&gt;this PR&lt;/a&gt;, 69 changed files with 2,446 additions and 909 deletions.&lt;/li&gt;
&lt;li&gt;EIP-2718: &lt;a href="https://github.com/ethereum/go-ethereum/pull/21502"&gt;this PR again&lt;/a&gt;, 69 changed files with 2,446 additions and 909 deletions.&lt;/li&gt;
&lt;li&gt;EIP-3198: &lt;a href="https://github.com/ethereum/go-ethereum/pull/22617"&gt;this PR, along with EIP-1559&lt;/a&gt;，47 changed files with  1,099 additions and 909 deletions. Or refer to &lt;a href="https://github.com/ethereum/go-ethereum/pull/22837"&gt;the squashed PR&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;EIP-3529: &lt;a href="https://github.com/ethereum/go-ethereum/pull/22733"&gt;this PR&lt;/a&gt;, 7 changed files with 166 additions and 114 deletions.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Given the workload and its complexity, it will take about 2 months for a small EVM expert team (3-5 people) to properly apply the upgrades, followed by sufficient testing on XDC dev-net and test-net.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reactive upgrade is recommended for the future&lt;/strong&gt;: for the long term EVM upgrade, we recommend reactive upgrade, that is, when there is a request of feature or bug fix, we port the corresponding Ethereum PR to Xinfin codebase.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>evm</category>
    </item>
  </channel>
</rss>
