-
Notifications
You must be signed in to change notification settings - Fork 46
[COMP-1277] Replace miner env var with 'current validator' gateway address #396
base: develop
Are you sure you want to change the base?
Conversation
|
Not at all clear how we're supposed to get a |
f3b3d30 to
905908a
Compare
COMP-1277 Distribute to Substrate ID instead of separate miner address
We wanted to kill the runtime interfaces as well as simplify setup for validators by paying to the This will also help subscan track validator earnings. |
This comment has been minimized.
This comment has been minimized.
|
🫖 [View Integration Test Results](server error: invalid xunit xml) |
| // XXX how can we pass a <T: Config>?? | ||
| let miner = pallet_cash::internal::miner::InherentDataProvider {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in principal you can depend on the gateway-runtime::Runtime struct and pass it to the generic here, that binds your node impl to a particular (set of) runtime version(s) though
| .map_err(|_| sp_inherents::Error::Application(Box::from("invalid miner address")))?; | ||
|
|
||
| inherent_data.put_data(INHERENT_IDENTIFIER, &chain_account) | ||
| let validator = core::get_current_validator::<T>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a function accessing runtime storage I assume?
I think you'll need to introduce a runtime api that allows you to access that data (and that doesn't depend on a <T: Config>) similar to e.g. the GrandpaApi here: https://github.com/paritytech/substrate/blob/4e75f511e1357cf54c31d9e82d0cf3e39a2b8c28/bin/node/runtime/src/lib.rs#L1307
No description provided.