Add PrecompilesFeatureSet#85
Conversation
1e81cee to
be7593f
Compare
be7593f to
620b555
Compare
|
This can wait until after the agave feature set migration is finished if y'all want but I think this will be a good change regardless because we shouldn't have a dependency on agave crates from the sdk if we can help it. |
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
joncinque
left a comment
There was a problem hiding this comment.
This approach certainly works!
As another option, I'd like to point out #86, which uses solana-feature-set-interface::FeatureSet, but requires redefining the feature sets within the crates that need them.
If agave-feature-set::FeatureSet adds a function to expose the underlying solana-feature-set-interface::FeatureSet, then there should be a lot less friction in integration.
The big drawback with the other approach is redefining the feature ids, which isn't an amazing solution.
Yeah if it weren't for the feature ids I would definitely prefer just switching the feature set interface. Coupling sdk releases to feature id's in agave is far from ideal and likely to cause a lot of headaches and potentially serious bugs. I think there are other solutions besides this approach. @t-nelson had some ideas as well to have some sort of generic |
|
@t-nelson suggested a better approach.. just migrate agave from using |
|
I'll likely re-introduce this change in agave, it helps make ix iteration faster by doing less feature set lookups |
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.22.0 to 1.23.0. - [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md) - [Commits](Lokathor/bytemuck@v1.22.0...v1.23.0) --- updated-dependencies: - dependency-name: bytemuck dependency-version: 1.23.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.22.0 to 1.23.0. - [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md) - [Commits](Lokathor/bytemuck@v1.22.0...v1.23.0) --- updated-dependencies: - dependency-name: bytemuck dependency-version: 1.23.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.22.0 to 1.23.0. - [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md) - [Commits](Lokathor/bytemuck@v1.22.0...v1.23.0) --- updated-dependencies: - dependency-name: bytemuck dependency-version: 1.23.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.22.0 to 1.23.0. - [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md) - [Commits](Lokathor/bytemuck@v1.22.0...v1.23.0) --- updated-dependencies: - dependency-name: bytemuck dependency-version: 1.23.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.22.0 to 1.23.0. - [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md) - [Commits](Lokathor/bytemuck@v1.22.0...v1.23.0) --- updated-dependencies: - dependency-name: bytemuck dependency-version: 1.23.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Problem
The SDK shouldn't need to be coupled to specific feature keys to enable feature gated functionality in the SDK.
Summary
Breaking change to precompile interface to enable feature gates via flags so that the SDK doesn't need to be aware of or coupled to feature keys. This requires a major version bump of the precompiles and transaction crate according to semvar rules
Precompilestruct to have an enable function. Really this should have all be based on traits :/