Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework CreateSmartTransactionConfig to Resolve Lifetime Issues #83

Closed
0xIchigo opened this issue Oct 22, 2024 · 3 comments · Fixed by #89
Closed

Rework CreateSmartTransactionConfig to Resolve Lifetime Issues #83

0xIchigo opened this issue Oct 22, 2024 · 3 comments · Fixed by #89
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@0xIchigo
Copy link
Collaborator

The lifetime parameter on CreateSmartTransactionConfig is required because it contains references to signers and instructions. This has the potential to create several issues and should be avoided. We should rework this to avoid any potential lifetime issues.

An arc-based solution is probably best as no lifetime parameters are needed, it's thread-safe, and it shares ownership efficiently. The only downside is a slight runtime overhead from reference counting and then the need to wrap signers in an arc when creating the config. A builder pattern solution is also a possibility, but then we introduce a lot of boilerplate, and a clone-based solution would require signers to implement clone

@0xIchigo 0xIchigo added enhancement New feature or request good first issue Good for newcomers labels Oct 22, 2024
@mahmudsudo
Copy link

Hi , can i take up this role ?

@0xIchigo
Copy link
Collaborator Author

gm @mahmudsudo! For sure, go for it!

@mahmudsudo
Copy link

on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants