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

fix(crypto): use anyOf for transactions schema #2894

Merged
merged 1 commit into from Aug 28, 2019
Merged

Conversation

spkjp
Copy link
Contributor

@spkjp spkjp commented Aug 28, 2019

anyOf looks for the first matching schema and exits early. oneOf always matches against each schema and will error when there's more than 1 match. This is not only slower but also sporadically causing issues when a transaction payload matches against multiple schemas.

Resolves #2888

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactor
  • Performance
  • Tests
  • Build
  • Documentation
  • Code style update
  • Continuous Integration
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Does this PR release a new version?

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the develop branch, not the master branch
  • All tests are passing
  • New/updated tests are included

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

@codecov-io
Copy link

Codecov Report

Merging #2894 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2894   +/-   ##
========================================
  Coverage    67.66%   67.66%           
========================================
  Files          405      405           
  Lines         9740     9740           
  Branches       450      492   +42     
========================================
  Hits          6591     6591           
+ Misses        3115     3111    -4     
- Partials        34       38    +4
Impacted Files Coverage Δ
packages/core-api/src/handlers/utils.ts 74.07% <0%> (ø) ⬆️
packages/core-logger-winston/src/formatter.ts 41.66% <0%> (ø) ⬆️
...es/core-blockchain/src/replay/replay-blockchain.ts 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bbea1c7...ff31c2f. Read the comment docs.

@faustbrian faustbrian merged commit f0f4fbf into develop Aug 28, 2019
@ghost ghost deleted the fix/crypto/anyOf branch August 28, 2019 04:05
@faustbrian faustbrian mentioned this pull request Sep 2, 2019
2 tasks
spkjp added a commit that referenced this pull request Sep 4, 2019
vasild added a commit that referenced this pull request Sep 5, 2019
…k-chained-verbose

* ArkEcosystem/core/develop:
  test: mock missing wsServer
  release: 2.5.24 (#2908)
  fix(core-p2p): terminate blocked client connections
  fix(core-p2p): drop connections with malformed messages
  fix(core-api): return block timestamp for v2 transactions (#2906)
  fix(core-blockchain): only shift milestoneHeights[] if at that height (#2904)
  fix(crypto): use `anyOf` for transactions schema (#2894)
  fix(core-webhooks): cast params in condition checks (#2887)
  feat(core-p2p): use compression on the p2p level (#2886)
vasild added a commit that referenced this pull request Sep 5, 2019
…ly-chained-check

* ArkEcosystem/core/develop:
  test: mock missing wsServer
  release: 2.5.24 (#2908)
  fix(core-p2p): terminate blocked client connections
  fix(core-p2p): drop connections with malformed messages
  fix(core-api): return block timestamp for v2 transactions (#2906)
  fix(core-blockchain): only shift milestoneHeights[] if at that height (#2904)
  fix(crypto): use `anyOf` for transactions schema (#2894)
  fix(core-webhooks): cast params in condition checks (#2887)
  feat(core-p2p): use compression on the p2p level (#2886)
@alessiodf
Copy link
Contributor

Not fixed :/ See #2888

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.

None yet

4 participants