Status Updates

September, 2018

Jump to

September 27, 2018

Weekly Development Report

DAEDALUS

Wallet

Last week the team finished post-integration cleanup of the legacy Cardano wallet V0 API code and improved the V1 API endpoints error handling.

Since the V1 API introduced the new Cardano wallet data layer, the team had to implement a migration screen which contains all migration-related information.

As a part of a review process of the code which implements IPC driven Cardano node / Daedalus communication, the team decided to further improve the automatic Cardano node restarting logic in case it unexpectedly exits by introducing a limit for maximum restart attempts in order to prevent infinite restart loops. Also, Daedalus will first check, during its startup, if there is an already running Cardano node before trying to start a new one. In case this is the same instance it used on a previous run it will shut it down and start a new instance.

Next Cardano release will include structured logging which required the team to modify the code used for logs packing within the bug report feature which was successfully resolved.

App Platform

Last week the team continued work on the GraphQL API design and upgraded a performance testing tool to be compatible with the current design.

The application registry format was also upgraded, and the installation process and UI enhanced to collect service permission from the user before opting to install.

WALLET BACKEND

Last week the team focused on investigating memory leaks that were recently discovered in an unreleased version of the wallet code which resulted in an interim fix.

Additionally, the team did some manual wallet testing on the staging cluster and worked on clarifying the get-address API endpoint (the new API does not return an error in the case of ‘unknown’ addresses, this constitutes as a breaking change to the API, hence the extra care was taken around this).

As part of the wallet implementation, the team implemented a new --force-full-wallet-migration option which enforces the full migration to finish without any errors, before letting the node continue. The developer also wired the --wallet-rebuild-db which rewrites both databases if they are already there. A bug was discovered in the way the reset-wallt endpoint used the cancel function of restoration threads and opened a PR with a fix (not ready yet but this should have low priority).

NETWORKING

The team have created the repository ouroboros-network to contain their work on the Communication Protocol Design. A team member has brought their executable protocol specification up to a presentable form and published it there. Currently the simulation shows a producer serving one particular chain to a consumer, which finds the intersection and downloads the difference.

DEVOPS

This week DevOps efforts were focused mainly on the testnet, development workflow automation, and CI performance.

The testnet was progressing nicely, and the address discrimination functionality deployment is now almost ready for the blockchain relaunch.

Development workflow received attention in the form of branch testing/merging automation, a process that was only semi-automated before and was causing unnecessary suffering and resource waste. The new bors-ng deployment (still in the works) will allow us to overcome these and to build upon to deliver further improvements later.

CI performance had non-stop attention, with the long-term cross-compilation effort getting closer to internal release, performance metrics efforts and physical machine provisioning for lower CI latency. Several performance bugs were resolved.

The team also participated in the Daedalus wallet testing efforts, furthering automation in the area, and writing more integration/smoke tests.

Additionally, we're evaluating the long-standing CI/dev build tool divide, by addressing the interactive development workflow issues that devs have with our CI-oriented build infrastructure. We're hoping to deliver a converged solution, and are actively working out our options.

CARDANO DECENTRALIZATION

The team is looking to have a business requirement documented for Incentives and Delegation by the end of this week. Requirements will be based on the design spec and will be cross-referenced with storyboard requirements that were done late last year.

GOGUEN

Fundamental Research

Research on Ouroboros BFT and sidechains for Mantis has progressed nicely. The team are beginning further collaboration with other teams to propel the progress.

Languages and Virtual Machines

Development work on Plutus and Marlowe has continued.

ANNOUNCEMENTS

IOHK is currently looking for talented people to work with us as a Performance Management Specialist, Web Tester, Director of Product Management, Rust Software Engineer, Haskell Trainer, Technical Writer, Senior Haskell Developer - Prototyping as well as several others. Please see the IOHK Careers page for more details.

September 20, 2018

Weekly Development Report

DAEDALUS

Wallet

Last week, the team finished the integration of Cardano wallet V1 API endpoints and proceeded with the post-integration cleanup of the legacy V0 API code. The introduction of the V1 API opened up the opportunity for improvements of the Cardano node connection status handling, so the team decided to completely refactor this part of the code. The code is now much more robust and should eliminate most of the "Connecting to network” issues. As a part of this refactoring, the team introduced a new "Network Status" screen which in real-time presents all the connection-related information and is very useful when it comes to understanding what is going on with the connection.

The team completed the implementation of IPC driven Cardano-node / Daedalus communication and the code is in the final testing and review phase.

As a part of the regular maintenance tasks, the team did another quarterly review of design and features implementation together with the Daedalus main designer. The review resulted in a list of around twenty minor issues which were all addressed and resolved.

App Platform

The team designed application registry interface and implemented a local registry for use in development and testing. The entry contains installation details, including download information and service permission requirements.

Application uninstallation feature was implemented.

New, container-based isolation infrastructure has been designed and implemented which significantly simplifies the design of the application platform and makes it more flexible and secure.

WALLET BACKEND

The team concentrated on front end optimization and bug fixing.

