anchor
anchor copied to clipboard
docs: Add sealevel-exploits along with descriptions to docs
In the process of adding the contents of: https://github.com/coral-xyz/sealevel-attacks to the docs.
This PR will add all of the exploits, as well as describe them in detail, instead of providing just the code.
progress
- [x] - signer authorization
- [x] account data matching
- [x] - owner checks
- [x] - type cosplay
- [x] - initialization
- [x] - arbitrary cpi
- [x] - duplicate mutable accounts
- [x] - bump seed canonicalization
- [x] - pda sharing
- [x] - Closing accounts (kinda...No explanation here, but all code examples displayed for easy comparison)
@nheingit is attempting to deploy a commit to the 200ms Team on Vercel.
A member of the Team first needs to authorize it.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| anchor-docs | ✅ Ready (Inspect) | Visit Preview | Dec 6, 2022 at 5:15PM (UTC) |
Amazing contribution.
I wonder if the first section called "Sealevel Attacks" is redundant now that we have independent articles.
cc @armaniferrante wdyt?
Weird.
Yeah I can see them on mine:

@italoacasas any idea why the tests are failing here? I can't tell what Clippy would be having problems with here...
No idea, but I doubt it's related to this PR.
Okay cool, then I won't worry about it 👍
Unrelated to this PR, but don't really want to open an issue for it.
Would I be able to open a PR if I wrote a guide on an updated version of the escrow-program? I was going to put it on my blog, but thought it could live here under the proejcts instead.
Didn't know what kind of review process that would take, or if y'all were interested in having more "anchor approved" projects up on the site.
if you rebase from master the clippy warnings have been fixed and the tests should pass
Would I be able to open a PR if I wrote a guide on an updated version of the
escrow program? I was going to put it on my blog but thought it could live here under theprojectsinstead.
It sounds like a good idea.
Didn't know what kind of review process that would take, or if y'all were interested in having more "anchor approved" projects up on the site.
Historically the escrow program has been an excellent example for learning to use anchor/Solana. Go for it.
Great job, Noah! As best as I can tell the examples are correct, so my suggestions are purely fixes for spelling, grammar, and typos. I even learned a few things while reviewing...
Thanks for the review @ashpoolin !
@italoacasas is there anything else I need to do to get this merged in?
@nheingit, my plate is a little insane right now, but I will start reviewing the content tonight. Either way, I'm not an expert on the exploits. We may need @armaniferrante help on this one.
Don't want it to cause any undue stress! Just wanted to bump this since it had been a little bit. Happy to hop on a call or anything to help. You have me on Twitter I think, and my tg handle is the same if you want to kick off any discussion there.
ping @callensm
I wish i could figure out how to preview this on vercel
Bloody hell, this rebase thing is a mess, sorry about this. it's harder to fix this particular mess since somehow git has snuck in extra commits between commit: cb46474c38d1a7137e919d35c6dff57ea4b06fb1 and commit: 0101d583b830868692ccea4d818bc24c54574f5b .
Sorry to leave this mess here but i have to run right now. When I get back i will revert back to commit 0101d583b830868692ccea4d818bc24c54574f5b and pick out the extra random commits that git added in.
Maybe then the rebasing will work properly.
Just trying to authorize the vercel deployment so that I can more easily read through and actually check out what this PR is adding in.
This honestly seems harmless enough to merge. Will probably do so once the tests finish running (even though they're technically unrelated)
Upon further reflection I think this just highlights that the anchor site needs a better way to curate and link to relevant blog posts. That way we can keep the main site mostly clean and help people by linking out where needed. For example to all of the great blog posts written by nheingit, rather than hosting them on the anchor site itself.
Just now seeing these @Henry-E
Linking out would be fine. But I only put them up on my site after seeing coral wasn't going to merge this.
ah ok cool, sorry about the lack of communication. Thanks for posting them on your blog anyway!