polkadot icon indicating copy to clipboard operation
polkadot copied to clipboard

Use a more typesafe approach for managing indexed data

Open tifecool opened this issue 3 years ago • 5 comments

My attempt to resolve issue: #2403

Currently incomplete, having an error at polkadot-erasure-coding preventing me from testing, was hoping to get some advice and confirmation that I'm going about this the right way!

tifecool avatar May 11 '22 13:05 tifecool

@eskimor

tifecool avatar May 12 '22 12:05 tifecool

Thanks so much for the review! @eskimor Will keep at it and implement the suggested changes ❤️

tifecool avatar May 14 '22 21:05 tifecool

I'd vote for creating our own type-wrapper for Vec instead of using a dependency. We don't seem to need most of its methods other than type-safe indexing, which can be implemented easily as pointed out in https://github.com/paritytech/polkadot-sdk/issues/978.

As a side note, please revert unrelated changes.

ordian avatar May 18 '22 08:05 ordian

I'd vote for creating our own type-wrapper for Vec instead of using a dependency. We don't seem to need most of its methods other than type-safe indexing, which can be implemented easily as pointed out in #2403 (comment).

~~Might need a bit of assistance/step through with this, but I think I have an idea of how to implement the change. Also, could I get help with why the checks are failing?~~ Working on it

As a side note, please revert unrelated changes.

Which changes?

tifecool avatar May 19 '22 19:05 tifecool

Not the best at git. Apologies for the numerous pushes

tifecool avatar May 19 '22 22:05 tifecool

Going to reattempt this from scratch

tifecool avatar Oct 12 '22 13:10 tifecool