Skip to content

fix: set integrator and getwork server - #56

Open
secretnamebasis wants to merge 1 commit into
DEROFDN:community-devfrom
secretnamebasis:fix/simulator-get-work-server
Open

fix: set integrator and getwork server#56
secretnamebasis wants to merge 1 commit into
DEROFDN:community-devfrom
secretnamebasis:fix/simulator-get-work-server

Conversation

@secretnamebasis

Copy link
Copy Markdown

Description

cmd/simulator never called derodrpc.Getwork_server() — only derod's own
main.go does that — so the simulator had no getwork websocket listener at
all, and no external miner could ever connect to it, regardless of transport
scheme. On top of that, SendJob() builds its block template against
chain.IntegratorAddress(), which defaults to globals.Config.Dev_Address
when unset; that address is never registered on a fresh simulator chain, so
template creation failed silently on every dispatch tick and produced an
empty job forever, with no diagnostic to point at the cause.

This PR adds the missing Getwork_server() call and points the simulator's
integrator address at its own genesis wallet, which is always registered on
a fresh chain. With both fixes, an external dero-miner binary can connect
to a running simulator and mine against it end-to-end. Verified live: chain
height 1 → 120 with 331k+ miniblocks accepted by the real
Accept_new_block() validation path, confirming the simulator can now
actually serve its stated purpose ("helps in development and tests") for
miner-facing testing, not just wallet/RPC testing.

Fixes # (none filed — found while testing an unrelated AstroBWTv3 change
against the simulator)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • This will require a HardFork to be enabled

Which part is impacted?

  • Wallet
  • Daemon
  • Miner
  • Explorer
  • Simulator
  • Misc (documentation, comments, text...)

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

License

I am contributing & releasing the code under DERO Research License (which
can be found here).

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.

1 participant