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

merge develop to master #1558

Merged
merged 555 commits into from Dec 3, 2018

Conversation

Projects
None yet
@faustbrian
Collaborator

faustbrian commented Dec 3, 2018

No description provided.

faustbrian and others added some commits Oct 30, 2018

refacor: avoid the non-deterministic setTimeout (#1249)
refactor: avoid the non-deterministic setTimeout
refactor: peer ban after fork (#1258)
* feat: store peers by height

* refactor: refresh peers after fork

* feat: ban peer after fork

* fix: change order of suspension
fix(misc): lowercase orderBy params (#1275)
* fix(core-graphql): lowercase orderBy params

* fix(core-api): lowercase orderBy params
test: add --runInBand jest's argument where it is missing (#1278)
Without it, if there is more than one test file (__tests__/*.test.js)
then jest would try to start them in parallel, leading to multiple
"Starting P2P Interface" followed by
"Error: listen EADDRINUSE 0.0.0.0:4000"
test: remove test commands from packages that don't have tests (#1279)
core-error-tracker-bugsnag and core-error-tracker-sentry do not have
tests and running `yarn test*` in their directories produces an error.
fix(core-tester-cli): fee parsing & display output in ark (#1280)
* fix(core-tester-cli): fee parsing
* fix(core-tester-cli): multiply by 10^8
* fix(core-tester-cli): display output in ark

faustbrian and others added some commits Nov 28, 2018

test: pool wallet "chained transfers" tests (#1530)
## Proposed changes

Tests for "chained transfers" : for example A => B => C with B and C being cold wallets.

Default behavior now is B => C cannot happen if B didn't received first a transaction, forged in a block (so can't do A => B => C within the same block).

## Types of changes

- [x] Test (adding missing tests or fixing existing tests)

## Checklist

- [x] I have read the [CONTRIBUTING](https://docs.ark.io/developers/guidelines/contributing.html) documentation
- [x] Lint and unit tests pass locally with my changes
fix(core-transaction-pool): fix cold wallet check (#1533)
## Proposed changes
<!--
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
-->
Also check if recipient balance is zero. And don't purge transactions of recipient when apply failed.

## Types of changes
<!--
What types of changes does your code introduce?
_Put an `x` in the boxes that apply and remove the rest of them: keep this PR as concise, but descriptive, as possible.._
-->

- [X] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Refactoring (improve a current implementation without adding a new feature or fixing a bug)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Build (changes that affect the build system)
- [ ] Docs (documentation only changes)
- [ ] Test (adding missing tests or fixing existing tests)
- [ ] Other... Please describe:

## Checklist
<!--
_Put an `x` in the boxes that apply and remove this text and the rest of them. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
-->

- [x] I have read the [CONTRIBUTING](https://docs.ark.io/developers/guidelines/contributing.html) documentation
- [x] Lint and unit tests pass locally with my changes
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] I have added necessary documentation (if appropriate)
<!--

## Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
-->
fix(core-p2p): properly filter out any version mismatch peers (#1529)
* refactor(core-p2p): exclude bad peers from discovery
* refactor(core-p2p): add peer checks also if discovery fails
* refactor(core-p2p): log how many peers for which version were found
* fix(core-p2p): manually set peer headers in acceptNewPeer
* fix(core-p2p): pass the full peer to the blacklist check
* fix(core-p2p): store backup peers with version and verify it on start
* test(core-p2p): set the version of the mock peer
* test(core-p2p): do not expect the mock peer to be discovered
* refactor(core-p2p): add the nethash to broadcast info
* refactor(core-p2p): add pending peer later on
feat: add git commit hash for development environments to peers (#1532)
* feat(core-p2p): add git commit hash for development environments to peers
* feat(core-api): return peers with their hashid on development networks
* fix(core-p2p): parse the hashid header
fix(core-p2p): properly filter out any version mismatch peers (#1535)
*          fix(core-p2p): properly filter out any version mismatch peers

*        refactor(core-p2p): increase delay between peer discovery

*         fix(core-p2p): expect minimumNetworkReach peers to be satisfied

*            fix(core-p2p): only delay for discovery error in a real environment

*          fix(core-p2p): do not update network status in tests
feat(core-p2p): add hashid peer log for development networks (#1540)
## Proposed changes

Adds a log for the hashid of peers to easily see on start how many nodes run on which commit.

```
[2018-11-29 10:19:51][INFO]    : Discovered 94 peers with 2.0.0 as version.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 2890ec0 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 6 peers with d2d2035 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 4e8eba4 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with bc76f10 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 83a4701 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with d675236 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with e02cf57 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 30 peers with undefined as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with c7c1ce7 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 7490a6e as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with c983661 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 0a8c7e5 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with c728e65 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 5ebaf11 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 870ba51 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with bd74756 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 085e085 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with e230873 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 565754e as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 007a535 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with c8b5f68 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with d955375 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 61a0683 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with c4b2b3d as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 5fce8d4 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with a121d25 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with c6828e3 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with aa61379 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 2dc9f96 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 1687b26 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 5a79058 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 2cc8e1e as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 0b5b1c4 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 38a2e3c as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 4169f7c as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 8475a5e as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 8008fe2 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with fd9a815 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 4263ad5 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 39a749f as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with c7e68c2 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 7 peers with d2d2035 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 1a1417c as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with c7cf847 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 4abd149 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 54e9846 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 65e2aa4 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with d9de5af as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with d716168 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 23fa4b8 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with fe12b3d as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 99a90fa as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with 4dc6207 as hashid.
[2018-11-29 10:19:51][INFO]    : Discovered 1 peer with fb5032c as hashid.
```

## Types of changes

- [x] New feature (non-breaking change which adds functionality)

## Checklist

- [x] I have read the [CONTRIBUTING](https://docs.ark.io/developers/guidelines/contributing.html) documentation
- [x] Lint and unit tests pass locally with my changes
fix(core-database-postgres): add missing block_id index to transactio…
…ns table (#1545)

* fix(core-database-postgres): add missing block_id index to transactions table

* test(core-api): expect matching block ids instead of transaction ids
test: pool wallet manager update wallets when receiving new block (#1548
)

* test: pool wallet manager should apply forged block reward to wallet

* test: add transaction to forged block and check balances accordingly
fix: Transaction pool wallet manager apply logic change (#1547)
* chore: remove apply transaction to recipient (it will be done when block accepted)

* chore: reverting transaction for sender // only apply to sender wallets

* ref: rename

* ref: rename

* chore: changing acceptchainedblock logic

* ref: rename

* test: fix chained test

# Conflicts:
#	packages/core-transaction-pool/__tests__/pool-wallet-manager.test.js

* test: fix pool wallet tests

* style

* test: fix guard tests

* ref: merging methods -

* chore: purgeBlock should also revert state of deleted transactions

* feat: get transactions for recipient

* chore: acceptChainedBlock logic changed, and apply rewards fix

* refactor: move all checks into canApply

* test: fix failing test

* fix: remove unknown function

* test: remove obsolete test

* chore: buildWallets migrated to new functionality

* fix: call canApply also when adding to pool

* test: fix guard tests

* test: fix pool wallet tests

* ref: call check once

* test: fix remaining tests

* fix: canApply check

* fix: cache ERR_APPLY again

* test: cold wallet recipient balance should not change

* chore: remove now obsolete code

* chore: moving delete wallet check out of condition scope

* chore: fix - wrong scope

* chore: remove delete already called in purge

* chore: extracted removeForgedTransaction from make into a function - needed after fork also

* Revert "chore: extracted removeForgedTransaction from make into a function - needed after fork also"

This reverts commit f465ea8.

* ref: remove unused

* ref: typo and variable use database

* ref: use variable, added comment

* refactor: simplify method call

* Revert "refactor: simplify method call"

This reverts commit 6091763.

* fix: getTransactions refactor xxx

* ref: moved code higher to address order

* chore: comment

* chore: remove unused getRecipientSize

* refactor: simplify getTransactionsForForging

* refactor: remove assert and simplify getTransactionsForForging

* refactor: getUnconfirmedTransactions

* refactor: remove await

* fix: async await

* test: fix throw error

* test: fix forger test

* ref: remove not used type

* refactor: rename revertTransaction
@paroxysm

This comment has been minimized.

Contributor

paroxysm commented on packages/crypto/lib/networks/ark/mainnet.json in 13c1d5b Dec 2, 2018

Why is this being reduced back down to 50?

This comment has been minimized.

This comment has been minimized.

Contributor

paroxysm replied Dec 2, 2018

Great, thanks for the clarification!

@wafflebot wafflebot bot added the review label Dec 3, 2018

@faustbrian faustbrian changed the title from [WIP] merge develop to master to merge develop to master Dec 3, 2018

@faustbrian faustbrian merged commit 4efbde7 into master Dec 3, 2018

4 checks passed

ci/circleci: depcheck-lint Your tests passed on CircleCI!
Details
ci/circleci: test-node10-0 Your tests passed on CircleCI!
Details
ci/circleci: test-node10-1 Your tests passed on CircleCI!
Details
ci/circleci: test-node10-2 Your tests passed on CircleCI!
Details

@wafflebot wafflebot bot removed the review label Dec 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment