Closed pgherveou closed 1 year ago
I don't think this is a proper replacement for the Debug
trait which was specifically designed to bundle all future debugging infrastructure without cluttering the Config
trait. Hence the generic name and the sub typing.
I don't think this is a proper replacement for the
Debug
trait which was specifically designed to bundle all future debugging infrastructure without cluttering theConfig
trait. Hence the generic name and the sub typing.
@athei Is that just a name issue? I can rename it back to Debug if we think its more appropriate.
@pmikolajczyk41 my goal here was to provide the same features that was previously exposed, but provide an implementation that does not add any overhead to the code.
@athei Is that just a name issue? I can rename it back to Debug if we think its more appropriate.
This was not a rename but a removal. The Debug
trait before was just an empty trait to bundle together all the different debugging traits we might want to add. Just as a shortcut name we can mention on the Config
.
@pmikolajczyk41 I can understand that you want to make the implementations of those traits as simple as possible since you are the one implementing it. But I think you can agree that shifting complexity from on-chain code to a dev tool is the sensible thing to do. Which is exactly what we do by asking the implementor to manage state instead of the pallet.
Regarding conditional compilation: In this case it is viable but as soon as the arguments of the functions require computation we will start causing overhead.
@athei moved back everything under the Debugging umbrella trait, and used back T::Debug associated trait name.
@oleg-plakida you mind giving us a +1 here for removing the unsafe-debug
feature added in the previous PR #14678
@oleg-plakida you mind giving us a +1 here for removing the
unsafe-debug
feature added in the previous PR #14678
cc @rcny
bot merge
Error: Statuses failed for 986fe1097b50967bae539ec4e1cc36819c1041ee
bot merge
Update the
Debug
trait that was behind theunsafe-debug
feature flag, and get rid of the feature flagMost config should set it to
()
that will simply log contract calls whenruntime::contracts
log target is set to trace.More advanced debugging tools can leverage this trait to introduce more sophisticated observability behaviors. See previous PR (#14678) for more context.
Cumulus companion: https://github.com/paritytech/cumulus/pull/3035