Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADP-3344] Implement rollBackward for the Deposit Wallet #4776

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

HeinrichApfelmus
Copy link
Contributor

@HeinrichApfelmus HeinrichApfelmus commented Sep 16, 2024

This pull request implements the rollBackward function for the Deposit Wallet.

  • We use the RollbackWindow data type to decide whether we need to roll back all the way back to genesis.
  • The Cardano.Wallet.Deposit.Pure.Submissions module remains a mock implementation for now.

Issue Number

ADP-3344

@HeinrichApfelmus HeinrichApfelmus self-assigned this Sep 16, 2024
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3344/deposit-rollback branch 2 times, most recently from d699139 to bbc4d1c Compare September 17, 2024 13:40
@HeinrichApfelmus HeinrichApfelmus changed the base branch from master to HeinrichApfelmus/ADP-3344/deposit-mock September 17, 2024 13:41
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3344/deposit-mock branch 2 times, most recently from 344d431 to f28d652 Compare September 18, 2024 14:57
Base automatically changed from HeinrichApfelmus/ADP-3344/deposit-mock to master September 19, 2024 09:39
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3344/deposit-rollback branch 3 times, most recently from 4aff6d9 to 0990c61 Compare September 20, 2024 15:54
@HeinrichApfelmus HeinrichApfelmus marked this pull request as ready for review September 20, 2024 15:55
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3344/deposit-rollback branch 6 times, most recently from 6a7061d to d9d9799 Compare September 28, 2024 12:07
testGenesis :: Read.GenesisData
testGenesis = undefined

payFromFaucet :: [(Write.Address, Write.Value)] -> Read.Tx
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about other types of txs, like spending from our addresses ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, a test that rolling back a spent input works is desirable. I have added a mock function spendOneTxOut and used it.

This is as far as I would like to take testing this feature for now. I'll add documentation for the properties that we would expect on a rollback to the Agda code.

@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3344/deposit-rollback branch 3 times, most recently from 3a3ed5e to 3d903f0 Compare October 1, 2024 11:00
Copy link
Collaborator

@paolino paolino left a comment

Choose a reason for hiding this comment

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

🙇

@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3344/deposit-rollback branch from 3d903f0 to ce1ec9c Compare October 2, 2024 09:56
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3344/deposit-rollback branch from ce1ec9c to e2cdefd Compare October 2, 2024 11:22
@HeinrichApfelmus HeinrichApfelmus added this pull request to the merge queue Oct 2, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 2, 2024
@HeinrichApfelmus HeinrichApfelmus added this pull request to the merge queue Oct 2, 2024
github-merge-queue bot pushed a commit that referenced this pull request Oct 2, 2024
This pull request implements the `rollBackward` function for the Deposit
Wallet.

* We use the `RollbackWindow` data type to decide whether we need to
roll back all the way back to genesis.
* The `Cardano.Wallet.Deposit.Pure.Submissions` module remains a mock
implementation for now.

### Issue Number

ADP-3344
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 2, 2024
@HeinrichApfelmus HeinrichApfelmus added this pull request to the merge queue Oct 2, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 2, 2024
@HeinrichApfelmus HeinrichApfelmus added this pull request to the merge queue Oct 2, 2024
Merged via the queue into master with commit 99606f7 Oct 2, 2024
25 checks passed
@HeinrichApfelmus HeinrichApfelmus deleted the HeinrichApfelmus/ADP-3344/deposit-rollback branch October 2, 2024 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants