Skip to content

Latest commit

 

History

History
153 lines (126 loc) · 5.77 KB

cip-0019.md

File metadata and controls

153 lines (126 loc) · 5.77 KB
  CIP: 19
  Title: Finish upgrade of Counterparty to use latest Bitcoin and Indexd
  Authors: John "Chiguireitor" Villar
  Discussions-To: https://counterpartytalk.org/t/cip19-upgrade-to-bitcoin-0-16-2-and-indexd/5039
  Status: Finished - Partially deprecated
  Type: Standards
  Created: 2018-09-13

Deprecation notice

Indexd has been deprecated from the tech stack in favor of addrindexrs on cip22.

Abstract

Codebase maintenance is part of the continuous effort necessary to make Counterparty an attractive choice for the community in general. This CIP presents the necessary steps to get XCP codebase up to date with the latest Bitcoin technology to take advantage of the latest developments in the space.

Motivation

Current Counterparty deployments are based around an unmaintained bitcoin fork which has aged well, but lacks the latest bugfixes, support for the latest features (like segwit, hash timelocked contracts, bech32 address encoding and so on) and any active developer. This CIP proposes continuation of the previous code maintainer (Devon Weller) to finish bringing support for the latest and best supported codebases.

Rationale

Latest Bitcoin improvements since the current supported version (0.13) are obvious advantages for Counterparty to benefit from:

  • Faster blockchain sync and parsing
  • Segwit support for lower fees
  • Hash Timelocked Contracts (HTLCs) which enable atomic swaps and lightning
  • Better fee estimation

These changes alone, without XCP's codebase support, are already a big win over the current supported Bitcoin daemon.

However, the most pressing matter is the fact that the codebase of the Bitcoin daemon that Counterparty supports is unmaintained in favor of more elegant and clean solutions. This is a critical issue that needs a quick solution, as the community risks any 0-day bug to totally halt counterparty functioning without proper code maintenance.

Technical Implementation

Current state of the implementation is the following:

  • Indexd server syncs up correctly, but lag sometimes behind tip. This issue will prevent users from using UTXOs from the last confirmed block.
  • There are some incompatibilities between 0.15 (which was the original indexd update target) and 0.16, especially regarding fee estimation. There's an already open PR to solve this issue that needs merging.
  • Address generation config must be changed by default temporarily while the development team introduces support for bech32 addresses.
  • Fednode deployment testing on the indexd branch needs to be done.

Indexd needs completion of bugfixes, fednode with indexd needs adjusting and proper testing and a new Counterparty release should be done (9.56.0).

Another important task is to finish merging/rejecting all the accepted, nonsensical and/or minor PRs on the different Counterparty repos. The following is a non comprehensive list of PRs that need merging/rejecting without deep inspection:

  • counterparty-lib
    • #840 Tweak broadcast test
    • #862 WIP: Let transactions crash in isolation
    • #864 WIP: EVM on Counterparty
    • #869 [WIP] add config option to disable mempool syncing
    • #890 [WIP] upgrade APSW/SQLite to 3.12.2 and enlarge page_cache
    • #915 Update btc give and get order status as filled if order_match is completed
    • #916 mark btc orders as invalid if btc give or get amount is below minimum
    • #917 Btc sell expire on order_match expire
    • #925 avoid UTXO lock being set and then bytespersigop fix kicking in
    • #1006 Enable destroy on mainnet
    • #1007 Add longnames flag to get_asset_names
    • #1008 Use estimatesmartfee instead of deprecated estimatefee
    • #1014 Stop downloading bootstrap DB
    • #1036 Minor: Typo in comment
    • #1041 Make Address Options Bitwise
  • counterparty-cli
    • #75 Add code to add checkpoints
    • #76 [WIP] add CLI args to disable mempool syncing
    • #95 Change p2sh-dust-return-pubkey to none
    • #100 Update deprecated pycoin syntax
    • #101 Clarify table names
    • #113 Addded Regtest support
    • #116 Indexd backend support
    • #117 Regtest new
  • counterwallet
    • #845 Reduce immediate string values
    • #848 Master
    • #850 Fix URLs for websites
    • #851 Use BLOCKEXPLORER_URL
    • #857 Hide label when the navigation was holded
    • #858 Update balances.html to rename input field "Enter Bitcoin address" to "Enter destination address"
    • #859 Increase accessibility
    • #861 Add rel="noopener noreferrer" to element with target="_blank"
    • #866 Fix manual setup process
    • #871 Configureable Restricted Areas
    • #872 Remove or Replace References to Counterwallet.co with Counterwallet.io
    • #874 Max Default Expiration
    • #878 Stop using a protocol relative URL
    • #880 Reduce "apple-touch-icon"s
    • #881 Use assetLocked instead of assetDivisible
  • federatednode
    • #290 Evmparty preperation
    • #305 Fix 2 typos
    • #312 Indexd backend support
  • counterblock
    • #154 [trivial] spelling issue
    • #159 Reduce immediate strings
    • #162 Indexd backend support
    • #163 🐛 fix if price == 0
    • #167 Give PEPECASH and BITCRYSTALS Asset Pair Priority
    • #168 Give PEPECASH, BITCRYSTALS, FLDC, RUSTBITS, SCOTCOIN, DATABITS, and BITCORN
  • Documentation
    • #138 Remove 14Tf35AovvRVURzd623q5i9kry2EW8WzyL
    • #139 Remove desctiption about EVM
    • #141 Change RPC password defaults in documentation from 1234 to rpc

Updates to documentation

Milestones

Fundraising Goal = 500 XCP

Milestone #1 (30% - 150 XCP) Indexd fix pushed to Indexd branch.

Milestone #2 (25% - 125 XCP) PR on all repos processed.

Milestone #3 (~21.6% - 75 XCP) Updates to documentation.

Milestone #4 (30% - 150 XCP) Merge to master.

Bounty Address : 1JjhLd8aEHZD3ykBexkAe3GwdaC5FdbETT

Copyright

This document is placed in the public domain.