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

feature: add block_headers and blocks streams full APIs (w/ checkpoint and reorg handling) #10

Merged
merged 18 commits into from
Aug 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
67e5f0a
feature: implement an initial mempool.space websocket client, and lib…
oleonardolima Jul 7, 2022
7816922
feature: add unit and integration tests to block events from #8
oleonardolima Jul 7, 2022
2b4f04a
feat+test: add initial http client and tests
oleonardolima Jun 27, 2022
c6f3505
wip(feat): add initial approach for subscribing to blocks from a star…
oleonardolima Jun 27, 2022
71778c0
wip(feat): fix fn and use a tuple as return type for prev and new blo…
oleonardolima Jun 27, 2022
1a4bf12
wip(refactor): initial updates for fns refactor and architecture change
oleonardolima Jun 29, 2022
220be90
wip(feat+refactor): add fn to process candidate BlockHeaders, handle …
oleonardolima Jul 1, 2022
0ce755d
wip(refactor+docs): extract fns to cache struct, and add documentatio…
oleonardolima Jul 5, 2022
3902f51
wip(fixes+tests): fixes, improve error handling and add new integrati…
oleonardolima Jul 6, 2022
d199590
wip(fix+test): fix common ancestor and fork branch bug, add new reorg…
oleonardolima Jul 6, 2022
d6b282f
fix: disconnected and connected block events emitting order for reorg…
oleonardolima Jul 6, 2022
3c8191b
chore: simplify cli usage and output
oleonardolima Jul 6, 2022
2ad93bc
chore: update docs and readme examples, use u32 instead of u64
oleonardolima Jul 6, 2022
f8ce1ef
fix: remaining cargo.toml conflicts from other branches
oleonardolima Jul 7, 2022
2b9e908
feat: add full block stream api, better error handling
oleonardolima Jul 26, 2022
4148fc1
refactor: do not use features expect two base_url instead, and improv…
oleonardolima Aug 4, 2022
fa4775f
chore: add and update CHANGELOG.md file
oleonardolima Aug 9, 2022
c52c1b4
fix(test): docs and integration tests
oleonardolima Aug 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!-- You can erase any parts of this template not applicable to your Pull Request. -->

### Description

<!-- Describe the purpose of this PR, what's being adding and/or fixed -->

### Notes to the reviewers

<!-- In this section you can include notes directed to the reviewers, like explaining why some parts
of the PR were done in a specific way -->

### Checklists

#### All Submissions:

* [ ] I've signed all my commits
* [ ] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [ ] I ran `cargo fmt` and `cargo clippy` before committing

#### New Features:

* [ ] I've added tests for the new feature
* [ ] I've added docs for the new feature
* [ ] I've updated `CHANGELOG.md`

#### Bugfixes:

* [ ] This pull request breaks the existing API
* [ ] I've added tests to reproduce the issue which are now passing
* [ ] I'm linking the issue being fixed by this PR
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
- Add `block_events::websocket` client, and a `websocket::listen_new_block_headers` fn to get a stream of websocket messages.
- Add `block_events::http` client, and multiple fns to consume data from mempool.space and/or esplora REST APIs.
- Add `block_events::api` with multiple structs and definition for responses, such as: `BlockExtended` and events as `BlockEvent`
- Add `block_events::subscribe_to_block_headers` fn in order to return a `Stream` of `block_events::api::BlockEvent(bitcoin::BlockHeader)`.
- Add `block_events::process_blocks` to handle block reorganization, manage in-memory cache struct `BlockHeadersCache`, and propagate errors to caller.
- Add `block_events::subscribe_to_blocks` fn in order to return a `Stream` of `block_events::api::BlockEvent(bitcoin::Block)`.
Loading