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

Additions structure field tx changed to txs #972

Closed
wants to merge 14 commits into from

Conversation

Shourya742
Copy link
Contributor

@Shourya742 Shourya742 commented May 5, 2023

Description

This PR solves the issue : #954

Notes to the reviewers

Additions structure field "tx" is changed to "txs" and relevant changes are made to all files using it.

Changelog notice

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

Bugfixes:

  • I'm linking the issue being fixed by this PR

Copy link
Contributor

@vladimirfomene vladimirfomene left a comment

Choose a reason for hiding this comment

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

Can you squash all the commits into one?

@Shourya742
Copy link
Contributor Author

Can you squash all the commits into one?

I am facing some issues while squashing the commit. Don't know why there are merge conflicts. I am quite new to this and it's a bit confusing. Please help me with this. Sorry for the inconvenience.
Screenshot (396)

@vladimirfomene
Copy link
Contributor

@Shourya742 I think you merged your changes into upstream/master instead of rebasing your changes on it. That is what is stopping you from squashing these changes. You have to do an interactive rebase where you get rid of that merge commit. You can read more about rebase here: https://www.youtube.com/watch?v=7Mh259hfxJg. Let me know how it goes.

@Shourya742
Copy link
Contributor Author

Thank you @vladimirfomene for your assistance, I gained a lot of knowledge from this experience. Could you kindly review the branch and provide any suggestions for changes? I appreciate your help!

Copy link
Contributor

@vladimirfomene vladimirfomene left a comment

Choose a reason for hiding this comment

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

Review ACK 0026848. You might want to read this article: https://danielabrozzoni.com/posts/contributing_to_oss/. It will help you on your journey as you strive to make progress as a contributor.

@Shourya742
Copy link
Contributor Author

Shourya742 commented May 12, 2023

@vladimirfomene Thanks, will go through the article.

@notmandatory notmandatory added this to the 1.0.0-alpha.1 milestone May 23, 2023
@Shourya742
Copy link
Contributor Author

@vladimirfomene Hello, may I inquire if there is any particular issue concerning the pull request? I'm curious as to why it has not yet been merged.

@vladimirfomene
Copy link
Contributor

@evanlinjin, can you look into merging this?

Copy link
Member

@danielabrozzoni danielabrozzoni left a comment

Choose a reason for hiding this comment

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

utACK 0026848 - looks good to me

@danielabrozzoni
Copy link
Member

danielabrozzoni commented May 24, 2023

I can't merge as your commits aren't signed, can you fix? https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

@evanlinjin
Copy link
Member

evanlinjin commented May 24, 2023

Thank you for the work but please don't merge this. Will result in a lot of pain and conflicts imo.

I suggest we wait until #976 is merged, or we base this work on top of #976.

However, this is such a minor change that can be handled with rust-analyzer in one go anyway.

@Shourya742
Copy link
Contributor Author

Thank you, @evanlinjin, for your assistance. There are no problems at the moment. I will patiently wait until #976 is merged. Once it is, I will update the commit and request a review. I am hopeful that my first contribution will be merged. In the meantime, I will explore other issues.

evanlinjin and others added 13 commits May 26, 2023 19:37
This is to make it easier for chain source crates to formulate updates.
This allows us to skip adding an extra input to `Wallet::insert_tx`.

Also remove redundant logic.
There are a number of improvements that can be done, but it is in a
decent state to be usable.

Possible improvements:

* Remove requirement to retry obtaining ALL data after reorg is
  detected. Transactions can be anchored to a lower block (not block
  tip), and an `assume_final_depth` value can be used.

* The logic to finalize an update with confirmation time can be improved
  during reorgs to not require returning an error.
This is the equivalent of `keychain_tracker_example_cli` that works with
the redesigned structures.
This is a version of `keychain_tracker_electrum` that uses the
redesigned structures instead.
This corresponds to `keychain::KeychainChangeSet` but for the redesigned
structures with `LocalChain`.

This structure is now used in `Wallet` as well as the examples.
* `ElectrumUpdate::missing_full_txs` now returns a `Vec<Txid>` so we
  don't keep a reference to the passed-in `graph`.

* `ElectrumUpdate::finalize*` methods now takes in `missing` txids
  instead of `full_txs`. `Client::batch_transaction_get` is called
within the methods.

Other changes:

* `wallet::ChangeSet` is now made public externally. This is required as
  a wallet db should implement `PersistBackend<wallet::ChangeSet>`.
All associated examples are also updated.
Other changes:

* The `async-https` feature of `bdk_esplora` is no longer default.
* Rename `ObservedAs` to `ChainPosition`.
* Set temporary MSRV to 1.60.0 to compile all workspace members will all
  features.
@evanlinjin
Copy link
Member

evanlinjin commented May 26, 2023

@Shourya742 because #976 is basically ready to be merged (waiting on reviews by others). I suggest that we rebase this work on top of that PR. I can cherry-pick that commit to be part of #976.

Remember that we need a signed commit.

@Shourya742
Copy link
Contributor Author

Shourya742 commented May 26, 2023

Hello @evanlinjin, I have rebased my local issue branch onto your wallet_redesign branch. It is possible that I may have misunderstood the instruction to "rebase this work on top of that PR." Please find attached the current commit graph for your reference. Moreover, I have resolved all merge conflicts encountered during the rebase and have made necessary changes to electrum_ext.rs.

Commit Graph

@evanlinjin
Copy link
Member

@Shourya742 where did you push it? I don't have access to your local branches.

The commit I see in this PR is 0026848 which is different to that in the image.

@Shourya742
Copy link
Contributor Author

@evanlinjin No, I haven't pushed the code yet. I was just hoping to ensure that I handled the rebase correctly or if I may have made any errors. If everything is in order, I would proceed with pushing the code.

@evanlinjin
Copy link
Member

@Shourya742 the commit history looks good. Please make sure tests pass, clippy is happy and everything compiles before pushing.

@Shourya742
Copy link
Contributor Author

@evanlinjin I have completed running the tests, and Clippy appears to be good. I have also signed the commit. Kindly review it, please.

crates/chain/src/chain_graph.rs Outdated Show resolved Hide resolved
Changed txout to txouts field in Addition Structure

Some more changes

Changes made after rebasing to wallet_redesign branch

Removed chain_graphs
@Shourya742
Copy link
Contributor Author

@evanlinjin have a look...

@evanlinjin
Copy link
Member

I've cherry-picked the commit to #976 and gave it a proper commit message. In the future, please remember to clean up your commit messages.

The new commit: 965cbe6

This PR is no longer needed.

@evanlinjin evanlinjin closed this May 27, 2023
@notmandatory notmandatory removed this from the 1.0.0-alpha.1 milestone Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

7 participants