Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Make develop great again #3462

Merged
merged 29 commits into from
Aug 24, 2018
Merged

Make develop great again #3462

merged 29 commits into from
Aug 24, 2018

Conversation

KtorZ
Copy link
Contributor

@KtorZ KtorZ commented Aug 23, 2018

This brings back develop to what it was before the incident, minus CBR-97.

MarcFontaine and others added 20 commits July 31, 2018 14:06
Also placate hlint, stylish-haskell, stack2nix
[DEVOPS-1005] Fix Argument list too long `cc' failed in phase `Linker…
make stylish-haskell and hlint available inside nix-shell
This PR makes a number of changes:

* Rename the old `Cardano.Wallet.API.Internal.Handlers` module to
  `Cardano.Wallet.API.Internal.LegacyHandlers`, and introduce a new
  `Cardano.Wallet.API.Internal.Handlers` module.

* Add new field to the kernel DB: the updates downloaded by the launcher,
  along with the necessary functions to work with this new data.

* A new API endpoint for checking for updates

* `nextUpdate`, `applyUpdate`, `postponeUpdate` and `resetWalletState`
  entries in the `PassiveWalletLayer`, along with implementations for the kernel
  for all of these except for `resetWalletState` (CBR-393)

* An implementation of the new check-for-update endpoint also for the legacy
  implementation.

* New functions in the `NodeStateAdaptor` that can be used to wait for an
  update notification from the launcher and one to trigger a shutdown.
  (This required extending the internal environment used in `WithNodeState`
  with a logger function.)

This means that except for the reset internal wallet state, the internal
endpoints are now implemented. However, this does _NOT_ yet include a plugin
that  lists for updates and notifies the wallet layer when they come available.
This should be done as part of CBR-377.
This was introduced separately as a change on top of the previous develop and therefore,
used the structured logging right away and didn't get affected when removing the
structured logging PR. The logging is still needed (for the triggerShutdown) function,
but the old onw so I've adapted the code, reverting the changes and providing WithLogger
instance for the 'WithNodeState m' Monad
CBR-97 (structured logging) has introduced regressions not detected
by the CI nor testing. The whole PR has been reverted, introducing
possible inconsistency between your local 'develop' and this upstream.

Let's call `develop` the upstream `develop` branch, and `develop-local`
your local `develop` banch.

From here, the best way to go is to:

- Rebase your branches onto this new develop. We are basically telling
  git where is the beginning of the branch (`develop-local`) and on
  top of what references it should put the branch (`--onto develop`):

    git checkout whatever-feature-branch
    git rebase --preserve-merges develop-local --onto develop

- Then, reset your local develop to this very commit (or above):

    git checkout develop
    git reset --hard <commit-hash>

Good Luck!
@KtorZ KtorZ requested a review from dcoutts August 23, 2018 15:42
@KtorZ
Copy link
Contributor Author

KtorZ commented Aug 23, 2018

When merging this, make sure to select the right merge option and do a fast forward merge (without merge commit)

k0001 and others added 7 commits August 23, 2018 19:18
The new implementation is _significantly_ simpler than the one in the legacy
wallet. In particular, we do not bother to run coin selection. Instead, we
simply

1. Check if there is a UTxO available to the redemption address in the node's UTxO
   There can be at most 1; if 0, already redeemed.
2. Construct a transaction containing a single input and a single output (to a
   freshly generated address), for the full amount of the voucher.

I've verified this approach with a bunch of people and tried to compare it to
the redemption transactions that actually currently exist on the blockchain,
and it seems this is indeed the right approach.
[CBR-371] wallet-new: add tests for Servant's listAddresses endpoint
[CHW] Implement basic handlers for work with external wallets.
@KtorZ KtorZ removed the request for review from dcoutts August 24, 2018 08:03
Copy link
Member

@erikd erikd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to make develop great again!

@KtorZ KtorZ merged commit 03af824 into develop Aug 24, 2018
@KtorZ KtorZ deleted the develop-new branch August 24, 2018 12:28
KtorZ added a commit that referenced this pull request Nov 9, 2018
KtorZ added a commit to input-output-hk/cardano-wallet-legacy that referenced this pull request Nov 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants