magicblock-labs / magicblock-labs/bolt

[Bug] Lifetime difference in the `extra accounts` and `normal account`

Open
#92 1 comment 0 reactions 0 assignees View on GitHub
bug priority: high
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.