Filter
Exclude
Time range
-
Near
发现一个工程水准极高的项目:Codex ,给 OpenAI Codex 桌面应用做的插件系统。 Codex 是闭源代码签名的 Electron 应用,没有任何扩展机制。这个项目的做法相当硬核——它需要突破四层防线才能把代码注入进去: 第一层,改 asar 包。用 @electron/asar 解包 app.asar,把 package.json 的 main 字段从原始入口改成自己的 loader.cjs,同时精确保留原始 asar 的 unpacked 文件集(否则 Electron 的模块加载会 MODULE_NOT_FOUND)。重打包用原子操作:先写临时文件再 rename,防止写入中断导致 app 损坏。 第二层,过完整性校验。Electron 会校验 asar header 的 SHA-256(注意不是整个文件,是 header JSON),存在 Info.plist 的 ElectronAsarIntegrity 里。改完 asar 必须同步更新这个哈希。 第三层,关 fuse。Electron 在 Framework 二进制里有一组 fuse 开关,用已知的 sentinel 字符串 "dL7pKGdnNz796PbbjQWNKmHXBZaB9tsX" 定位,后面跟 version count header,每个 fuse 占一字节(ASCII '0'=off, '1'=on)。直接把 EnableEmbeddedAsarIntegrityValidation 从 '1' 改成 '0'。加上第二层的哈希更新,形成双保险。 第四层,重签名。上面的操作破坏了原始 Developer ID 签名,用 codesign --force --deep --sign - 做 ad-hoc 重签名,让 macOS 不拦截。 注入的 loader.cjs 只有 70 行,设计原则是"插件系统崩了绝不能带崩 Codex"。所有逻辑包在 safe() 里,异常只写日志到 loader.log,最后一行永远是 require("./" originalMain)——无条件把控制权交还给 Codex 原始入口。 Runtime 层也有意思。它需要访问 Codex 的内部 window services 对象,但这是个 minified 的闭源 bundle,变量名是混淆过的。解法是用 fingerprint 匹配:搜索包含 buildFlavor: 的工厂函数调用,然后检查调用体里是否同时包含 allowDevtools:、preloadPath:、globalState: 等至少 5 个已知属性名,命中后回溯找到赋值的变量名,在语句结尾注入 globalThis.codexpp_window_services = ;。一套完整的 JS AST 级别的 source patch。 Sparkle 自动更新兼容是最精巧的部分。Sparkle 要求有效的 Developer ID 签名才能更新,但补丁后的 app 只有 ad-hoc 签名。解决方案:hook Node 的 Module._load,拦截 Sparkle 模块的 installUpdatesIfAvailable 方法。更新前用 ditto 把备份的原始签名 .app 复制回去让 Sparkle 正常工作,更新完后 launchd 监听到 app.asar 文件变化,自动触发 codexplusplus repair --quiet 重新走一遍补丁流程。全自动,用户零感知。 不是一个简单的 monkey-patch,是从二进制 fuse 到 JS source patch 到 Sparkle hook 的完整工程体系。 github.com/b-nnett/codex-plu…
7
17
142
19,482
Finally aligned the whole implementation of existing Laminar protocol to the newly created Whitepaper Passes all the alignment checks, and new test suites A1. Math and Invariant Core 1. Add explicit `rounding_reserve_lamports` accounting. 2. Replace tolerance invariant with deterministic per-path `rounding_bound_lamports`. 3. Split equity into: - signed accounting equity (`E_SOL`) - claimable equity (`max(E_SOL, 0)`) 4. Change liability valuation to conservative round-up. 5. Implement deterministic rounding reserve debit/credit rules for `mul_div_up` paths. A2. State Schema and Parameter Surface 1. Extend `GlobalState` with: - rounding reserve cap - oracle freshness/confidence bounds - uncertainty fields/caps - LST staleness fields - `nav_floor_lamports` - `max_asol_mint_per_round` - cached update slots 2. Add migration/version handling for expanded state Deferred (pre-deploy; required only after first on-chain state exists). 3. Ensure initialize sets all fee/risk parameters explicitly (no implicit zeroed fields). A3. Vault Instruction Logic Parity 1. Replace `current_index == 0` CPI check with stack-height/depth-safe guard. 2. Add `sync_exchange_rate` call at the top of all price-sensitive flows. 3. Enforce oracle freshness confidence checks before pricing. 4. Rework redeem fee accounting: - amUSD redeem fee in amUSD input token - aSOL redeem fee in aSOL input token 5. Add amUSD redeem drawdown-first and haircut logic for `CR < 100%`. 6. Add aSOL redeem post-state `CR_post >= min_cr_bps` hard gate. 7. Tighten aSOL bootstrap logic and orphan-equity handling. A4. Fee Engine and Recovery Rules 1. Replace simple fee helpers with full min/target interpolated curves. 2. Enforce multiplier bounds (`Mmin <= 1x <= Mmax`). 3. Add uncertainty multiplier composition/precedence. 4. Clamp to preserve intended fee direction under combined multipliers. A5. Test and Verification Alignment 1. Unit tests: - rounding reserve math - conservative liability rounding - fee curve interpolation and clamps 2. Integration tests: - stale oracle/LST reverts - CPI depth vectors - amUSD redeem haircut path - aSOL redeem CR-post revert 3. Deterministic spec vectors from Section 63.5. 4. Property/fuzz sequences for invariant stability. These were the 5 alignment passes i needed to implement Did all of it, there may be some documentation disperency as of now, but i'll fix them as i fall upon it next, is to implement the oracle into the protocol
1
16
677
Milkyway Solana Subscription Program Update! Just wrapped up implementing and testing a full MVP escrow-based subscription system on Solana Devnet using Anchor! What I Built: Smart Contract: Rust program with instructions for initialize, create_plan, subscribe, process_payment, and cancel. Escrow Logic: Subscribers escrow funds in PDA; payments deduct from balance and transfer to seller treasury fee. State Management: GlobalState, Plan, Subscriber accounts with balance tracking. Testing on Devnet: ✅ Deployed program (ID: 8QeuUEnDuYjas5QerUG28n4cbEG67ALbaLxTT5eFBtvW) ✅ Created plans, subscribed, processed payments, and canceled (with refunds). ✅ Full flow validated: Escrow works, billing cycles update, funds transfer correctly. Scripts & Tools: Built Node.js scripts for each instruction Used Anchor workspace for seamless IDL integration Tested with 0-day intervals for instant validation Next: Integrate with Next.js frontend and add realworld features like webhooks or UI dashboards Excited for the subscription economy on Solana! 💎 #Solana #Web3 #Blockchain #Anchor #Rust
1
3
501
22 Nov 2025
in crypto: the globalstate everyone fights over every chain today, even the fast ones, still forces all users to share one giant state. that’s why block times, congestion, fees, and throughput exist in the first place. miden basically says “why are we all sharing one brain?” and
1
5
47
🏦 Setup milestones we hit: Created Treasury ATA → holds initial supply Disabled mint authority → fixed supply 🔒 Initialized GlobalState Vault PDAs (Anchor PDAs handle claim fees & payouts) Funded Vault ATA for daily rewards pool
1
2
104
Cursor のモデル関連の設定が壊れてそうな件、どうも Application Support/Cursor/User/globalState/state.vscdb を消すと設定が全部飛ぶ代わりに直るっぽくて、中身がどうなってるのか無理やりテキストエディタで見てみたら key-value 構造で設定 JSON が埋まっているらしい
Windows 環境の Cursor を最新にアプデしてみたけど普通に動いてたから設定ファイルが壊れてるか、バージョンが Early だとダメな可能性がある
2
1
10
3,300
2 Oct 2024
I wish I had learned about Sorbet's GlobalState pattern much earlier.
1
3
569
Explanation of @CryptoAlgebra 's Liquidity Pools (Based on @CamelotDEX) Algebra’s DEX is a concentrated liquidity DEX. Pools are consisting of two tokens. For example, a pool can be created with USDC and WETH. Below is a breakdown of how to work with these pools, fetch price data, and understand the mathematics behind it, including the code and computation involved. 1. Finding the Pool Address To interact with a specific liquidity pool, you need to find its address. This is possible through the Factory contract, which is responsible for managing all the pools. On Arbitrum, the Factory contract is deployed at the following address: Factory contract: arbiscan.io/address/0x1a3c9B… Using this Factory contract, you can search for the pool using the poolByPair mapping, which returns the pool's address if it has already been created. If the pool doesn’t yet exist, you can use the computeAddress() function to compute the address deterministically. 2. Determining the Pool's Tokens Once the pool is identified (for example, at the address arbiscan.io/address/0x7CcCBA…), you need to verify which tokens are involved and in what order. In liquidity pools, the tokens are referred to as token0 and token1. The order of these tokens can be determined by comparing the addresses: the token with the smaller address is token0. Code to Determine the Token Order: For the pool at the above address, the tokens are WETH and USDT. Since WETH has a smaller address than USDT, WETH is token0 and USDT is token1. 3. Fetching the Current Price The price of WETH in terms of USDT can be retrieved by querying the globalState variable of the pool. This variable contains the sqrtX96Price. In this case, the globalState returns the value: 3786433254360286272269346 4. Converting sqrtX96Price to the Real Price To get the actual price, you need to square the value of sqrtX96Price and divide it by 2^192. Here's how the conversion works: price = (sqrtX96Price * sqrtX96Price) / (2**192) 5. Interpreting the Price with Token Decimals This calculated price value is 0.000000002284. Since USDT uses 6 decimals, this needs to be scaled accordingly (multiplied with 1e12). The actual price becomes 2284 USDT
4
7
46
3,308
Replying to @VDAREJamesK
I get it. But I’m of the opinion that the globalstate would have (and may have) gotten to any holdouts with threats. Can’t prove it, of course. But voir dire or no, this was never going to be allowed to go any other way.
3
480
#!/bin/bash # Cyber Essentials Compliance Script for macOS # Ensure automatic updates are enabled sudo softwareupdate --schedule on # Enable firewall sudo defaults write /Library/Preferences/com.apple.alf globalstate -int 1 # Enable Gatekeeper sudo spctl --master-enable # Ensure FileVault is enabled for disk encryption sudo fdesetup enable # Disable automatic login sudo defaults delete /Library/Preferences/com.apple.loginwindow autoLoginUser # Set a firmware password sudo firmwarepasswd -setpasswd -setmode command # Ensure Bluetooth is turned off if not needed sudo defaults write /Library/Preferences/com.apple.Bluetooth ControllerPowerState -int 0 # Disable remote Apple events sudo systemsetup -setremoteappleevents off # Disable remote login sudo systemsetup -setremotelogin off # Disable wake-on LAN sudo systemsetup -setwakeonnetworkaccess off # Disable guest account sudo defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled -bool false # Clear system logs sudo rm -rf /private/var/log/* # Ensure SSH is configured securely sudo cp /etc/sshd_config /etc/sshd_config_backup sudo sed -i '' 's/#PermitRootLogin yes/PermitRootLogin no/' /etc/sshd_config sudo sed -i '' 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/sshd_config sudo sed -i '' 's/#Protocol 2/Protocol 2/' /etc/sshd_config echo "Cyber Essentials compliance checks completed."
5
1,389
13 Jan 2024
... providing a clean and efficient way to manage state globally across components. It's like giving your components a shared language! 🔄💡 #ReactContext #GlobalState
1
1
4

