Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

get node urls from v2 core #29

Merged
merged 2 commits into from
May 2, 2019
Merged

get node urls from v2 core #29

merged 2 commits into from
May 2, 2019

Conversation

bucko13
Copy link
Contributor

@bucko13 bucko13 commented May 2, 2019

Makes several updates to support new v2 network:

  • New test datasets that reflect new API
  • A little more fault tolerant around node discovery since this will be less reliable as the network becomes more decentralized
  • Updates tests to reflect some of these changes

@bucko13 bucko13 requested a review from jacohend May 2, 2019 21:47
@bucko13 bucko13 merged commit 20b509e into core-v2-support May 2, 2019
@bucko13 bucko13 deleted the discovery branch May 2, 2019 22:03
jacohend added a commit that referenced this pull request Feb 4, 2020
* Upgrade Webpack@4 along with all other webpack/babel related packages. Included node-externals which dropped the size of Node.js bundle down to ~14kb.

* Removed module.exports block as you cannot mix import with module.exports with Webpack

* Refactored to use new HTTP-client (fetch & node-fetch).

* Refactored code to use node-fetch http client
* Wrote promiseMap function which mimics the factory pattern, but is creating new HTTP requests not objects
* Minor changes to webpack & package.json to clean things up

[Finishes feature]

* Minor webpack optimization to expose chainPoint global variable and to export default.

* removed unneeded export statements

* Version bump to 0.2.5

* Fixed exports issue where exports default {} is not being respected unless you prepend export to each method being exported

* add support to return raw tx of btc anchors

* add expected value for merkle root of btc anchor

* add block height to btc branch return

* cleanup

* Version bump

* Updated eslint, git settings

* Remove .vscode

* Ignore .vscode

* Updated copyright

* Remove dist and update npm scripts (#16)

* remove dist folder

* gitignore dist directory

* add lint and prepublish scripts to build dist

* ignore yarn error logs

* update local version of prettier

* Add CI, testing framework, and coverage reporting (#17)

* add travis.yml

* add mocha for tests

* add coverage support

* multiple jobs to run for unit tests and linting tests for clarity

* modularize utility functions (#18)

* modularize utils

* separate helpers and proof utils

* fixes (#19)

- moves `promiseMap` and `sha256FileByPath` to `helpers`
- updates lint script to check new `lib` directory

* move out network related functions (#20)

* move submitHashes and submitFileHashes into own file (#21)

* move submitHashes into own file

* convert submitHashes to async/await and refactor some code to KISS it

* need to always run webpack before tests since bundle-test needs the most recent bundle

* Move out rest of methods- get, evaluate, verify (#22)

* move getProofs to its own file

* move out verify and evaluate

* convert to async/await

* Async awaitify utils (#23)

* initialize unit testing with network utils and helpers (#24)

* updates test scripts and CI
* add coverage for lib/utils/network
* add coverage for lib/utils/helpers
* refactor promiseMap to fetchEndpoints

* add proof utils tests (#25)

* add proof utils tests
* add testing data

* add tests for primary methods (#26)

This pr brings coverage for the client-js library up to over 87%

* add tests for submitHashes
* add tests for getProofs
* add tests for submitFileHashes
* add tests for evaluateProofs
* update normalizeProofs to account for empty proofs returned by bad nodes
* adds testing data to stub network responses
* updates e2e tests to always use trusted/known nodes

* update readme for callback deprecation (#27)

* add polyfill (#28)

* get node urls from v2 core (#29)

Makes several updates to support new v2 network:

* New test datasets that reflect new API
* A little more fault tolerant around node discovery since this will be less reliable as the network becomes more decentralized
* Updates tests to reflect some of these changes

* add bcfg support for config loading

* use config for constants and node discovery

* cleanup

* add better handling of node health check by requesting in parallel with Promise.all and enabling timeouts for fetch in browser

* cleanup

* Added prettier tag

* Updated chainpoint-parse version

* Updated chainpoint-parse package

* clean up logging for bad network connections

* update deps

* add prepare script

* filter tbtc and btc in flatten btc branches

* change webpack command to build for clarity and npm script consistency

* update readme

* update client to latest v4 proof packages

* fix lockfile versions

* Use block height instead of uri as index

* compatibility fixes

* apply block height fix

* undo import changes

* remove old hashIdNode references

Co-authored-by: Jason Bukowski <jasonbukowski@users.noreply.github.com>
Co-authored-by: Buck Perley <bucko.perley@gmail.com>
@jacohend jacohend mentioned this pull request Feb 4, 2020
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.

3 participants