Here’s a controversial opinion that you only develop if you're in the real Solana trenches (the source code):
The Solana Programming Model is smart and expressive, but the underlying VM is both poorly designed and implemented.
Here is a highly technical list of grievances:
- The VM address space densely packs accounts as opposed to giving each account a logical memory page. Consequently, the max data reallocation size is 10KB. This limitation could be lifted under a smarter VM address space construction.
- The semantics of account resizing are awful. Account data in virtual memory is represented with an 8-byte integer containing the data length N followed by the N bytes of the account. How do you resize an account? Directly mutate the value of N 🤢. This is problematic because:
1. The full data range must be preallocated (bad for performance). If it isn't, you need to carefully manage the lazy reallocation of new account buffers.
2. The edge cases around the value of N need to be carefully checked.
3. The behavior is poorly abstracted away from the application developer and extremely unintuitive.
Reallocation should clearly be a system call.
- The calling semantics of cross program invocation are awful. The system call is supplied with random unchecked pointers into the VM and the host is expected to properly handle both VM exit and VM re-entry without catastrophic state corruption or privilege escalation. Passing in account data shared pointers directly to the system call leads to extra complexity on re-entry because if the child VM resizes an account’s data ALL parent data slices need to be readjusted to the new length. (Note: this particular edge case is only true for sol_invoke_signed_rust and not for sol_invoke_signed_c)
- The LD_DW_IMM instruction (loads a constant 8-byte integer into a register) is cursed because it requires 16 bytes to store the BPF instruction while every other BPF instruction requires only 8 bytes. I'm not an expert on ISA design or compilers, but this can be replaced 3 instructions on the compiler level (load upper as u32, left shift 32, bitwise or lower as u32) or 2 instructions with better ISA (load upper and load lower)
The natural question is: “If the VM is so bad, why didn't we just fix all the bugs with Atlas?”
1. Sometimes a bad spec is better than no spec at all.
2. Toolchain compatibility is important: nobody wants to reinvent the wheel and I do not want to rewrite the toolchain.
3. Despite its jankiness, Solana not only works but appears to work far better than expected given the source code.
Atlas is driven by pragmatic engineering. This means that we removed the bugs with Solana that would have made the system impossible to maintain 5 years down the line, but kept the mistakes that way were too expensive to fix.
$NPC WITH ANOTHER NEW ATH
WE MADE IT FAM 🚀🚀
Imagine the fomo later once this hits tier 1 exchanges.
Organic growth. Holders increasing quik. Strongest community
This will run into billions
Population collapse is the biggest threat to civilization. Here's what's happening in the world:
• South Korea's Record-Low Fertility Rate To Fall Further, Warns Government
• China’s fertility rate is estimated to have touched a record low of 1.09 last year. Births were below 10mn for the first time. This year, expect a third straight year of decline with births a tenth lower to well below 9mn.
• Japan's 18-year-olds slip to record-low 1.06m on falling births
• Singapore’s birth rate is at a record low
• Vietnam's low birth rate keeps falling
• Pope Francis Expresses Concern About Italy’s Low Birth Rate
• Fertility rate in the Netherlands drops to record low
• Indiana's birth rate fell dramatically, dropping from 14.1 births per 1,000 people to 11.7, per new CDC data.
@OsmondSabby They both complement each other , education provides foundation for learning and critical thinking skills allows us to apply them and seize opportunities