# The Jackalopes (on pause)

**Main focus**: Nim-Status, Desktop Build/CI needs, Concurrency in Desktop
**Members**: Eric, Michael. **Other Contributors**: Vitaly (Mobile Team)
## Meetings
*Day of month is relative to US Eastern time.*
### September 15 (Wednesday) - Sync Meeting
**Eric**
- done:
- .
- current:
- .
- next:
- .
**Michael**
- done:
- `status-desktop`: PR [#3530](https://github.com/status-im/status-desktop/pull/3530), closes issue [#3496](https://github.com/status-im/status-desktop/issues/3496).
- `status-desktop`: PR [#3534](https://github.com/status-im/status-desktop/pull/3534), closes issue [#3509](https://github.com/status-im/status-desktop/issues/3509).
- current:
- .
- next:
- .
### September 13 (Monday) - Standup
**Eric**
- done:
- `status-desktop` (wallet2): `status-desktop`: Rebased [the saved addresses CRUD PR](https://github.com/status-im/status-desktop/pull/3425) yet again
- `nim-status`(stickers): Added EDN and content hash decoding (https://github.com/status-im/nim-status/pull/304)
- `nim-status`: Reviewed michael's updated DB schema migrations PR.
- current:
- .
- next:
- `nim-status` (stickers): start work on listing purchasable and purchased sticker packs.
**Michael**
- done:
- `nim-status`: Created PR [#303](https://github.com/status-im/nim-status/pull/303), providing a revised and much simplified db migrations setup. Some tests have been disabled until the corresponding CRUD logic has been updated re: columns added/removed. NOTE: addition/removal of columns is with respect to catching up with status-go's db schema, which we may diverge from following [#303](https://github.com/status-im/nim-status/pull/303).
- current:
- `nim-status`: Working on PR [#305](https://github.com/status-im/nim-status/pull/305), which accounts for columns added to tables `chats`, `contacts`, and `user_messages`.
- `nim-status`: Adding a description/notes for PR [#303](https://github.com/status-im/nim-status/pull/303).
- `nim-status`: Reviewing Eric's PR [#304](https://github.com/status-im/nim-status/pull/304).
- next:
- `nim-status`: Create one/more PRs re: columns added/removed, which is the case for several other tables in addition to `chats`, `contacts`, and `user_messages`. NOTE: addition/removal of columns is with respect to catching up with status-go's db schema, which we may diverge from following [#303](https://github.com/status-im/nim-status/pull/303).
- `nim-status`: Implement missing CRUD APIs.
### September 10 (Friday) - Standup
**Eric**
- done:
- `status-desktop`: I spent the better part of the last **two days** rebasing the saved addresses work in status-desktop due to the large refactors on both `status-lib` and `status-go` that unfortunately went in almost at the same time my PR was submitted. I'm happy to say that that all work across all *four* branches (status-desktop, StatusQ, status-lib, and status-go) are in full working order
- current:
- .
- next:
- `nim-status`: start work on decoding sticker pack EDN and content hashes
**Michael**
- done:
- .
- current:
- Still working on a PR to replace nim-status' existing migrations system with an up-to-date shema-dump from latest status-go, w.r.t. status-desktpo's current `master` branch. I was able to generate clean diffs re: the unencrypted accounts database and encrypted user database. However, accounting for the diffs involve making various changes to existing CRUD APIs as well as making way for missing CRUS APIs ("missing" relative to status-go).
- next:
- Fill in missing CRUD APIs.
**Vitaliy**
- done:
- .
- current:
- .
- next:
- .
### September 8 (Wednesday) - Sync Meeting
**Eric**
- done:
- `status-desktop#3307`: Finished the Saved Addresses CRUD in status-go, validation updates in StatusQ, and the status-desktop integration work for saved addresses, all culminated in the status-desktop PR: https://github.com/status-im/status-desktop/pull/3425.
- current:
- .
- next:
- `nim-status#280`: Continue support for stickers work with task #280 - Implement encoding/decoding of contract calls, EDN, multihash
**Michael**
- done:
- `status-destkop`: looked into issue [#3384](https://github.com/status-im/status-desktop/issues/3384). I was unable to reproduce the error with a Windows CI build, nor with a local dev build, on my Windows 10 laptop (x86_64), which is suggestive of a race condition. For now, the relevant code has been [disabled](https://github.com/status-im/status-desktop/pull/3411).
- `status-destkop`: discovered an onboarding bug related to password confirmation, created issue [#3412](https://github.com/status-im/status-desktop/issues/3412) to track it.
- `nim-status`: created issue [#302](https://github.com/status-im/nim-status/issues/302), related to an observation I made while authoring PR [#271](https://github.com/status-im/nim-status/pull/271). This is an important issue that will need to be carefully considered. In my write-up for [#302](https://github.com/status-im/nim-status/issues/302), I attempted to lay out a plan that could be implemented quickly, since it makes use of `task_runner` concepts and patterns that are already the *"bread and butter"* of the example client.
- `nim-status`: merged PRs [#271](https://github.com/status-im/nim-status/pull/271), [#297](https://github.com/status-im/nim-status/pull/297), [#299](https://github.com/status-im/nim-status/pull/299). :tada:
- current:
- Today (Sep 7) I dumped the status-go db schemas pertaining to fresh account creation with current `master` of status-desktop to `.sql` files, and have done the same for the the db schemas of nim-status. For both, I'm manually normalizing the SQL statements and lining up the order of the `CREATE` statements, relative to the order in the schema dump from nim-status. It's a little tedious, but already almost done (as of my Tuesday evening). This will allow me to diff them cleanly and make any necessary adjustments to existing CRUD APIs of nim-status. I expect ***most*** of the diff to be approx. 300 lines of SQL for new tables and indexes. Tomorrow (Wed, Sep 8), I'll start work on a PR including any necessary adjustments to nim-status' CRUD APIs, while also dropping the existing Makefile logic and `.nim` code pertaining to our current migrations setup, in favor of using the all-in-one schema derived from status-go; the latter will be embedded in the nim-status library at compile time via `staticRead`. From that point, we can make whatever adjustments to the schema that make sense for nim-status (e.g. dropping historical baggage re: status-go), and can start planning for a revised migrations strategy that will make use of sqite's/sqlcipher's `PRAGMA user_version` once we start tagging releases of nim-status. For more information re: `user_version`, see:
- https://www.sqlite.org/pragma.html#pragma_user_version
- https://stackoverflow.com/a/998652
- next:
- Plow in the CRUD APIs that aren't yet implemented. This will involve creating a rapid-fire series of PRs that are independent from one another. By *"plow in"*, I mean there's a great deal of uniformity in the structure of the existing CRUD APIs, so it's really a matter of *"lather, rinse, repeat"* copying/adapting existing code. In the process, I'll make some notes about how, in the future, we can revise the construction of existing CRUD APIs and facilitate the construction of new CRUD APIs via Nim macros. This would ***not*** involve going *"full ORM"*, it's just that there's so much structural repetition that many of the CRUD procs can likely be codegen'd from the types corresponding to tables and columns.
**Vitaliy**
- done:
- .
- current:
- .
- next:
- .
### September 6 (Monday) - Standup
**Eric**
- done:
- .
- current:
- [`status-desktop` #3307](https://github.com/status-im/status-desktop/issues/3307): Got the add/edit modal validating correctly, after having to update StatusQ to support multiple validators on a single StatusInput and specification of the error message directly in the StatusValidator.
- [`status-desktop` #3307](https://github.com/status-im/status-desktop/issues/3307): Reorganised layout so that the footer was full width
- [`status-desktop` #3307](https://github.com/status-im/status-desktop/issues/3307): Updated footer icon buttons
- [`status-desktop` #3307](https://github.com/status-im/status-desktop/issues/3307): Added a QtObject list for saved addresses so it can be used as a model in the list view
- [`status-desktop` #3307](https://github.com/status-im/status-desktop/issues/3307): Rebased against Alex's latest changes in the base branch.
- next:
- [`status-desktop` #3307](https://github.com/status-im/status-desktop/issues/3307): Add edit mode to the modal and support it through the UI.
- [`status-desktop` #3307](https://github.com/status-im/status-desktop/issues/3307): Add delete functionality once the delete CRUD functionality has been completed in nim.
**Michael**
*Off today (Sep 6) since it's a public holiday in the United States.*
- done
- `status-desktop`: fixed a windows installer issue.
- `nim-status`: rebased PRs [#297](https://github.com/status-im/nim-status/pull/297) and [#299](https://github.com/status-im/nim-status/pull/299) re: my PR [#271](https://github.com/status-im/nim-status/pull/271).
- `nim-status`: reviewed Eric's PR [#299](https://github.com/status-im/nim-status/pull/299).
- `nim-status`: created issues [#300](https://github.com/status-im/nim-status/issues/300) and [#301](https://github.com/status-im/nim-status/issues/301), related to observations I made while authoring PR [#271](https://github.com/status-im/nim-status/pull/271). I made another important observation re: performance that involves processing of history query results (CPU usage and time required can be problematic, but memory consumption is quite tame). I'll create an issue/proposal for it on Tuesday, September 7.
- current:
- .
- next:
- TBD
**Vitaliy**
- done:
- .
- current:
- .
- next:
- .
### September 3 (Friday) - Standup
**Eric**
- done:
- .
- current:
- [`status-desktop` #3307](https://github.com/status-im/status-desktop/issues/3307): Started work on Saved Addresses CRUD in nim. Read and Create has been done. Went on to test this in the UI, and then started work on the Add/Edit modal
- [`status-desktop` #3307](https://github.com/status-im/status-desktop/issues/3307): Added delete modal (deviation from the design) in the UI
- next:
- [`status-desktop` #3307](https://github.com/status-im/status-desktop/issues/3307): Continue work on add/edit modal
- [`status-desktop` #3307](https://github.com/status-im/status-desktop/issues/3307): Continue on testing the Create/Read for Saved Addresses, add remaining CRUD operations in nim.
**Michael**
- done:
- PR [#271](https://github.com/status-im/nim-status/pull/271) is *finally* wrapped up, ready for final review.
- current:
- Rebasing open PRs (#279, #299) against the branch for PR [#271](https://github.com/status-im/nim-status/pull/271).
- next:
- .
**Vitaliy**
- done:
- .
- current:
- .
- next:
- .
### September 1 (Wednesday) - Sync Meeting
**Eric**
- done:
- Updated contracts PR (#299) to include network id in the tokens CRUD and removed seeding of all tokens on migration.
- current:
- [`status-desktop` #3307](https://github.com/status-im/status-desktop/issues/3307): added saved address CRUD to status go as part of the task to add Saved Addresses to the wallet
- next:
- [`status-desktop` #3307](https://github.com/status-im/status-desktop/issues/3307): add Saved Addresses button to wallet to load the Saved Addresses screen, then add the CRUD support in nim.
**Michael**
- done:
- .
- current:
- Still working on the wrap up of PR [#271](https://github.com/status-im/nim-status/pull/271). Yesterday I got receiving/decoding of messages wired up to the new `signalHandler` facility of `StatusObject`, and it's working well.
- next:
- Rebase other open PRs against the branch for PR #271 once the latter is out of draft.
**Vitaliy**
- done:
- .
- current:
- .
- next:
- .
### August 30 (Monday) - Standup
**Eric**
- done:
- Finished up the work for adding contracts to nim-status (https://github.com/status-im/nim-status/pull/299).
- Created a PR in `nim-web3` to export generated contracts and supporting methods (https://github.com/status-im/nim-web3/pull/40)
- Added encoding/decoding test to `nim-web3` PR #39.
- current:
- Decode EDN/multihash content returned from stickers contract.
- next:
- https://github.com/status-im/status-desktop/issues/3307.
**Michael**
- done:
- .
- current:
- Still adapting Richard's work in his PR [#298](https://github.com/status-im/nim-status/pull/298) into #271. I'm getting pretty close to being done, and it's the last step before #271 can come out of draft.
- next:
- Review Eric's PR [#299](https://github.com/status-im/nim-status/pull/299) (add contracts support).
- Database refactor and fill-in CRUD APIs for the tables it will introduce.
**Vitaliy**
- done:
- .
- current:
- .
- next:
- .
### August 27 (Friday) - Standup
**Eric**
- done:
- Created a PR for `nim-web3` that adds better support for `Bool` (https://github.com/status-im/nim-web3/pull/39).
- current:
- Continued work on integrating contracts in to nim-status for use with nim-web3. I've added an integration test to aid in developing the public API to retrieve the SNT Contract. Most sticker contracts have been constructed using nim-web3's `contract` macro.
- next:
- Finish contract additions.
**Michael**
- done:
- Reviewed Eric's PR [#297](https://github.com/status-im/nim-status/pull/297), requested a few small changes.
- current:
- Continuing with the rebase work on my PR [#271](https://github.com/status-im/nim-status/pull/271).
- Adapting Richard's work in his PR [#298](https://github.com/status-im/nim-status/pull/298) into #271, since it's much easier to adapt the key parts of it than to do what would be another messy rebase because of all the changes in #271.
- next:
- Database refactor and fill-in CRUD APIs for the tables it will introduce.
**Vitaliy**
- done:
- .
- current:
- .
- next:
- .
### August 25 (Wednesday) - Sync Meeting
**Eric**
- done:
- Rebased and merged [#288](https://github.com/status-im/nim-status/pull/288), [#292](https://github.com/status-im/nim-status/pull/292), [#295](https://github.com/status-im/nim-status/pull/295), [#269](https://github.com/status-im/nim-status/pull/269), [#249](https://github.com/status-im/nim-status/pull/249).
- Added some logic to pass RPC errors through as objects so failed responses could be read by the client/api consumers.
- Refactored opensea and cryptocompare fetches to use the same Result return type.
- Added `/switchnetworks` and `/listnetworks` commands with respective *integration* tests
- current:
- .
- next:
- Will start working on integration contracts for use with stickers. Can borrow a lot from status-desktop.
**Michael**
*Time off on Tuesday and Wednesday.*
**Vitaliy**
- done:
- .
- current:
- .
- next:
- .
### August 23 (Monday) - Standup
**Eric**
- done:
- Monday I worked on implementing Michael's feedback to #269, including some changes that needed to be implemented after rebasing #269 against master which included the `/sendtransaction` changes. It is all up-to-date now and if Michael agrees with the course of action, it should be mergable.
- current:
- Working on implementing switching of networks, to enable switching to testnet for the purpose of stickers implementation.
- next:
- Continue work on switching networks
**Michael**
- done:
- Merged Richard's PR #268.
- Created PR [#288](https://github.com/status-im/nim-status/pull/288) re: a fix for `getWalletAccount`.
- Researched some buggy behaviors/crashes seen when spamming the example client with `/sendtransaction` commands. Created issues [#290](https://github.com/status-im/nim-status/issues/290) and [#291](https://github.com/status-im/nim-status/issues/291) to track the problems.
- Created PR [#292](https://github.com/status-im/nim-status/pull/292) to close [#255](https://github.com/status-im/nim-status/issues/255).
- Finished digesting/reviewing Eric's mega PR [#269](https://github.com/status-im/nim-status/pull/269). I then rebased it against `master` and added a WIP commit re: `sendTransaction` and `ProviderResult`.
- Reviewed Eric's feedback and changes re: my review of his PR [#269](https://github.com/status-im/nim-status/pull/269). I fixed some tests that were failing and made a change to `checkEx` per the feedback. The PR is now mergeable, but the post-review commits should first be squashed.
- current:
- Working on the final rebase of my PR [#271](https://github.com/status-im/nim-status/pull/271) with respect to #269.
- next:
- Implement a PR for the plan I've come up with re: replacing our current database migrations setup. If it works out like I think, it should be simpler to maintain. One aspect of the plan involves use of SQLite's [user_version](https://www.sqlite.org/pragma.html#pragma_user_version) pragma with respect to a constant `int` in the nim-status codebase.
**Vitaliy**
- done:
- .
- current:
- .
- next:
- .
### August 20 (Friday) - Standup
**Eric**
- done:
- Discussion in #287 on how to reduce the > 1000 lines of code in tasks.nim, which are impacted by #269.
- current:
- Got quite a lot of the node config code ported over from status-go, which will bring node config objects to nim-status.
- next:
- Once the node config code is completed (not much longer), then we can switch the current network in the node config.
- I'm working to avoid having to restart the node when switching networks but I'm not in a position to determine if that's possible yet.
- We also may need to consider storing node configs in the database.
**Michael**
- done:
- Reviewed latest changes to Vitaliy's PR #249 and made some additional changes myself. It's in a mergeable state but it would be good to get some feedback re: how I used `Result` for `updatePrices`. See [this comment](https://github.com/status-im/nim-status/pull/249#issuecomment-902194948).
- Reviewed latest changes to Richard's PR #268 and made some additional changes myself. In the process, a problem was discovered with `getWalletAccount`; see [this comment](https://github.com/status-im/nim-status/pull/268#discussion_r692363992). The PR is mergable but would also be a good context in which to fix the problem with `getWalletAccount`, but some feedback is needed re: the best way to fix it.
- Made a proposal in issue [#287](https://github.com/status-im/nim-status/issues/287) re: a way to use `Result` to further simplify our codebase.
- current:
- Continue the discussion in #287. Some of the concerns I've expressed therein are actually impacting my work on #271 in relation Eric's PR #269. I don't like holding up the show, but need a little more time with this.
- Did an experiment using [DB Browser for SQLite](https://sqlitebrowser.org/) to create clean schemas for the databases. It's also possible to do it from the command-line. Next I'll try situating the schemas in the nim-status codebase as a replacement for the migrations bootstrapping we do presently.
- Cooking up a quick PR for #255.
- next:
- .
**Vitaliy**
- done:
- .
- current:
- .
- next:
- .
### August 18 (Wednesday) - Sync Meeting
**Eric**
- done:
- Spent quite a long time reviewing Michael's PR for integrating nim-waku in to nim-status [#271](https://github.com/status-im/nim-status/pull/271)
- Re-reviewed Vitaliy's fetch prices PR [#249](https://github.com/status-im/nim-status/pull/249)
- Reviewed the changes to Richard's /sendtransaction PR [#268](https://github.com/status-im/nim-status/pull/268)
- Cleaned up compiler warnings in [#269](https://github.com/status-im/nim-status/pull/269)
- Fixed an issue in [#269](https://github.com/status-im/nim-status/pull/269) where invalid password errors weren't bubbling up to the UI
- Split up stickers tasks in epic
- current:
- Briefly started work on switching networks
- Get some PRs merged ASAP
- Continue PR discussions (271, 269)
- next:
- Continue work on switching networks
**Michael**
- done:
- Yesterday I created bugfix PR #277 to prevent the `/help` command from crashing the process. It was reviewed and merged later the same day.
- Re-reviewed Vitaliy's PR #249 and gave more feedback re: changes requested, including one more changed related to my PR #277.
- Re-reviewed Richard's PR #268 and requested one more change related to my PR #277.
- current:
- Still reviewing Eric's PR #269.
- Reviewing feedback on my PR #271 (nim-waku integration) and making some changes.
- next:
- New database schemas for initial creation of accounts database and user databases. In a first pass, the schemas will be generated by dumps of the databases created by up-to-date status-go.
**Vitaliy**
- done:
- .
- current:
- .
- next:
- .
### August 16 (Monday) - Standup
**Eric**
- done:
- Finished moving over exception handling to nim-result: https://github.com/status-im/nim-status/pull/269
- Reviewed Richard's /sendtransaction PR
- current:
- .
- next:
- Depends on iteration meeting
**Michael**
- done:
- Created PR #271 re: integration of nim-waku, closes #241. However, I have it in draft because I need to discuss with Eric some refactored state-change tracking re: "logged in" and "logged out". Also, I'm finalizing some plumbing that connects `status/api/network.nim` to `status/private/waku.nim`.
- Reviewed Vitaliy's PR #249 and requested some changes.
- current:
- Reviewing changes Vitaliy made to his PR #249.
- Reviewing Eric's PR #269.
- Wrapping up what I mentioned above re: #271 being in draft presently.
- next:
- Look into implementing our own `setupNat` helper backed by nim-task-runner.
- TBD
**Vitaliy**
- done:
- Address review comments from Michael in token prices PR.
- current:
- .
- next:
- .
### August 13 (Friday) - Standup
**Eric**
- done:
- .
- current:
- Got a large push to moving the core nim-status exception handling to Result, as per the discussion directly with Jacek.
- next:
- Finish work on the move to Result
**Michael**
- done:
- Paired with Vitaliy yesterday re: his PR #249. There was a very non-obvious problem related to table initiliazation for `PriceMap` that was causing crashes at runtime. The stack traces were less than helpful and it was purely a runtime problem (compiler offered no clues) so it took awhile to sort it out, but we finally did.
- Reviewed Richard's PR #268.
- current:
- Still working on the PR re: waku integration in the library. The work has ended up requiring quite a few changes in the example client and additions and changes in the library, many more thant I originally thought would be involved. However, it's all for the better as state management/tracking re: the Status object will now handled by the library itself, as well as content topics (joining, leaving, listing). And, of course, management of the WakuNode instance will no longer be the responsibility of the client (the main objective). Overall, the burden on client implementors (e.g. ourselves with the example client) is lessened in a very happy way.
- Reviewing Vitaliy's PR #249 now that the runtime crashes are fixed.
- next:
- Same as indicated in my notes for Wednesday this week.
**Vitaliy**
- done:
- Fix memory errors in token prices with great help from Michael.
- current:
- go-waku.
- next:
- .
### August 11 (Wednesday) - Sync Meeting
**Eric**
- done:
- Discussed exception handling strategy directly with Jacek and determined that using Results through the codebase is a better strategy that will introduce less bugs in the long term.
- Re-reviewed #259 and made a small change to remove an instance of `raises: [Defect, Exception]`
- Re-revied #267 and asked for a couple of small changes, which Anthony took care of quickly
- Discussed in the Jackalopes sync the fetch api PR #249, hoping to help him get it across the line
- current:
- Researched living examples of Result types progressions in nim libs
- next:
- Start moving core nim-status exceptions to Result
**Michael**
- done:
- Met with Eric on Monday evening (my timezone) and discussed additional recommendations received from Jacek re: error handling.
- Reviewed changes to Eric's PR #265 and made one small touch up. It's now merged.
- Re-reviewed Richard's PR #259 and later pushed some changes, as did Eric. It's now merged. The changes I made involved converting the library's `callRpc` facility from a synchronous proc to an `{.async.}` proc, which required changing other parts of the library, tests, and example client to also work asynchronously. We'll want to be on the lookout for other already-implemented parts of the library that are doing synchronous network i/o, and refactor them accordingly. Going forward, any additions to the library that perform network i/o (possibly other kinds of i/o) should be async.
- Reviewed and re-reviewed Anthony's PR #267 and later pushed some changes, as did Eric. It's now merged.
- Continued the discussion with vac/waku folks and Richard re: waku v2 content topics. See the discord link from my notes for last Friday.
- Created issue #266 re: things I discovered about the `private/tx_history` module.
- current:
- Helping Vitaliy with some difficulties in his PR #249.
- Still working to put up a PR re: the waku integration — Monday afternoon and most of Tuesday did not go as I anticipated.
- next:
- Look into implementing our own `setupNat` helper backed by nim-task-runner instead of relying on the one from nim-eth, which tends to cause problems related to program exit.
- Implement `/switchtopic` and refactor the logic related to `/jointopic` (will be an implicit join+switch) such that sending a message involves only the currently chosen topic.
**Vitaliy**
- done:
- .
- current:
- Trying to resolve SIGSEGV error in token prices PR
- Working on go-waku.
- next:
- .
### August 9 (Monday) - Standup
**Eric**
- done:
- Finished up the exception handling PR and got all tests working locally. For some reason, CI continues to fail, and I'm having trouble figuring out exactly what the difference is between local tests and CI. https://github.com/status-im/nim-status/pull/265
- Added a HackMD book for nim-status developer guides: https://hackmd.io/O8JMi_zYQzCJGnlOvZBlFw
- Added a developer guide for how to handle exceptions in nim-status: https://hackmd.io/rkpbKsEYT_umNlHU1IcbiQ
- current:
- There may need to be some small changes to get the tests working. Could possibly be the dreaded git issue with the nimbus-build-system.
- next:
- Depends on iteration planning
**Michael**
- done:
- Paired with Anthony today re: his work on opensea integration in nim-status.
- Tried to help Boris with a problem he asked about re: some view models in status-desktop, but I'm afraid I wasn't much help, mainly because my familiarity with that code isn't too strong.
- Reviewed Eric's PR #265 — it's huge (and hugely impressive), so it took quite awhile today to go through it all.
- current:
- Rebasing again and doing some additional refactors of my work on the nim-waku integration in light of Eric's PR #265 (exception handling). I should be done before I wrap up by the end of the day, worst case by end of tomorrow.
- next:
- TBD
**Vitaliy**
- done:
- .
- current:
- Day off.
- next:
- .
### August 6 (Friday) - Standup
**Eric**
- current/done:
- Spent a bit of time reviewing the Web3 provider PR.
- Found an issue where saving of Chat objects to the database would not actually save Message and required converting to/from `seq[byte]` at every turn, which is not ideal. I managed to refactor this as part of the exception PR.
- Almost finished all refactored work on the exceptions and tests. Should be done with another 2 hours of work.
- next:
- spend some time rebasing and then documenting the way to correctly handle exceptions in nim-status.
**Michael**
- done:
- Had a meeting with Hanno on Thursday (requested/setup by him) re: waku v2 content topics in relation to status-go/go-waku and nim-status. I started a Discord thread for discussion of the same matter: https://discord.com/channels/624205794384281629/862717376915308544/873251035530006538. Hopefully Oskar, et al. will join in the discussion next week. During the second half of the meeting I gave Hanno a tour of using the example client and an overview of how its codebase is organized and the key concepts (commands, tasks, events, actions).
- Had a long pairing session with Vitaliy on Thursday during which we investigated some strange problems affecting his PR #249. What we found may lead to our filing a bug report for nim-chronos, but I'm not 100% sure. I'll check with Vitaliy again early next week.
- Reviewed Richard's PR #259 (`/call` command) and requested a few changes.
- current:
- Still working on a PR to close #241. It now takes into account the changes in PRs #254, #260, #261, #262 and our refactored approach to error handling, use of the `{.raises.}` pragma, etc. Not simply as a matter of a rebasing, but with regard to the motivations and concepts behind those changes.
- next:
- Help (possibly) Richard create a PR to close #264 so the example client and Status Desktop can communicate in public chats using waku v2.
- TBD
**Vitaliy**
- current/done:
- .
- next:
- .
### August 4 (Wednesday) - Sync Meeting
**Eric**
- current/done:
- I've been busy working on refactoring to include exceptions at all levels of nim-status as a library, such that exceptions raised at the lowest levels are caught where possibly and either translated and re-raised to higher levels, or converted to `Result` types and returned.
- next:
- Finish up this refactor and write documentation for other devs
**Michael**
- current/done:
- Met with Eric in the evening (my timezone) after the Jackalopes meeting on Aug 2. We discussed a number of items related to Eric's PRs #246 and #254 (merged soon afterward), as well additional ideas for code organization and "best practices" we want to consistently use in the library and example client.
- Continued my efforts toward a PR to close #241. However, today (Aug 3) was a mostly a personal day, as I anticipated during my comments toward the end of the iteration call yesterday (Aug 2). A guest would be coming into town, and today happened to be her birthday, and there were some preparations I needed to make: thorough cleaning of my house, etc. I'll pick back up tomorrow and make up for the time throughout the rest of this week.
- Had a 1-1 discord chat with Richard that helped me to better realize Jacek's point re: "longer compilation times" relative to "re-exporting everything at the top-level of a library". Going forward, I'll communicate this understanding with other devs working on nim-status, and I think we should be able to make the structure of `status/api/*.nim` more "effecient" from the perspective or importing those modules and the associated compile-time costs.
- next:
- Wrap up work on a PR to close #241.
**Vitaliy**
- current/done:
- Rebased the prices PR with master; fixing compilation errors resulting from broken vendor deps.
- go-waku peer connectivity error handling.
- PR reviews.
- next:
- still need to fix FutureDefect errors in prices PR.
- continue with go-waku
### August 2 (Monday) - Standup
**Eric**
- current/done:
- Finished splitting up `status/api` in to modules: https://github.com/status-im/nim-status/pull/254.
- next:
- Continue with custom exception handling even if we haven't received the feedback from Jacek. I think I understand a bit more how we should layer our exceptions in our abstractions. Document how we are going to handle public-facing api exceptions (should be `Result[T, U]` type translated from lower layers). Internal return types can be `Option[T]` and/or raise exceptions.
**Michael**
- current/done:
- Still working on a PR to close #241 (move nim-waku usage inside the library). I'm getting close, but there's a lot of refactoring involved.
- Created PR #250 for detection in the Makefile of Debian-based Linux. After detection, INCLUDE/LIB dirs are set appropriately. When testing locally on Fedora, Arch, Ubuntu, it's working as intended, so I went ahead and merged it and mentioned [the details](https://discord.com/channels/624205794384281629/720285913858703391/870742405362638869) to Oskar in `#nim-status`. He has since reported that on Fedora Linux he's able to build and run the example client with the changes in that PR.
- Created PR #251 for basic support of backspace in the example client's input area. It has since been approved and merged.
- Reviewed Eric's PR #254 (status/client -> status/api).
- On my own time, spent the better part of a day trying to fix how the example client handles resizes of the terminal window. It should gracefully redraw the input and output areas, retaining their contents. However, I have not yet hit on the right way to do that with ncurses, despite reading a lot of ncurses man-pages, trying to follow examples that do something roughly similar, and conducting lots of experiments. I think there's something I'm currently missing or misunderstand, i.e. something conceptual. I'll continue to investigate as my personal time allows.
- next:
- Wrap up work on a PR to close #241.
- TBD in iteration meeting.
**Vitaliy**
- current/done:
- Add async handling to https://github.com/status-im/nim-status/pull/249, try to fix FutureDefect crash when `asyncSpawn`'ing the background thread fetching prices from cryptocompare.io'.
- PR reviews
- Bugfixing go-waku's peer management
- next:
- For now continue with Wakuv2.
### July 30 (Friday) - Standup
**Eric**
- current/done:
- Finished work on changing instances of `except Exception as e` to `except CatchableError as e`, and more importantly, adding a `{.push raises: [Defect].}` to the top of each module in the repo. The flow-on effects were to play whack-a-mole with the compiler to modify each proc that threw an exception different to `Defect`. https://github.com/status-im/nim-status/pull/246. Hoping to get feedback from Jacek so I can continue on with refactoring a bit of the exception handling.
- Started working on changing `status/client.nim` to `status/api.nim` and breaking the file up in to sub-modules. This is going to be the public-facing api file and was getting too big for comfort.
- next:
- Finish splitting up `status/api.nim` in to modules.
**Michael**
- current/done:
- Reviewed, made changes to, helped merge PRs #237 and #240.
- PR #242 (first steps toward en/decoding Status payloads) is merged.
- Submitted several PRs (already approved and merged) that logically lead up to moving nim-waku instantiation/usage from the example client into the library itself: #243 (#247 was a redo of 243 because of changes to `master`), #244, and #248.
- Researching how to get nim-status building on non-Debian Linux (e.g. Fedora) per oskarth's report (in Discord) of problems when he attempted to do so (he's using Fedora).
- Effort is ongoing to migrate the waku-usage code from `examples/client/client/tasks.nim` to a module/s inside `status/` (i.e. within the nim-status library, properly speaking).
- next:
- Continue work re: migration of waku-usage code.
**Vitaliy**
- current/done:
- PR reviews, some more small fixes to custom tokens PR.
- ported status-react code for token price fetching (https://github.com/status-im/nim-status/pull/249)
- had a call with Michael on nim-status's async support and nim-task-runner
- next:
- finish https://github.com/status-im/nim-status/pull/249.
### July 28 (Wednesday) - Sync Meeting
**Eric**
- current/done:
- Reviewed en/decode waku v2 PR [#242](https://github.com/status-im/nim-status/pull/242)
- Discussion with michael regarding best way to proceed with exception handling inside of nim-status. Synopsis can be found here: https://discord.com/channels/624205794384281629/720285913858703391/869740387089125376
- Started working on exception handling changes as discussed. In the process of now of the "easy wins" in terms of swapping `except Exception as e` to `except CatchableError as e`, and decorating all modules with `{.push raises: [Defect].}`. The latter has some ripple effects that require decorating all procs that have unlisted exceptions handled with `{.raises:[Defect, ErrorThatIsUnlisted].}`
- next:
- Finish the work above regarding exception handling.
- Next step is to work on adding a custom error type for nim-status, ie `StatusError`, and replacing instances of caught `CatchableError` with their more specific exception types. Some of these types will need to be created.
- formalising a process (incl documentation) of how to handle errors inside of nim-status, ie internally we can raise exceptions and return `Option[T]`, but public-facing APIs should use `Result[T, E]`. Each layer should catch exceptions from the layers below and translate the error for layers above.
**Michael**
- current/done:
- Closed [#217](https://github.com/status-im/nim-status/issues/217) by [#242](https://github.com/status-im/nim-status/pull/242) (still in review).
- Reviewed PRs [#237](https://github.com/status-im/nim-status/pull/237) and [#240](https://github.com/status-im/nim-status/pull/240).
- next:
- Get a PR into draft re: [#222](https://github.com/status-im/nim-status/issues/222) and [#241](https://github.com/status-im/nim-status/issues/241).
**Vitaliy**
- current/done:
- address review comments in custom tokens PR (https://github.com/status-im/nim-status/pull/237)
- review PR #240
- work on `Get fiat price for a token` (https://github.com/status-im/nim-status/issues/238).
- next:
- continue with `Get fiat price for a token` (https://github.com/status-im/nim-status/issues/238)..
### July 26 (Monday) - Standup
**Eric**
- current/done:
- review custom token pr (https://github.com/status-im/nim-status/pull/237)
- Jacek brought up some points about exception handling that is discussed in the style guide and we will need to discuss a bit further.
- work to delete a wallet account. Works similar to login by deleting row by wallet account index. https://github.com/status-im/nim-status/pull/240
- next:
- Update UTC timestamp for keystore file to utc (missed this in a PR review)
- Revisit Jacek's comments regarding exception handling (https://github.com/status-im/nim-status/issues/222)
- Small refactor for library import and re-export (https://github.com/status-im/nim-status/issues/239)
**Michael**
- current/done:
- Still wrapping up work re: #217. I'm on the last step, decoding the round-tripped protobuffers, but am still trying to figure out why I'm having trouble encoding a chat account's public key as `seq[byte]`.
- next:
- Review open PRs.
- Still want/need to implement the critical UI/UX improvements: backspace/delete, scrolling the output buffer, don't lose output on terminal resize.
- TBD in iteration meeting.
**Vitaliy**
- current/done:
- address PR review comments in https://github.com/status-im/nim-status/pull/237.
- next:
- start with `Get fiat price for a token` (https://github.com/status-im/nim-status/issues/238).
### July 23 (Friday) - Standup
**Eric**
- current/done:
- Import wallet account via mnemonic (https://github.com/status-im/nim-status/pull/233)
- Import watch-only wallet account (https://github.com/status-im/nim-status/pull/234)
- next:
- Delete wallet account
**Michael**
- current/done:
- After running into some problems on Wed, I changed direction a bit on how to work with the protobuffers for Status payloads. I ended up adapting some of Richard's previous work on a branch he was working on in Feb/March earlier this year. All of the up-to-date Status protobuffer specs for status-go have copied into nim_status, with slight modifications to make them usable via [nim-protobuf-serialization](https://github.com/status-im/nim-protobuf-serialization) (many thanks to Richard for helping me understand some of the needed changes). The work is on my [feat/encode-decode-message-payload](https://github.com/status-im/nim-status/tree/feat/encode-decode-message-payload) branch, and I'll turn it into a PR as soon I've successfully sent a Status `ChatMessage` protobuffer between two separate instances of the example client communicating via the test fleet for Waku v2. It won't be long now.
- Reviewed Eric's PRs #233 and #234.
- Went over the whole open issue list with Eric in a pairing session Thursday evening, helped formulate some notes relevant to next steps (Eric wrote them into the issues).
- next:
- Review Vitaliy's PR #237.
- Turn my [feat/encode-decode-message-payload](https://github.com/status-im/nim-status/tree/feat/encode-decode-message-payload) branch into a PR ready for review.
**Vitaliy**
- current/done:
- Almost finished with custom tokens support in example chat app https://github.com/status-im/nim-status/pull/237. Had a very helpful session with Michael on the TUI app.
- next:
- Fix actions module procs for token support, address review comments for custom tokens pr
### July 21 (Wednesday) - Sync Meeting
**Eric**
- current/done:
- Finished import of wallet account via private key (https://github.com/status-im/nim-status/pull/229)
- Supports password validation before importing the keystore file. Prevents duplicate keystore files from being imported.
- Add keystore file unit tests for storing and loading of key files
- Change keystore file naming to match status-go: `"UTC--" & dt.format("yyyy-MM-dd'T'HH-mm-ss'.'fffffffff'Z'") & address.strip0xPrefix`
- next:
- Import wallet account via mnemonic
- Few small PR comments to address (https://github.com/status-im/nim-status/pull/223)
**Michael**
- current/done:
- Work re: #217 (encode/decode message payload) is still ongoing, PR should land later today.
- next:
- Review Eric's PR #229.
- Implement in the example client's TUI support for backspace/delete in the input area, scrolling up/down in the output area, and retaining displayed content in the input and output areas after a resize of the terminal. I'll also create GH issues for those things and track in ZenHub.
- Catch up with nim-waku following its big-refactor week (some aspects of Vac/Waku team's refactor stretched into the first days of this week).
**Vitaliy**
- current/done:
- review wallet account generation PR https://github.com/status-im/nim-status/pull/223
- status-go/status-react wakuv2 integration work
- next:
- review https://github.com/status-im/nim-status/pull/229
- work on `List custom tokens` https://github.com/status-im/nim-status/issues/227
### July 19 (Monday) - Standup
**Michael**
- current/done:
- Made additional changes to status-desktop PR #2800 (Windows installer) so that it now builds correctly in Jenkins CI. The installer now offers to create a desktop shortcut (the logic for that was already added by Boris, but the `.iss` file had some problems that caused building the installer to crash). When the Status Desktop app is uninstalled via Window's *Add & remove* panel, the user data directory `%LOCALAPPDATA%\Status` is now automatically deleted.
- Made a small PR re: importing nim-task-runner from `vendor/` instead of having it embedded under `examples/chat/`. Already approved and merged.
- Made a small PR re: switching Windows build logic from MSYS2 MINGW64 to MSYS2 UCRT64. Already approved and merged.
- Continue work re: #217 (encode/decode message payload).
- Reviewd Eric's PR #223 (generate wallet account).
- next:
- Wrap up work re: #217 (encode/decode).
- TBD in iteration meeting.
**Eric**
- current/done:
- Moved some of the create/import account functionality from the example chat client to the nim-status client. While this removes a bit of flexibility from the end client, we don't ever seem to use status-go in any other way, so there doesn't seem to be a point to retain this flexibility.
- Generate wallet account working (https://github.com/status-im/nim-status/pull/223)
- List wallet accounts working (https://github.com/status-im/nim-status/pull/223)
- next:
- Almost all the work to complete #197 has been done in #223, so this work shouldn't have many moving parts now.
**Vitaliy**
- current/done:
- back from vacation
- next:
- reviewing wallet account generation PR https://github.com/status-im/nim-status/pull/223
### July 16 (Friday) - Standup
**Michael**
- current/done:
- Continued investigating difficulties with the status-desktop PR #2800 (Windows installer).
- Reviewed, made some changes to, and merged Eric's PRs #212 (crypto refactor) and #213 (user db accounts CRUD).
- Merged my PRs #210 (join, leave, topics) and #219 (distinguish messages by topic).
- next:
- Continue research and work re: #217 (encode/decode message payload).
**Eric**
- current/done:
- Started creating settings getters from the DB to pass to the client.
- Refactored nim_status client calls to disallow certain operations unless logged in (user db has been inited). Added some tests for these situations.
- Continued work on add/import wallet account
- Investigated how to get a Settings object created when creating/importing an account and started work on that.
- Reviewed #210 and got it merged.
- next:
- Finish add/import wallet account
- All the todos from weds still need to be done (will create tasks)
### July 14 (Wednesday) - Standup
**Eric**
- current/done:
- investigated how status-desktop and status-react generate/import wallet accounts, and discovered that they rely on the last derived index stored in the settings table. I then noticed that we haven't created settings when creating master accounts nor on login.
- created the settings CRUD to get generic setting by type from the db that doesn't rely on having created a full settings row yet.
- created the example client task to generate a wallet account and started to create the flow in the nim-status client file, but got stuck on the settings aspect.
- next:
- Finish flow for generating/importing new wallet account
- Review Michael's join PR (#210)
- Change keystore file naming to match status-go: `"UTC--" & dt.format("yyyy-MM-dd'T'HH:mm:ss'.'fffffffff'Z'") & address.toLowerAscii.strip0xPrefix`
- Change DateTime db conversion to use unix time (int representation)
- On db init (never existing on disk), run migration THEN create settings (leave fleet download out)
- On login, download fleet info -> settings
**Michael**
- current/done:
- Wrapped up PR #210, and Eric has approved it; there's just the question of whether we merge it before #212 (a significant refactor) or afterward (the delay is on me, as I've not yet finished review of #212).
- PR #219 provides for messages received by the example client's TUI to be distinguished re: their respective waku v2 content topics; closes issue #216.
- next:
- Finalize review of Eric's open PRs.
- Begin work on a PR to close issue #217 – `encode / decode message payload...` Research is already underway, there's just nothing of note to report at the present time.
### July 12 (Monday) - Standup
**Eric**
- current/done:
- For the refactor PR to get the keyUid to match, I investigated the gcsafe issue with the refactored code -- the issue was due to forward declarations. Got the tests working, and got a PR up (https://github.com/status-im/nim-status/pull/212). This PR represents the culmination of work I did on Friday, Saturday, Sunday, and part of Monday.
- Created the accounts CRUD (just the `createAccount` for now) for the accounts table of the encrypted DB.
- On account creation (using the `/create <password>` command), the Status default wallet and whisper derived accounts are now being stored in the user DB (using the accounts CRUD) (https://github.com/status-im/nim-status/pull/213).
- On import mnemonic (using the `import <mnemonic> <password>` command), the Status default wallet and whisper derived accounts are now being stored in the user DB (using the accounts CRUD) (https://github.com/status-im/nim-status/pull/213).
- next
- Create the rest of the encrypted accounts CRUD.
- Import wallet account from mnemonic
**Michael**
- current/done:
- PR #210 is almost done, about 30 minutes of changes/additions left to make; will close #195 and #196, and includes a `/topics` command which lists topics that have been joined. #210's PR description will be updated to include explanations of what was done and why relative to how contentTopics in waku v2 work in the context of relay nodes, i.e. versus how one might at first assume they work in a more familiar chat setting, e.g. Discord or IRC, or even public chats in Status mobile/desktop as experienced in their respective UIs.
- next:
- Based on feedback in today's meeting, refactor re: any decisions in #210 that need to be revisited.
- Review Eric's PRs #212 and #213.
- TBD in iteration meeting.
### July 9 (Friday) - Standup
**Michael**:
- current/done:
- On Wednesday, for about half of the day, I helped Boris get his PR for the Windows installer to build correctly, both locally and in Jenkins CI. I also tested that the built installer (both local build and downloaded CI build) runs correctly and that the Status Desktop app it installs works correctly. That PR needs more work before the installer is ready for the next beta, but it's good to see that it can be built and run successfully.
- Still working on the ability to join multiple content topics. See draft PR [#210](https://github.com/status-im/nim-status/pull/210/commits) (will close [#195](https://github.com/status-im/nim-status/issues/195)). This has involved several steps and changes so far:
- Catch up with latest nim-chronos and nim-waku.
- Implement a workaround to avoid a crash that can happen because of a race condition in the shutdown of a thread spawned "under the hood" by nim-eth / nim-nat-traversal. The workaround is a one-liner, but understanding the problem and solution took some research.
- Added support for multiple initial content topics being specified at the start of the program (`--waku-content-topics` instead of "topic" singular). This will work together with specifying additional topics via the `/join` command after the program is started.
- Fixed some bad logic in the config for the example client.
- Removed complexity of `PayloadV1` waku logic because that logic does't work in nim-waku's own `chat2.nim` and therefore is unnecessary at this time.
- Added and changed some `{.threadvar.}` variables (re: tasks in the `status` worker thread) that should persist across `login/logout` (`connect/disconnnect`). This involved coming to a better understanding of how nim-waku's `chat2` uses nim-eth's `setupNat`, which in turn makes use of `nim-nat-traversal`.
- next:
- Finalize the work and PR for the `/join` command, for joining a content topic *after* the example client has been started.
- Close issue [#196](https://github.com/status-im/nim-status/issues/196) by sending any message to all content topics that have been joined.
**Eric**:
- current/done:
- After some further investigation as to why the keyUid was generating incorrectly, it appeared that the accounts generation was quite mixed up compared to what status-go has. Firstly, I refactored the accounts part of the file system to mirror what status-go has (https://github.com/status-im/nim-status/compare/master...refactor/status-go-organisation?expand=1). This made it more clear what we were missing and what we were doing differently from status-go. On top of these filesystem change, I then refactored all existing account generation and import code to use a port of status-go's types and methods (https://github.com/status-im/nim-status/compare/refactor/status-go-organisation...fix/keyuid-in-parity-with-status-go?expand=1). This has significantly cleaned up our crypto usage. It's done and working except for a gcsafe issue that needs to be investigated and getting the accounts tests up to the refactored changes.
- next:
- Investigate the gcsafe issue with the refactored code and get the tests working
- Create the accounts CRUD for the accounts table of the encrypted DB.
- Ensure the Status account and Whisper account are stored in the accounts table of the encrypted db.
- Import an account using a private key
### July 7 (Wednesday) - Standup
**Michael**:
- current/done:
- Removed remaining unnecessary usage of `cast` in nim-status' tests and the example client. Some use of `cast` is still valid within the `task_runner` implementation that's contained in the example client. For details, seem my comments here: https://github.com/status-im/nim-status/pull/200.
- Added basic error handling re: `/login` and `/logout`.
- Attempted to address Jacek's recommendation re: usage of `{.raises: [Defect].}` in code related to `task_runner`. The pragma is now in use, but it's not clear if it's working as expected, need to research it a bit more.
- Researched the relationship between `passphrase` and `password` that come into play re: the `/import` command. It's still not clear if/how `passphrase` should be derived, more research needed.
- Identified a crash that can happen if the same mnemonic is imported twice, i.e. without deleting the database between runs of the `/import` command. See: https://github.com/status-im/nim-status/issues/203.
- Addded a `creationTimestap` to the migrations for the unencrypted `accounts.sql` database. This is (probably) a temporary workaround for some UI/UX deficiencies in the example client, which will be improved over time.
- next:
- Add the ability to join multiple topics on the waku chat2 network; the set of topics will need be to tracked in both the main thread (TUI's thread) and the worker thread running nim-status/waku.
**Eric**:
- current/done:
- added command-specific help and got https://github.com/status-im/nim-status/pull/192 merged
- Reviewed and merged the import mnemonic account PR https://github.com/status-im/nim-status/pull/194. Discussed the various nuances of Jacek's comments to try to understand them and make necessary changes.
- Investigated importing a wallet account with a PK and documented prerequisite tasks that need to be completed beforehand (need to create accounts CRUD and insert a new account when creating an account)
- Currently working on figuring out why the keyUid generated in nim-status is not consistent with the keyUid in status-go (https://github.com/status-im/nim-status/issues/199).
- next:
- Finish the keyUid mismatch task
- UserDB accounts CRUD task (https://github.com/status-im/nim-status/issues/204)
### July 5 (Monday) - Standup
**Eric**:
- current/done:
- Document the process for creating and a command and an action in a [nim-status Developer Guide](https://hackmd.io/LPd8cG9jSS-y_Rk7L8ogIQ)
- next:
- need to wait for the iteration meeting
**Michael**:
- current/done:
- Tied up some loose ends in Vitaliy's PR for the `/import` command. I think it's ready to merge once the lights turn green in CI.
- Researched what we are and aren't currently doing with respect to encrypted user databases.
- Researched why nim-status is not generating the same `keyUid` as status-go for the same seed phrase. I haven't reached a conclusion yet.
- Addressed Jacek's feedback re: `cast`. All usage of `cast` in `nim_status` has been deprecated. We're still doing some `cast`ing in the tests, but that can be cleaned up over time.
- Tried to address Jacek's feedback re: usage of `asyncSpawn` in relation to `task_runner` tasks, but I need to ask him some more questions because I'm not sure we have the same things in mind.
- next:
- Still need to add some light error handling for `/login` but the command does work. Also, I can't print anything from the encrypted database because at present we don't add any data to it when it's initialized.
- need to wait for the iteration meeting
**other meeting notes**:
- discussion of current progress, scope of next tasks
- discussion of feedback we got for task runner
### July 2 (Friday) - Standup
**Michael**:
- current/done:
- Continued work on my PR for `/login` and `/logout` commands. It's working, in a basic sense, but before landing the PR I need to add a bit of error handling, which involves logic in both the task_runner task and the main thread (TUI).
- Identified some aspects of `/login` and `/logout` that need further consideration:
- nim-status currently doesn't hash (with keccak) the user-supplied password for the user database, but we probably should; and we should probably use same/similar hashing strategy used by status-go.
- When an encrypted user database is created, it needs to be populated with "settings" — some derived from the account just created and some from defaults. There is some stub code for that in `nim_status` but it needs to be implemented properly.
- The example client needs, re: current approch to `/login`, a way to deterministically sort the accounts in the accounts database (`data/accounts.sql`). I'm still thinking about the best way to deal with that. In short term probably involves adding a column to the table, e.g. `creationTimestap`.
- Reviewed Eric's PR re: `/help`, paired with him yesterday to discuss it (including some potential changes) as well as my own PR for `/login` and `/logout`, Vitaliy's PR, etc.
- Reviewed Vitaliy's PR re: `/import`, tried to be helpful re: working out a viable "splitting" strategy for the string (mnemonic + passphrase) passed to the command.
- next:
- Implement the error handling for `/login` and `/logout` mentioned above.
- Contribute to documentation re: task_runner in Status Desktop and steps involved in adding new commands/tasks/events to the example client.
- Address a few "pain points" in the TUI, e.g. handling of backspace/delete.
**Vitaliy**:
- current/done:
- importMnemonic nim-status implementation, add relevant TUI commands/tasks; UI crashes fixed with Michael's help
- fix review notes from Eric in https://github.com/status-im/nim-status/pull/194
- next:
- adhere more to style guidelines in the above PR
- off till July 19th
**Eric**:
- current/done:
- implement the Help command which dynamically displays help text and parameter information for each command (https://github.com/status-im/nim-status/pull/192)
- Review the Help PR with Michael and discuss some changes
- Implement the discussed changes in 192
- PR review for Vitaliy's [import mnemonic PR](https://github.com/status-im/nim-status/pull/194)
- next:
- Document creating a command and an action
### June 30 (Wednesday) - Sync Meeting
**Eric**:
- current/done:
- Finalised the create account and list accounts logic and submitted a PR. It includes some changes to migrations so that we no longer need to pass migration definitions when initialising a DB. https://github.com/status-im/nim-status/pull/190 closes [#180](https://github.com/status-im/nim-status/issues/180), [#184](https://github.com/status-im/nim-status/issues/184), [#177](https://github.com/status-im/nim-status/issues/177).
- next:
- Work on the `/help` command and add documentation for creating a command and action through the task runner.
**Michael**:
- current/done:
- Investigated and fixed a CI issue that was causing builds/tests to fail on Windows (not just the example client, but nim-status in general). Also limited the tests workflow to static linking since the "full matrix" of static/shared linking isn't serving much purpose at present, but caused that workflow to take a long time to finish. See: PRs [#186](https://github.com/status-im/nim-status/pull/186), [#187](https://github.com/status-im/nim-status/pull/187), [#188](https://github.com/status-im/nim-status/pull/188).
- Working on `/login` and `/logout` commands and supporting changes, based on Eric's PR branch (now merged) for listing and creating accounts.
- Investigated a "Nim behavior" discovered by Eric whereby an exception type that inherits from Nim's built-in `Defect` is caught by `try/except` even though that's not supposed to be possible per Nim's documentation. Per discussion on the Nimbus discord, it can/does happen sometimes even though it's not supposed to happen; there's not much to do about it except keeping aware of it and being careful to not rely on the mis/behavior — in contexts where an exception type deriving from `Defect` might be inadvertently caught (we don't have too many), perhaps we should re-raise such exceptions and allow the program to exit with error (which is what `Defect` *should* cause to happen)?
- next:
- Get my PR for `/login` and `/logout` commands out of draft and ready to merge; requires a bit more work.
- Collaborate with Eric to document (existing) task_runner / multithreading in Status Desktop.
**Vitaliy**:
- current/done:
- go through task/command implementations in Eric's PR (https://github.com/status-im/nim-status/pull/190/files) so that to familiarise myself with the TUI framework
- next:
- implementing importMnemonic in Nim, converting it from status-go code
### June 28 (Monday) - Iteration Meeting
**Agenda**
- plan out tasks for this cohort
**iteration highlights**
- nim-status#173 - Terminal Chat client in master
- nim-status#182 - Account Login
- nim-status#184 - Create Account
- nim-status#185 - Seed phrase import
- [see zenhub for other tasks](https://app.zenhub.com/workspaces/nim-status-client--nim-status-5ea70d29c12ee928df5ae848/board?milestones=Jackalope%20Cohort%20-%20Iteration%201%232021-06-06&filterLogic=any&repos=379634483,264545442,263323492,194023285,348004540,315785387,264545612,261270348,363196185&showPRs=false)
**Eric**:
- current/done:
- There are two commits that have made significant progress towards the goal of listing accounts, both on branch https://github.com/status-im/nim-status/tree/feat/examples/client-list-accounts
1. https://github.com/status-im/nim-status/commit/4c06d1e66d8c217664073330755d5c3ebbfcc35f This allows us to list accounts succesfully.
2. https://github.com/status-im/nim-status/commit/c5d81b4ec523c70d4023c6eb08bced3d935a437e This is an attempt to allow us to create accounts. We can successfully create a multiaccount and store the account in the db, but for some reason listing accounts creatd with this method is causing an erro and needs further investigation.
- next:
- ...
**Michael**:
- current/done:
- I discovered after the previous standup (last Friday, June 25) that the merges Eric and I made to the `master` branch of nim-status (mostly re: Vitaliy's previous work) had gone seriously awry. It wasn't obvious while we were working on them because we were being careful to do clean builds and run all the tests as we stepped through the PRs/commits. However, by the time of our last merge we had erased work done earlier in our pairing session.<br/><br/>I ended up redoing that same work in a fresh clone and reset the `master` branch — not ideal, but any other approach would have been messy and/or error prone. I rebased the example client on cleaned-up `master`, which also involved redoing some previous work, but it went smoothly because I already knew what to do.<br/><br/>These efforts consumed all of my Friday (June 25).
- Write a [proper PR description](https://github.com/status-im/nim-status/pull/173) for the example client, continue adapting TBDChat code, and be ready to merge by time of Jackalopes iteration meeting today (Monday, June 28).
- Early review of Eric's new work in [feat/examples/client-list-accounts](https://github.com/status-im/nim-status/commits/feat/examples/client-list-accounts).
- next:
- More commands/events (TBD) re: existing nim-status functionality.
- (?) Move nim-waku initialization/startup code inside nim-status (it's currently inside the example client). Maybe it's too early to attempt this effort.
- Update the [Terminal App](https://hackmd.io/@status-desktop/B1naRjxh_/%2Fh9BJsywQQDW5gr0QNlO3tQ) and nim-status [Roadmap & Progress ](https://hackmd.io/@status-desktop/B1naRjxh_/%2FEi0hbr2TQTCz7b1qva31iw) pages on HackMD with screenshots and notes reflecting current progress.
**Other meeting notes**:
- discussing [Threads & Concurrency](/4ShP0jBUSZGo5W-aDTpFdQ) article, current way desktop does tasks and the new way to this with the task-runner work
- would be prudent to soon update desktop to the new version of the task runner
- this would be 4 separate tasks: add tests, create readme, move from nim-status to task runner to create a library, update code on status desktop
- discussion about adopting nim-status later in desktop, all apis are async unlike status-go so it might be a big change, we should investigate changing the codebase from now to assume async apis
- dicussion about issue with nim-eth that will need to be fixed
- discussion about missing application layer implemented in nim (nim-status is raw)
### June 25 (Friday) - Standup
**Eric**:
So far, all work done has been to achieve the goal of being able to list accounts in the example chat client. A lot of effort was made in merging existing work and we are very close to being able to achieve the final goal.
- current/done:
- Get up to speed on the current state of nim-status. Discuss potential architectural ideas, discuss the way forward, create a few tasks to complete.
- [Attempt to instantiate `Status` (`nim-status`) object inside client task](https://app.zenhub.com/workspace/o/status-im/nim-status/issues/178)
- The `StatusObject` (nim-status intialisation object that is to be tracked inside of nim-status) was able to be instantiated from within the chat example client with a few tweaks and changes. These changes were brought over to Vitaly's PR.
- [Review capability of `nim-status` to generate accounts and fresh databases](https://app.zenhub.com/workspace/o/status-im/nim-status/issues/179)
- This mainly involved going through Vitaly's open PR, rebasing it on top of master, and ensuring it worked correctly (DBs created in the correct directory, utilise the introduced StatusObject.new initialisation) and tests passed. The PR was merged.
- next:
- [Call list accounts in chat client and show on screen](https://app.zenhub.com/workspace/o/status-im/nim-status/issues/180)
- The groundwork has been laid to successfully create and list accounts in nim-status. We need to create a command in the chat client to list account which involves creating a task and executing the listing of accounts as part of the task runner.
- (unrelated to nim-status: I've also spent a fair bit of time/effort on re-doing some open PRs, mainly fixing the auto-join feature of Communities)
**Michael**:
- current/done:
- [written post June 24, sorry] Everything relevant was already detailed by Eric (see above for June 24).
- In summary, several efforts since midweek and previously helping Eric get up to speed with the example client concepts and codebase:
- Worked with Eric to outline some immediate-future tasks/epics for nim-status / example client.
- Continued efforts to adapt the most desirable client behaviors/capabilities of [TBDChat](https://github.com/mgeitz/tbdchat/tree/master/client), which is the C codebase I found on GitHub that provides solid examples of how to use ncurses to build a simple but effective TUI.
- Fix/refactor open nim-status PRs that were viable and needed (Vitaly's previous work) and close others that were no longer relevant.
- next:
- Write up a proper PR description for the example client, continue adapting TBDChat code, and be ready to merge by time of Jackalopes iteration meeting on Monday, June 28.