Programmable PoW
As promised, all pieces of the NockAPP SDK v1 quietly went live in the past few days.
Everything developers need to begin building NockApps:
✅ NockApp kernels
✅ Runtime drivers
✅ CLI tooling
✅ Fakenet support
✅ Docs/tutorials
We're only soft-launching right now because it's Friday afternoon. We'll do a proper article next week. ;-)
There's much more we're planning, from Jock type support to improving the templates to reducing the Rust editing required...
But we're very proud to bring all of this together, for the first time, for the first generation of developers building on Nockchain!
✅nockchain.org/nockapp/
✅github.com/nockchain/nockcha…
2
38
Faustian retweeted
Working 𝕍ℤ repository with full tests for factory and pair swapping, 𝕖𝕟𝕛𝕠𝕪 !
github.com/z0r0z/VZ
Faustian retweeted
Linear Vesting in Solidity
Linear vesting is a great method for initial capital raising, as funds are not immediately released but linearly unlocked over a determined time-frame. This will prevent large market sells and will increase fairness.
Here's how a simple calculation for a linear vesting contract could look like:
This function simply calculates how much of your initial investment is claimable, depending on the vestingStart and the current block.timestamp.
If you incorporate this calculation into a claim function, you need to ensure that the already claimed value is deducted. This will prevent excess claiming.
The height of a merkle tree is logarithmically proportional to the amount of initial data points. That means if you wanted to prove a certain piece of data exists in the merkle root of an inital 1,000,000 data, you would only need to provide 20 hashes to do so! (2^20 =1048576)
72
Ever wondered how mappings are stored in Solidity storage? After all, a mapping can have a undetermined amount of key value pairs.
1
90
When you define a mapping in storage, the mapping itself takes 1 slot in storage. The hash of the key + the value of the mapping storage slot determines where the value will be stored.
1
80
Increasing Solidity optimization runs produces longer bytecode but saves gas during execution. For instance, Hardhat defaults to 200 runs; reducing to 1 cuts deployment cost but raises transaction gas fees. Set it to 1,000,000 and your transactions will be cheaper.
55
The max value a uint256 can hold is 115792089237316195423570985008687907853269984665640564039457584007913129639935
1
47
Currently at the @fhe_org conference Toronto, I’m fully homo today!!
2
1
68
The cheapest opcode is STOP which costs 0 gas as all it does is halt execution. The most expensive opcode is CREATE, which deploys a new contract and takes at least 32000 gas. The formula for CREATE's gas cost is: 32000 + mem_expansion_cost + code_deposit_cost
34
An eth transfer takes 21000 gas. This is always true for mainnet. However, when transferring on an L2 you must also pay for the cost of posting transaction data onto mainnet. Interesting that Optimism's etherscan breaks down L2/L1 gas cost while Arbitrum shows the combined only.
1
35






