magicblock-labs / magicblock-labs/bolt
[Bug] Lifetime difference in the `extra accounts` and `normal account`
- Dominant language
- TypeScript
- Stars
- 64
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
## Description
Currently, we cannot use [extra acconts](https://github.com/magicblock-labs/bolt/blob/main/examples/system-apply-velocity/src/lib.rs#L35) in combinations with [normal accounts](https://github.com/magicblock-labs/bolt/blob/main/examples/system-apply-velocity/src/lib.rs#L18) to create for example a CpiContext to perform a CPI due to lifetime conflicts.
## Notes
Modify how `extra accounts` macro inject the helpers and set proper lifetimes: https://github.com/magicblock-labs/bolt/blob/main/crates/bolt-lang/attribute/extra-accounts/src/lib.rs#L80
Contributor guide
Research direction
Start with crates/bolt-lang/attribute/extra-accounts/src/lib.rs around the macro helper injection, then compare the extra and normal account examples in examples/system-apply-velocity/src/lib.rs. Reproduce the lifetime conflict while building a CpiContext with both account types; done means the combination compiles without lifetime conflicts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100