Reverse Proxy to bypass Network Issue of Solana RPC Node

tags: Nginx One Endpoint for Both WebSocket and Normal Requests,Solana,Solana 101: Create an Escrow dApp I met a lot network issues about connecting to RPC node of Solana, so I’m using a nginx server as a reverse proxy to bypass this problem: location / { # https://serverfault.com/a/923254 try_files /nonexistent @$http_upgrade; } location @ { proxy_pass https://api.testnet.solana.com; proxy_read_timeout 300s; proxy_send_timeout 300s; proxy_set_header Host "api.testnet.solana.com"; } location @websocket { proxy_redirect off; proxy_pass https://api.testnet.solana.com; proxy_http_version 1.1; proxy_read_timeout 300s; proxy_send_timeout 300s; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; }

December 24, 2022 · 1 min · Gray King

Nginx

tags: Linux

December 24, 2022 · 1 min · Gray King

Nginx One Endpoint for Both WebSocket and Normal Requests

tags: Nginx source: https://serverfault.com/a/923254 server { # ... location / { # If "Websocket" is in Upgrade header, then @websocket will take effect, # otherwise @ will take effect. try_files /nonexistent @$http_upgrade; } location @websocket { # websocket related stuff } location @ { # web related stuff } }

December 24, 2022 · 1 min · Gray King

Decoration

参考 https://github.com/RobbieXie/2020DecorationNote Ideas 在马桶旁边要留一个插座,用于智能马桶垫; 厨房油烟机机一个光滑斜面可以在餐厅坐着看锅里的情况; 全屋六类线预留 AP 和插座,最好能扩大弱电箱能放进去个 NAS; 面向扫地机器人装修;

December 24, 2022 · 1 min · Gray King

Ethereum Layer 2

tags: Ethereum Knowning Layer 2 Chain Rollup(or bundle) transactions off-chain to reduce fee and scale capacity, such as Bitcoin Lightning. Two layer 2 rollups Optimistic Rollups Zero-Knowledge Rollups Record on-chain state by writing calldata to L1(Ethereum), which more cheaper than change state on L1 chain. Fees Some layer 2 chain like Optimism should plus l1 fee when executing transaction on layer 1.1 Many Ethereum applications display estimated fees to users by multiplying the gas price by the gas limit. However, as discussed earlier, users on Optimism are charged both an L2 execution fee and an L1 data fee. As a result, you should display the sum of both of these fees to give users the most accurate estimate of the total cost of a transaction. ...

December 23, 2022 · 1 min · Gray King