A developer worked on a task pertaining to reunifying all Wallet Layer exceptions into the pre-existing WalletError sum type as well as manually testing that the wallet layer is returning WalletError correctly via the API. Additionally, the developers removed all remaining V1 wrappers of Kernel errors, and removed all Exception instances of Kernel errors (to prevent kernel errors from being thrown directly).

Furthermore, the team worked on database migration.

Team members, continued work on hardening restoration and catch up against a variety of race conditions and related failure modes. This combines the work on wallet restoration and “backfilling” / wallet catch up. They expect one or two more days of effort at this point.

NETWORKING

On the task of Communication Protocol Design, the engineers have proposed solutions to the problem of transmitting duplicate data when running independent chain consumer protocols in both directions between two given peers. The team is in the middle of implementing this proposal after which they will engage in analyzing the outcome.

DEVOPS

There is no update this week.

CARDANO DECENTRALIZATION

The team is in the middle of re-calibrating our scope for Shelley and understanding what that means from an implementation perspective. So far they have defined and documented what the work packages are for development. They are in the process of collaborating with a number of internal departments to ascertain what other features need to be added and what the dependencies are, as this will determine what gets implemented first and what can be done in parallel.

ANNOUNCEMENTS

IOHK is currently looking for talented people to work with us as a OpenSource Manager, Performance Management Specialist, Web Tester, Director of Product Management, Rust Software Engineer, Haskell Trainer, Technical Writer, Senior Haskell Developer - Prototyping as well as several others. Please see the IOHK Careers page for more details.

September 13, 2018

Weekly Development Report

DAEDALUS

Wallet

Last week the team continued to work on the integration of Daedalus specific Cardano wallet V1 API endpoints which were not released with the original V1 Cardano wallet API. Most of these API endpoints such as the ones for Ada redemption and Cardano node update management are now integrated and the code is in the final testing and review phase.

The team is almost done with the implementation of IPC driven Cardano-node / Daedalus communication. The last part remaining to be implemented is the controlled shutdown of Cardano-node based on different scenarios such as applying of Cardano-node update and restarting Daedalus with or without GPU safe mode.

The NTP check, used to check if Daedalus is running on a machine in sync with the global time, was improved by adding an option to re-check the time difference using a new button on the NTP error screen. This button is to be used to trigger a new NTP check after the user has updated their machine's local time to the correct value. Before this, a user had to restart Daedalus in order for the NTP check to be executed again.

App Platform

This week the team has been exploring an alternative technical solution for application and service process isolation, using a container-based approach.

Initial work on the theme switching feature was completed, and the new permissions UI was finalized.

WALLET BACKEND

The past week was spent on bug fixes and wallet account functionality optimization. The team worked on translating all API errors to the WalletError sum type as well as pushed to resolve Daedelus issues during wallet import.

Additionally, work was done on data migration.

Some of the developers spent their time working on robustness for applyBlock and switchToFork, to handle a variety of error scenarios that have been identified. Most of these scenarios come down to race conditions or synchronization issues between the wallet and the node. They have re-written the restoration code to avoid some tricky locking scenarios.

NETWORKING

The team continued to improve the Communication Protocol simulation definition, by way of an STM interface as opposed to only MVar s. This makes it easier to express certain points in which a peer must wait for local data (a new block). The team are also extending the pure typed transition based definition to express the same protocol as in the abstract STM /MVar free monad presentation.

DEVOPS

DevOps continued making improvements to continuous integration speed and observability. An engineer gathered historical durations from code push to GitHub status check pass/fail across all CI systems. The metrics were fed into InfluxDB and plotted in Grafana. The static plot provided valuable insights about bottlenecks, and we made plans to dynamically collect data to visualize CI responsiveness over time. Another engineer implemented a visualization of build durations and times throughout a nix evaluation on the Hydra server. The team also conducted more tests to measure the impact of compiler optimization flags on end-to-end build and test time, and discovered optimizations are unnecessarily slowing down CI responsiveness in pushes to pull requests. Nix garbage collection continues to be a pain point on macOS build machines with limited disk capacity, so we are experimenting with different parameters. An engineer is also continuing to evaluate a system to explicitly request CI builds and potentially batch contemporary ones together.

Two DevOps engineers and several developers attended the first training session on property-based testing with QuickCheck. We can more effectively discover and prevent critical bugs by generating test inputs to our software and ensure expected invariants are maintained.

CARDANO DECENTRALIZATION

The technical implementation plan for delegation is in a “mostly finished” state that allows the team to work on some of the work packages for development, and a few of the team are already working on the prototyping. The team is currently planning resource allocation to tackle the work packages defined.

ANNOUNCEMENTS

IOHK is currently looking for talented people to work with us as a OpenSource Manager, Performance Management Specialist, Web Tester, Director of Product Management, Rust Software Engineer, Haskell Trainer, Technical Writer, Senior Haskell Developer - Prototyping as well as several others. Please see the IOHK Careers page for more details.

September 6, 2018

Weekly Development Report

DAEDALUS

Wallet

