Status and Achievements
September was a month tantalizingly close to huge success. The Xuan version of factomd was released to master, after passing testing on the testnet. Deployment started on the mainnet, but some workarounds to maintain full capabilities ended up not working. The release was pulled back in September. Later a pause on the network was successfully resolved after some quick diagnosis and bug fixing. The next phase of development also began for factomd.
There were two sponsor meetings in September. One of them was recorded and published: https://youtu.be/sZepNTwkal0 The sponsors in attendance in September were Nolan Bauer, David Kuiper, Valentin Ganev, and Nikola Nikolov (both of Factomatic).
September encompassed a lot of development and testing. The last consensus bug preventing agreement between different versions of federated servers every 5 blocks on the testnet was fixed. This was enough to make Xuan ready for the Community Testnet.
The first release candidate of Xuan was deployed across the testnet. Federated servers when they had upgraded were experiencing an odd behavior. The upgraded servers were ending their part of the block almost a minute ahead of the non-upgrades ones. It was observed that after an election on the testnet, all the federated servers once again got in sync, and none of the servers were ahead of the others. The load test on the testnet also passed, with the blockchain being able to accommodate more Entries than the load test program was able to write. Here are the logs from the load test on testnet: https://chockablock.luciap.ca/loadtest-history
The kickoff meeting for the refactor was also held in September. The design document that describes how the various pieces fit together and how the message flows is located here: https://drive.google.com/file/d/19mNQJlV9ehgbDQphlOQh6hmKF5XOweT8/view?usp=sharing
At the kickoff was Matt York, Paul Snow, Veena, Clay, Steven, Brian, and Justin.
Also in September Factom, inc provided more testing and feedback for the Livefeed API. Factom, Inc is hoping to utilize the livefeed API. Sphereon is developing the Livefeed.
Unfortunately on September 30th, the mainnet experienced a pause. This event was not straightforward to get started again. The network was stopped for about 11 hours. There was a problem where the various federated servers were not able to communicate effectively with each other. Not enough of them were directly connected to each other, and the backhaul network nodes were a block behind, so would not propagate messages. The federated servers would have needed to advance by two blocks to trigger the followers around the network to download a block. This would have allowed them to help with network communication instead of harming it. As a way to get the federated servers back to building blocks, a custom version of factomd was created and put on the backhaul nodes. This version relaxed some of the network self protections and helped the federated servers get back to building the blockchain.
This month’s Github and Jira reports are also available:
September 9th also was the last day of the Factom, Inc Protocol Development Grant. It spanned June 9 to Sep 9. There were two main measurable criteria that the grant provided for. The first was Maintenance of Mainnet. The second was Refactor Code Initial Development. Factom, Inc was successful in satisfying the requirements of this grant.
The maintenance of the mainnet came in two flavors. The most obvious demonstration of this deliverable was the results. The factom network operates in a fail-safe method, where it actively prevents blockchain forks when there are consensus failures by pausing and stopping the building of new blocks. At this point in the blockchain’s development, human intervention is required to resolve the fault. Factom, Inc responded multiple times during the grant period to these faults with multiple engineers. Here is one example of the response and analysis: https://drive.google.com/open?id=1gHtb2AvdrPU8j8dmMFAaiS8eTxmyqMKU
More importantly, the Bond release was successfully deployed on mainnet, which represented several months of development. This brought more stability and fixed several security holes in factomd.
During the grant period, the first release candidate of xuan was tagged and made ready for deployment on the testnet. This comparison shows the magnitude of development that occurred during the grant period.
The other measurable deliverable was incremental code structure updates. This was also referred to as precursors to sharding. One of the biggest examples of this is Dependent Holding. This was released during the grant period.
Looking at the Threading Rewrite document we can see that Dependent Holding plays a big part in the message flow through the system. It was implemented in a way that is usable in the current generation of code, as well as the refactored generation of code.
While it was not a measurable part of the grant proposal, the grant spirit included Developer Support for non-Factom, Inc developers. That effort ramped up during this grant period with weekly developer standups that helped coordinate core development. Another example of this is support of the Livefeed API. This support has helped further decentralize the protocol.
Factom, Inc has successfully completed the June 9 – Sep 9 2019 grant, and is well on the way to satisfying the Sep 9 – Dec 9 grant.
New capabilities and maintenance issues that were released
- Make FollowerExecuteACK also look for messages in Dependent Holding
- Fix a bug that hindered the performance improvements of Dependent Holding Actions
- Community Contribution – Removing Hoisie Web
- Remove dependency on an old un-maintained library and use a more modern one instead for the API network handlers
- Test double application of factoid transactions when booted in minute 9
- Test for regressions of a prior dangerous fault where factoid transactions are double applied, calculating the wrong balance
- fast track chain commit/reveals
- Prioritize Chain creation over Entry creation to help prevent backed up queues under load
- All tests should be run against Factomd Releases
- For each release we need a way to automatically test using all Simulation Tests. Currently this is a somewhat manual effort – automating this makes it easier to track history and expose visibility into the release process.
- Community Contribution – Fix loading of custom cert paths
- Actually use the TLS cert that is specified in the config file.
- Review holding map in order of arrival
- Increase network capacity by decreasing randomness when lots of traffic is arriving over the p2p network
- Extend SetupSim
- Helpful for create databases for DevTestNet and removed “special/annoying”ness of FNode0 in tests.
- Put missing message responses into their own thread
- Increase reliability and prepare for refactoring by fully isolating missing messages and their responses from state access. Rely only on channels for communication
- Election Testing Failed
- Sequential elections within the same block should elect the correct unresponsive vm
- Community Contribution – Factable solutions code cleanup
- Code cleaning and commenting
- Add a way to alert developers when Nightly CI build fails
- Adding a visible alert to the automation pipeline will help maintain high standards of quality during the development life-cycle
- Correctly handle Rejected Messages
- Fixes potential bug when recovering from election caused by possible attack vector or bugs.
- Fix timing on EOM for Minute 10
- Increase stability under load when an timing bug can cause factomd to get confused and degrade performance.
- test and allow golang 1.13
- let developers build using the latest version of golang
- New SimTest to test elections in every consecutive minute.
- Create a test which can be run repeatably that runs many elections
- Community Contribution – Factable solutions code changes
- Comment and simplify code to make it more legible to future developers
- Increase Entry Sync retry rate
- Reduce the amount of time it takes a node to catch up with the second pass blockchain download
- Followers take many blocks to start following minutes after boot
- Improved followers and audit servers ability to stay in real time with the blockchain. This helps audit servers be able to take over. It allows followers to know the latest transactions on blockchain.
- Repair Dependent Holding to use highest block instead of leader height
- Allow the blockchain to be downloaded more reliably in a stochastic or hostile network environment
- Process Entry Reveals only after their corresponding Commits
- Fixes a serious bug causing network pauses manifesting during high traffic when network messages come in out of order
- Update savestate to 13 so that fixes for FD-1091 (blocks divisible by 1000) are captured
- Protects against the risk of nodes being stopped on a block divisible by 1000 and becoming corrupted.
- Adjust message propagation filter to be set/reset by heartbeats
- This allows followers to resume propagating network messages when a hour long pause occurs. This will help recover from a future pause.
- Avoid a race condition on boot when RestoreFactomdState is set
- Avoid corrupting the local state which would cause balances to be incorrectly calculated
- Pokemon bug detected in Validate()
- Protect against a newly detected form of the Pokemon bug to prevent random panics
- investigate inconsistent responses from debug API
- Debug API should return data from behind a port forward
- Never Hold non-ACK’d messages
- Avoid nodes getting clogged up with missing message responses if they can’t be used
- Missing Message Processing is losing requests
- Avoid deadlocks when following along with the blockchain when local messages are missing
- With 2 elections in a minute, correctly compute the appropriate VM
- Fixes serious bug where after a one election, audit servers are incapable of replacing a second federated server
- Add more logging around process list debugging + scripts for analysis
- Allows core developers more insight over the system internals
- Update EntrySyncing to get rid of unnecessary complexity
- Slightly simplify the 2nd pass downloading code to increase reliability
- Remove Remnants of ELECTION_NO_SORT activation.
- Remove unused code to make it more legible
- Drop messages if outbound messages queue is full outside of wait period
- Protect against a possible deadlock scenario under certain situations – where (for example) we are booting while the network is under load.
- Avoid race condition with DBsigs and setting up for Factoid transactions
- Avoid panic when booting node
- Expire stale messages from Holding
- factomd could accumulate messages in holding and slow down over time, eventually crash by running out of memory
- Xuan dbstates sync off-by-one bug
- Stop downloading blocks that a node already has locally
- Maintain proper coinbase behavior
- Xuan needs to maintain same behavior as previous release for coinbase transactions to stay reverse compatible with older nodes every 25 blocks
- Allow DBsigs 20 minutes before boot
- Allow Leader nodes to recognize other leaders when they boot asynchronously.
- Update circle build environment to golang 1.12
- Build with the latest circleCI/golang environments to maintain forward compatibility Actions
- Community Contribution – Docker dev environment misconfigured
- Allow simulated development nodes to communicate in an isolated docker based environment.
- Cambridge International Symposium on Economic Crime, Sept 1st – 8th, Cambridge England
- Smart City Expo Atlanta, Sept 11th-13th, Atlanta, GA
- Digital Mortgage Conference, Sept 23rd – 24th, Las Vegas, NV
- Gossip Improvements
- Reduce the redundant network traffic caused by Gossip protocol Actions
- Updates to enterprise-wallet
- Include the proposed changes to entreprise-wallet from Factomize
- Create a separate thread to handle all missing data requests.
- Log peer behavior. Fix double p2p close.
- Create framework to execute code on minute edges to consolidate state change code.
- Simplifying the code to allow better code readability and reliability for EOM processing to prevent race conditions
- Move Entry Credit balances to own thread
- Move EC balances to their own thread for future vm threading
- Distribute commits across VMs
- DevNet Developer toolbox
- Having a standard kit for interacting w/ DevNet will make it easier for all developers to make reproducible test scenarios.
- Add an RPC api for interacting w/ Nodes on Devnet
- As a developer I’d like to be able to write test scenarios against DevNet in the same manner as Local Simulation tests.
- POC Jenkins builds against DevNet
- Adding more automation around Integration testing in this POC will help us finish designing the rest of our CI/CD pipeline for Factomd
- Update docs for debug API
- need to update API docs so other users can make use of the new features.
- Align grant height to grant payout boundary when reading grant descriptors.
- Build factomd docker images with golang 1.13
- Build images used by ANOs using the latest golang version
- Community Contribution – Add documentation around directory and admin blocks
- Increased understanding when newcomers review source code
- Add sim test where to-be-elected audit is behind at moment of election
- Extending sim tests around election/consensus code allows for better regression or checking for un-expected behavior
- Update build environments to golang 1.13
- Release software using the latest version of golang
- Add logging for every recovery call
- extending logging to capture this previously silent behavior aids in debugging
- MMR catchup delay
- extend Logging to track sizes of Maps and Channels
- Faster Catchup by MMR
- Faster loading of the first block after boot built by MMR.
- Add commit data to ack in wsapi
- Change priority to have higher priority than acks.
- Update API version to more closely reflect semver
- Give factomd API users info on what services are offered by a particular version of factomd
- Community Contribution – include some factomd changes from Factable Solutions
- Add clarity around the code base for future developers
- Community Contribution – More tests around Audit Server Brainswaps
- Better debugging problems around brain swapping a follower to an Audit server.
- Ongoing Performance Improvements
- Ongoing Maintenance corrections
- Continue supporting the protocol and issues that arise
- Ongoing Maintenance corrections
- Ongoing Maintenance corrections