Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Port BPFLoader2 activation to FeatureSet#12490

Merged
mvines merged 3 commits intosolana-labs:masterfrom
mvines:bpf
Sep 28, 2020
Merged

Port BPFLoader2 activation to FeatureSet#12490
mvines merged 3 commits intosolana-labs:masterfrom
mvines:bpf

Conversation

@mvines
Copy link
Copy Markdown
Contributor

@mvines mvines commented Sep 25, 2020

Along the way delete genesis-programs/ and the Bank's EnteredEpochCallback, significantly cleaning up how built-in programs are added and activated.

@mvines mvines added noCI Suppress CI on this Pull Request v1.3 labels Sep 25, 2020
Comment thread cli/Cargo.toml
@mvines mvines force-pushed the bpf branch 3 times, most recently from a983aa8 to 46d5e70 Compare September 25, 2020 18:47
@mvines mvines added CI Pull Request is ready to enter CI and removed noCI Suppress CI on this Pull Request labels Sep 25, 2020
@mvines mvines force-pushed the bpf branch 2 times, most recently from 0fc24d0 to ac48fe9 Compare September 25, 2020 22:11
@solana-grimes solana-grimes removed the CI Pull Request is ready to enter CI label Sep 25, 2020
@mvines
Copy link
Copy Markdown
Contributor Author

mvines commented Sep 26, 2020

Ugh, getting stuck on Bank AbiExample stuff. Not sure this is really even needed anymore Bank @ryoqun

@mvines mvines force-pushed the bpf branch 5 times, most recently from db984cf to 8522024 Compare September 26, 2020 20:45
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 26, 2020

Codecov Report

Merging #12490 into master will decrease coverage by 0.0%.
The diff coverage is 89.1%.

@@            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     

Comment thread runtime/src/bank.rs
}

#[cfg(RUSTC_WITH_SPECIALIZATION)]
impl AbiExample for Builtin {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

@mvines mvines force-pushed the bpf branch 2 times, most recently from db252ba to f6654a2 Compare September 28, 2020 16:32
Comment thread core/src/builtins.rs

builtins
.into_iter()
.map(|(b, p)| (Builtin::new(&b.0, b.1, Entrypoint::Loader(b.2)), p))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

@jackcmay jackcmay Sep 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or just expand out the map to:
.map(|((name, id, entrypoint), p)| (Builtin::new(&b.name, b.id, Entrypoint::Loader(b.entrypoint)), p))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread runtime/src/bank.rs Outdated
@mvines
Copy link
Copy Markdown
Contributor Author

mvines commented Sep 28, 2020

Looks good otherwise @jackcmay?

Copy link
Copy Markdown
Contributor

@jackcmay jackcmay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much cleaner

@mvines mvines merged commit 833ad20 into solana-labs:master Sep 28, 2020
@mvines mvines deleted the bpf branch September 28, 2020 19:50
mergify Bot added a commit that referenced this pull request Sep 28, 2020
* 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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants