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

fixes flaky onTransactionGossipReceived test #3933

Merged
merged 1 commit into from
May 25, 2023
Merged

Conversation

hughy
Copy link
Contributor

@hughy hughy commented May 25, 2023

Summary

emits event from peer network directly in test logic for RPC endpoint instead of indirectly trying to add the transaction into the peer network to force the event to emit.

Testing Plan

Documentation

Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference
)? If yes, link a
related documentation pull request for the website.

[ ] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and
what additional work is required, if any.

[ ] Yes

@hughy hughy requested a review from a team as a code owner May 25, 2023 14:02
emits event from peer network directly in test logic for RPC endpoint instead of
indirectly trying to add the transaction into the peer network to force the
event to emit.
@hughy hughy force-pushed the fix/on-tx-gossip-test branch from d40b8f1 to 1026e3c Compare May 25, 2023 14:04
@hughy hughy merged commit 626487e into staging May 25, 2023
@hughy hughy deleted the fix/on-tx-gossip-test branch May 25, 2023 14:20
ygao76 pushed a commit that referenced this pull request Jun 9, 2023
Add test:perf command

Remove flags

Use jest-junit test reporter

Rename

Update path

Add permission to github action

parent fce9eee
author ygao76 <[email protected]> 1684974186 -0700
committer ygao76 <[email protected]> 1686272927 -0700

Set fail on error to true

Upload test report

Increase perf test timeout

Create new cmd test:perf:report

Refactor transaction perf tests

Only run transaciont

Add test baseline metrics and refactor tests

checks if submitted block is heavier when chain changed (#3923)

* checks if submitted block is heavier when chain changed

when a miner submits a block to the mining manager the manager discards the
block if the chain has changed. that is, if the submitted block no longer
connects to the chain head.

however, if the submitted block is heavier than the curremt chain head then the
manager should add this block to the chain.

- removes unnecessary check that chain head exists
- does not discard submitted block if it is heavier than the current chain head

* sets work on submitted block before checking isBlockHeavier

the 'work' on a block header is only set in 'chain.connect', so checking
'isBlockHeavier' in 'submitBlockTemplate' will always return false unless we set
the work first.

only sets the work and checks if the block is heavier if the chain has changed.
this is to avoid duplicating this work if possible and avoid looking up the
previous block if possible

adds rpc to follow transaction gossip stream (#3925)

* adds rpc to follow transaction gossip stream

creates an event rpc endpoint to stream serialized transactions as the peer
network receives them in gossip messages.

adds an event to the peer network that emits each transaction that the node
receives.

emits all transaction gossip without verifying  or waiting for the mempool to
accept the transaction.

supports syncing pending transactions to the api.

* emits transaction gossip after filtering for duplicates

removes need for LRU in RPC endpoint if we leverage the filtering in the peer
network logic

matches the logic for onBlockGossipReceived event, but emits event before
validating transaction

fixes flaky onTransactionGossipReceived test (#3933)

emits event from peer network directly in test logic for RPC endpoint instead of
indirectly trying to add the transaction into the peer network to force the
event to emit.

regenerates fixtures and fixes outdated wallet tests (#3931)

changes in #3830 inadvertently fixed a bug whereby transactions that did not
send any iron (e.g., mint transactions with 0 fee) would still include a spend
to cover the fee of 0.

this bug created fixtures for several tests in which fee was 0, but a spend was
included anyway.

after regenerating fixtures following the fix, these tests failed.

- do not expect transaction assetBalanceDeltas to include the native asset when
  fee is 0 and no iron is sent or received (i.e., mint or burn with 0 fee)
- fixes getTransactionType to check whether the account was the sender on any
  notes in case the transaction does not include spends from the account

bumps package versions for v1.3.0 (#3934)

Add chain database size to telemetry (#3928)

* Add chain database size to telemetry

* Add unit test

* Rename

* Log chainDB size in chain.open()

Increase timeout"

Avoid teardown DB after each test case

List all test cases in report

Use JUnit Report Action for github action because the previous one does not have detailed report for each test case

Use Publish Test Results for github action

Show test result output

Use default json file

Add json output formatter"

Reduce output

Print only test cases output

Only print test cases

Update thredshold
jowparks pushed a commit that referenced this pull request Jun 21, 2023
emits event from peer network directly in test logic for RPC endpoint instead of
indirectly trying to add the transaction into the peer network to force the
event to emit.
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.

2 participants