3
165
Yes: "It's important to remember that we need the EU and they need us very much.” but: #EU-#LATAM and: to enable the critical mass of a decentralized, peaceful and united #GlobalState.
1
2
2
458
14 Jun 2023
¡Actualizado el curso en construcción: #Next13 El framework de #React para producción! ✅ Sección 7: #GlobalState - #Redux y #LocalStorage Obtén Acceso Anticipado a este curso con una Suscripción #DevTallesPRO, en tu portal de estudiante ó en esta web: cursos.devtalles.com/courses…
9
10
60
13,180
13 May 2023
[Update] GSCore v1.0.2 - Improvements to Ecosystem and tweak preference accessing interface. - Add UIDevice helper functions. - Add DualClock API integration. - Add GlobalState singleton
2
1
8
4,534
うちのチームではGlobalStateでブラウザ履歴保存して、遷移先として指定したpathと直前の履歴が同一ならrouter.back、そうじゃなければpushでpathに遷移させる、みたいなことをやってる
21 Apr 2023
Next.jsでこういう挙動を実現したい場合はどう実装するのが正解なんだろう... 何か実装例や事例あれば教えて欲しいです!
1
2
584
4 Apr 2023
🧵4/ Privacy is becoming a big topic in the industry, with the need for breakthroughs to enable new business models that take advantage of the shared global state of crypto. @monad_xyz #crypto #globalstate
1
2
18
Replying to @MrAndyNgo
Paramilitary force used by State/globalstate
6
667