Last week the team added one more improvement for the upcoming Daedalus 0.11.1 and Cardano 1.3.1 release - there was a problem with the rendering of Daedalus icon on Windows platform which is now resolved and Daedalus icon should be displayed perfectly clearly regardless of the icon size or screen resolution.

The team has finished the integration of the V1 Cardano wallet API. However, there are some Daedalus specific Cardano wallet API endpoints which were not released with the original V1 Cardano wallet API. These endpoints are now added to the V1 API under "internal" namespace and the team is working on their integration.

As a part of the tasks for the Daedalus 0.12.0 and Cardano 1.4.0 release, the team is working on the implementation of IPC driven Cardano-node / Daedalus communication. This will allow Daedalus much greater control over the Cardano node and should reduce the number of users facing the "Connecting to network" issues. This new setup will enable Cardano node to use an automatic selection of the IP ports in order to always pick an unused port and two-way TLS authentication between frontend and the backend which will improve security and enable configurations where frontend and backend are running on different machines in the future.

The team has also implemented more precise error messages for transaction fees calculation which will now include the exact amount of Ada missing in order to make a given transaction.

App Platform

After finishing the work on a state persistence service the team continued the work on the service API. The team is working on a solution to implement a GraphQL-based platform API for apps to gain access to services.

The team has also been prototyping a Docker-based solution for isolating the app's runtime, using the Docker remote API coordinated by the main process.

WALLET BACKEND

The team engaged in refactoring efforts aimed at release 1.3.1 after which, resuming important tasks for the 1.4 release. As a result of their work, progress has been made on both ‘Switch over to new Wallet Layer’ as well as ‘Regularly create acid-state checkpoints’ tasks. Additionally, the team worked on optimizing an important endpoint for Daedalus as well as engaging in writing internal documentation and various bug fixes.

The developers also worked on initializing (stateless) submission layer with pending transactions from the wallet State as well as on unify transaction metadata creation date by adding a mockable timestamp getter to the NodeStateAdaptor.

Furthermore, the team worked on improving how error scenarios are handled during applyBlock and switchToFork. Due to this effort the issue with Wallet State Catchup has also been resolved..

NETWORKING

In regard to Communication Protocol Design, last week a team member wrote a simulation which clones a blockchain from a producer and worked on a simulation in which a node is subscribed to multiple producers and does chain selection.

DEVOPS

DevOps worked on Daedalus code and process improvements last week. To significantly reduce the risk of unsigned installers being published on the public ledger CI build artifacts for unsigned installers are no longer retained. We also helped investigate and resolve a long-standing bug where Cardano wouldn't work for Windows users with non-ASCII usernames. Windows icons for Daedalus didn't scale properly, so a DevOps engineer collaborated with Daedalus engineers to diagnose and resolve it. We also showed the Daedalus and QA teams how to interact with the demo cluster originally configured by DevOps and followed up with some nix workflow improvements.

The team continued efforts to improve our automated testing systems. An engineer helped the Plutus team enable hlint and stylish-haskell checks to their CI. A recent regression on the develop branch of cardano-sl caused block syncing to stop part of the way through. To detect such regressions earlier, the team set up a nightly test which uses the latest code to sync the mainnet blockchain from scratch. The macOS builds sometimes fail because they ran out of disk space part of the way through, even though there is an automated nix garbage collection job. To reduce the likelihood of repeat incidents the team switched from a time-based trigger to a disk space threshold trigger. CI speed remains a point of concern for cardano-sl, so the team is identifying and addressing bottlenecks. The developers discovered macOS builds were frequently the bottleneck in overall CI response time, so for now they are no longer required to finish and pass before merging into the develop branch. The team is also considering whether a tool which allows devs to pre-approve PRs for merging conditional on their success in CI, possibly in a batch with other PRs, could improve throughput and developer satisfaction. We also started researching whether different compiler options may speed up the overall compile and test cycle.

Additional work included incrementally restarting Cardano staging and mainnet nodes to update their kernel, making internal self-hosted services more readily accessible via a VPN, proof of concept work on a NixOS cloud image with ZFS support to improve data compression and recovery options, and stabilizing the lts-12 branch for cross compilation efforts.

CARDANO DECENTRALIZATION

Research and Design

The Delegation e-print is still awaiting a date for publication. The team has started prototyping for the first work packages for delegation.

Development

Team concentrated on core optimization tasks bringing the effort to its final stages.

GOGUEN

Fundamental Research

Last week the research team submitted the proof-of-stake Sidechains paper to a conference for peer review.

End Users and External Developers

The team is starting research to create detailed education and technical content plan for Goguen.

Testnets

Team members worked on advancing development on K/IELE (Mantis) to improve supportability and operation of cluster.

ANNOUNCEMENTS

IOHK is currently looking for talented people to work with us as a OpenSource Manager, Performance Management Specialist, Web Tester, Director of Product Management, Rust Software Engineer, Haskell Trainer, Technical Writer, Senior Haskell Developer - Prototyping as well as several others. Please see the IOHK Careers page for more details.