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

[Service] refactor: TargetNumRelays var usage to param usage #943

Open
wants to merge 1 commit into
base: todo_beta/params/target_num_relays
Choose a base branch
from

Conversation

bryanchriswhite
Copy link
Contributor

@bryanchriswhite bryanchriswhite commented Nov 21, 2024

Summary

Replace usage of servicekeeper.TargetNumRelays with the new param and delete it.

Issue

  • TODO_BETA

Type of change

Select one or more from the following:

Testing

  • Documentation: make docusaurus_start; only needed if you make doc changes
  • Unit Tests: make go_develop_and_test
  • LocalNet E2E Tests: make test_e2e
  • DevNet E2E Tests: Add the devnet-test-e2e label to the PR.

Sanity Checklist

  • I have tested my changes using the available tooling
  • I have commented my code
  • I have performed a self-review of my own code; both comments & source code
  • I create and reference any new tickets, if applicable
  • I have left TODOs throughout the codebase, if applicable

@bryanchriswhite bryanchriswhite added service Anything related to general-purpose RPC service support governance Governance related changes on-chain On-chain business logic devnet-test-e2e consensus-breaking IMPORTANT! If the PR with this tag is merged, next release WILL HAVE TO BE an upgrade. labels Nov 21, 2024
@bryanchriswhite bryanchriswhite self-assigned this Nov 21, 2024
Copy link

The CI will now also run the e2e tests on devnet, which increases the time it takes to complete all CI checks.

You may need to run make trigger_ci to submit an empty commit that'll trigger the tests.

GCP workloads (requires changing the namespace to 943)
Grafana network dashboard for devnet-issue-943

@github-actions github-actions bot added devnet push-image CI related - pushes images to ghcr.io labels Nov 21, 2024
ctx,
logger,
serviceId,
numRelays,
Copy link
Contributor Author

@bryanchriswhite bryanchriswhite Nov 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we need to make this change:

https://discord.com/channels/824324475256438814/1138895490331705354/1307077093351362621

Suggested change
numRelays,
targetNumRelays,

(cc @red-0ne )

Copy link
Contributor Author

@bryanchriswhite bryanchriswhite Nov 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change causes some test failures:

=== RUN   TestComputeNewDifficultyHash_MonotonicallyIncreasingRelays
    update_relay_mining_difficulty_test.go:45: Relay Mining Increasing Difficult Debug. NumRelays: 1000, EMA: 90099, TargetHash: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
    update_relay_mining_difficulty_test.go:34: 
        	Error Trace:	/home/bwhite/Projects/pokt/poktroll/x/service/keeper/update_relay_mining_difficulty_test.go:34
        	Error:      	"10000" is not greater than "90099"
        	Test:       	TestComputeNewDifficultyHash_MonotonicallyIncreasingRelays
--- FAIL: TestComputeNewDifficultyHash_MonotonicallyIncreasingRelays (0.00s)
=== RUN   TestUpdateRelayMiningDifficulty_Base
    update_relay_mining_difficulty_test.go:105: 
        	Error Trace:	/home/bwhite/Projects/pokt/poktroll/x/service/keeper/update_relay_mining_difficulty_test.go:105
        	Error:      	Not equal: 
        	            	expected: 0x3e8
        	            	actual  : 0x15ff3
        	Test:       	TestUpdateRelayMiningDifficulty_Base
--- FAIL: TestUpdateRelayMiningDifficulty_Base (0.00s)

Expected :0x3e8
Actual   :0x15ff3
=== RUN   TestUpdateRelayMiningDifficulty_FirstDifficulty/First_Difficulty_way_below_target
    update_relay_mining_difficulty_test.go:217: 
        	Error Trace:	/home/bwhite/Projects/pokt/poktroll/x/service/keeper/update_relay_mining_difficulty_test.go:217
        	Error:      	Not equal: 
        	            	expected: 0x64
        	            	actual  : 0x15f99
        	Test:       	TestUpdateRelayMiningDifficulty_FirstDifficulty/First_Difficulty_way_below_target
--- FAIL: TestUpdateRelayMiningDifficulty_FirstDifficulty/First_Difficulty_way_below_target (0.00s)

Expected :0x64
Actual   :0x15f99
=== RUN   TestUpdateRelayMiningDifficulty_FirstDifficulty/First_Difficulty_way_above_target
    update_relay_mining_difficulty_test.go:217: 
        	Error Trace:	/home/bwhite/Projects/pokt/poktroll/x/service/keeper/update_relay_mining_difficulty_test.go:217
        	Error:      	Not equal: 
        	            	expected: 0x5f5e100
        	            	actual  : 0x99f610
        	Test:       	TestUpdateRelayMiningDifficulty_FirstDifficulty/First_Difficulty_way_above_target
--- FAIL: TestUpdateRelayMiningDifficulty_FirstDifficulty/First_Difficulty_way_above_target (0.00s)

Expected :0x5f5e100
Actual   :0x99f610

@bryanchriswhite bryanchriswhite marked this pull request as ready for review November 21, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus-breaking IMPORTANT! If the PR with this tag is merged, next release WILL HAVE TO BE an upgrade. devnet devnet-test-e2e governance Governance related changes on-chain On-chain business logic push-image CI related - pushes images to ghcr.io service Anything related to general-purpose RPC service support
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

1 participant