Port BPFLoader2 activation to FeatureSet#12490
Conversation
a983aa8 to
46d5e70
Compare
0fc24d0 to
ac48fe9
Compare
|
Ugh, getting stuck on |
db984cf to
8522024
Compare
Codecov Report
@@ Coverage Diff @@
## master #12490 +/- ##
=========================================
- Coverage 82.1% 82.0% -0.1%
=========================================
Files 354 354
Lines 82868 82624 -244
=========================================
- Hits 68037 67785 -252
- Misses 14831 14839 +8 |
| } | ||
|
|
||
| #[cfg(RUSTC_WITH_SPECIALIZATION)] | ||
| impl AbiExample for Builtin { |
db252ba to
f6654a2
Compare
|
|
||
| builtins | ||
| .into_iter() | ||
| .map(|(b, p)| (Builtin::new(&b.0, b.1, Entrypoint::Loader(b.2)), p)) |
There was a problem hiding this comment.
declare_builtin should probably be a struct so we don't have reference it via tuple indexes. If agreed we can do it a different PR
There was a problem hiding this comment.
Or just expand out the map to:
.map(|((name, id, entrypoint), p)| (Builtin::new(&b.name, b.id, Entrypoint::Loader(b.entrypoint)), p))
There was a problem hiding this comment.
declare_builtin should probably be a struct so we don't have reference it via tuple indexes. If agreed we can do it a different PR
Yeah I agree that'll be much nicer. I didn't want to take on that churn in this PR
|
Looks good otherwise @jackcmay? |
* Cargo.lock (cherry picked from commit 6071d0d) # Conflicts: # Cargo.lock * Port BPFLoader2 activation to FeatureSet and rework built-in program activation (cherry picked from commit 31696a1) # Conflicts: # core/Cargo.toml # genesis-programs/Cargo.toml # genesis/Cargo.toml # ledger/Cargo.toml # local-cluster/Cargo.toml # runtime/src/bank.rs * Add Builtin AbiExample (cherry picked from commit 833ad20) * Rebase Co-authored-by: Michael Vines <mvines@gmail.com>
Along the way delete genesis-programs/ and the Bank's EnteredEpochCallback, significantly cleaning up how built-in programs are added and activated.