Syscoin Bridge Development Update

We have been working diligently to finalize agent and contract repositories to achieve code completion ahead of the Syscoin 4.1 release. 

A recent observation was made by us, as well as an optimization. This observation was important enough to all stakeholders that we have decided not to announce a specific blockheight today as the benefits of the optimization outweigh hitting this specific deadline of releasing a blockheight. We will wait to announce the blockheight for at least one working week, in order to give everyone enough time to test it properly. The announcement will be made once we are 100% sure all bugs are removed.

 

Observation

We discovered that testnet difficulty code was set to reset target difficulty after two minutes of timestamps had elapsed between blocks. This results in any blocks taking longer than two minutes having their difficulty reset and starting from scratch. The smart contracts for the bridge are not coded to respect this rule; when challenging such blocks where submitters provide proof, the difficulty bits of these blocks do not match what is expected by the smart contract. It makes testing difficult if we are expecting a challenge to pass, but it does not.  We now realize the cause is testnet difficulty resetting. We will be launching a fix to testnet which adjusts difficulty to reset after twenty minutes, instead of two, to avoid this inconvenience. This change requires that we invalidate our current testnet and run one final sanity suite of tests on our network. We plan to keep our testnet alive to enable continued testing.  We invite and encourage academics as well as open source community developers to tinker/experiment with the testnet - a better option than doing so on mainnet which costs real money.

 

Optimization

We saved 5-10% of agent costs to operate the bridge by removing session information from challenges. This session information is based on a legacy challenge system inherited from DogeEthereum. The legacy challenge system allowed for multiple challengers on one superblock because challengers were interactive (each challenger would request for a block header and receive a header from submitter, repeat for every block synchronously).  We changed that to a better mode of operating in which challengers essentially say “I Challenge” followed by “Here are all the block headers” from the submitter. This new way is much better and more efficient, and was only possible because of optimizations we did working together with Art-of-Bug. Every gas saved adds up, especially with Ether gas costs rising. This will amount to substantial savings in the long run, and also reduces the complexity of the smart contracts and agent logic - a big win. However, this necessesitated re-instantiating the smart contracts and re-launching them together with a new testnet. The observation as well as optimization have led us to create a new network to test and validate the final release.

 

The goal is to achieve zero show-stopping bugs within the span of one working week. Bug velocity has gone down dramatically since we launched our first testnet, due to great work by #testnet volunteers, the dedicated excellence of Art-of-Bug in identifying theoretical attacks, and code cleanup. 

Once we do our internal sanity tests we will likely launch mainnet versions of the contracts and run mainnet tests alongside the final testnet. We will have the following services available to serve the community:

  1. Syscoin Faucet - this is a hashcash based PoW faucet (first of its kind) which provides you Syscoin in exchange for work done on your client side device. https://faucet.syscoin.org for mainnet and https://faucet-testnet.syscoin.org for testnet
  2. Syscoin Explorer - This is an explorer which is SPT/Bridge aware. https://explorer.blockchainfoundry.co for mainnet and https://explorer-testnet.blockchainfoundry.co for testnet
  3. Bridge DAPP - A reference implementation of a distributed app that lets you walk the bridge from Syscoin to Ethereum and back. It connecthttps://explorer-testnet.blockchainfoundry.orgs to metamask for signing Ethereum transactions and has the user sign a transaction preferably in their local Spark/QT wallet for Syscoin authorization. https://bridge.syscoin.org for mainnet and https://bridge-testnet.syscoin.org for testnet

The verified Superblocks smart contract for the testnet can be seen here.  You can follow along as we test and challenge the Superblock system: https://rinkeby.etherscan.io/address/0xd745bc855e72e8535a929b13aaa630894d43a2bd#events

We are close to the finish line and would like to thank the community for their continued participation and enthusiasm in achieving this momentous event of Syscoin 4.1. We believe this is going to be the stepping stone to achieve the next set of milestones which are all building on the foundation of a decentralized, scalable, interoperable and secure network. The overall vision is to help people turn their dreams to reality, whether that is speculators or businesses that want to leverage this technology to help change the world for the better.

Nov 19, 2019 by Syscoin Foundation