stratum-mining / stratum

stratum
https://stratumprotocol.org
Other
211 stars 124 forks source link

MG test templates #953

Closed plebhash closed 1 month ago

plebhash commented 4 months ago

we have multiple MG tests available, however most of them are highly customized

whenever someone starts writing a MG test, they need to copy some pre-existing MG test and remove the unwanted features, which is a troublesome and error-prone activity

this doesn't scale well and is a massive bottleneck in bugfixing, especially considering the high verbosity inherent to JSON

we need a suite of templates for MG tests and mocks centered around each role, as well as common generic cases

plebhash commented 4 months ago

here's a suggestion for a layout:

test/message-generator
│└test-templates
│   ├jdc-test-template.json
│   ├jds-test-template.json
│   ├pool-test-template.json
│   ├proxy-test-template.json
│   └translation-proxy-test-template.json
└─mock-templates
      ├jdc-mock-template.json
      ├jds-mock-template.json
      ├pool-mock-template.json
      ├proxy-mock-template.json
      └translation-proxy-mock-template.json

here we would be adding two new directories to test/message-generator:

GitGab19 commented 1 month ago

I think we should close this one, what do you think @plebhash ?