Bug report nostr:nprofile1qqsyv47lazt9h6ycp2fsw270khje5egjgsrdkrupjg27u796g7f5k0spzamhxue69uhhyetvv9ujumn0wd68ytnzv9hxgtcpzemhxue69uhhyetvv9ujuurjd9kkzmpwdejhgwq9tfw
Alby go -> transactions page -> scroll down -> app crash
ios 26.0.1
kohanucha
kohanucha@siamstr.com
npub1d0gj...0hxg
Back-end developer
Notes (15)
กินข้าวแบบใกล้ชิดธรรมชาติ
#siamstr #wasp
https://blossom.primal.net/86d9d8c85e34fd2dc46544742b0e26abb831c56a53e3da05db7205b8e5e682bb.mov
ขณะที่ผมกำลังกราวดิ้งอยู่นั้น ก็มีเจ้าสิ่งนี้เข้ามาทักทาย #siamstr #แมงแสนตี๋น
https://blossom.primal.net/115ba7dd40d95a1046fafa5abfebfa1fed0b177583d5db96ec5a4d058e14f498.mov
#siamstr มีใครเคยใช้ swap out ของ alby hub มั้ยครับ
ผมสงสัยว่า ถ้าเกิด Failed to pay swap invoice แล้วมันจะ unlock funds ของเราตอนไหน 

#siamstr
https://youtu.be/xd-rZIdmclw
พระอาทิตย์ตกที่ระยอง #siamstr
https://video.nostr.build/9659c9d1743d106715492158ec318ce03dfbcd6430fe4e26dd9fbc70ae341822.mp4
#
ยอดดอยใหม่ใกล้ฉัน #siamstr


#siamstr
วันนี้มาแจกตัวอย่าง Dockerfile สำหรับ build electrs server docker image เผื่อใครสนใจทำไว้ run เล่นเองที่บ้านครับ
Dockerfile
```
FROM rust:slim-bookworm AS build
# Declare build args
ARG VERSION=master
# Install build dependencies
RUN apt-get update && apt-get install -qqy \
clang cmake build-essential git pkg-config libssl-dev \
librocksdb-dev
# Clone and build electrs
RUN git clone https://github.com/romanz/electrs.git /electrs && \
cd /electrs && \
git checkout ${VERSION} && \
cargo build --locked --release
FROM debian:bookworm-slim AS runtime
# Declare runtime args
ARG UID=
ARG GID=
ARG USERNAME=
ARG GROUPNAME=
# Create group and user
RUN groupadd -g ${GID} ${GROUPNAME} && \
useradd -u ${UID} -g ${GID} -m -s /bin/bash ${USERNAME} && \
mkdir -p /home/${USERNAME}/electrs/bin /home/${USERNAME}/electrs/db /home/${USERNAME}/electrs/bitcoin && \
chown -R ${USERNAME}:${GROUPNAME} /home/${USERNAME}
# Copy the built binary
COPY --from=build /electrs/target/release/electrs /home/${USERNAME}/electrs/bin/
# Switch to non-root user
USER ${USERNAME}
WORKDIR /home/${USERNAME}/electrs
# Expose port 50001
EXPOSE 50001
# Run the binary
CMD ["./bin/electrs"]
```
build.sh
```
#!/bin/bash
VERSION=v0.10.9
export VERSION=${VERSION}
docker buildx build --build-arg VERSION -t electrs:${VERSION} /path/to/dockerfile
```
#siamstr
มีใครเคยดูหนังเรื่องนี้มั้ยครับ ที่พูดถึงเรื่องของ edward snowden คนที่เปิดโปงว่า NSA กำลังส่องพวกเราอยู่และน่าจะเป็นเหตุการณ์ที่ทำให้มีความกังวลว่า ECDSA secp256r1 curve ที่ออกแบบโดย NSA อาจจะมี backdoor
bitcoin จึงใช้ secp256k1 แทนเพราะไม่ไว้ใจ NSA
https://youtu.be/QlSAiI3xMh4
แปะ #siamstr
https://github.com/RoboSats/robosats
https://stratumprotocol.org/
#siamstr
วิธีคร่าว ๆ ถ้าอยาก run bitcoin node docker container โดยให้อยู่หลัง tor ครับ #siamstr
1. Install tor ในเครื่อง server ของเรา ตาม link นี้ https://community.torproject.org/onion-services/setup/install/
2. ถ้าเอาง่ายสามารถรัน docker container ด้วย network mode host ได้เลยแล้วก็ config tor เหมือนเรา run bitcoin node ในเครื่อง server ได้เลย
3. ถ้าต้องการแยก network ให้สร้าง docker network ขึ้นมาแล้ว config ให้ docker container มาใช้ network ที่เราสร้างเพื่อเชื่อมต่อไปหา tor บน host machine
4. config tor ให้รับ request จาก docker และ authen ด้วย cookie ที่ไฟล์ /etc/tor/torrc
ถ้าใช้ docker bridge network
```
SOCKSPort ${DOCKER_HOST_GATEWAY_IP}:9050
ControlPort ${DOCKER_HOST_GATEWAY_IP}:9051
CookieAuthentication 1
CookieAuthFileGroupReadable 1
```
*** ${DOCKER_HOST_GATEWAY_IP} สามารถดูได้จาก docker network inspect <network-name>
ถ้าใช้ network host
```
SOCKSPort 127.0.0.1:9050
ControlPort 127.0.0.1:9051
CookieAuthentication 1
CookieAuthFileGroupReadable 1
```
5. config bitcoin node ในไฟล์ bitcoin.conf ให้ใช้ tor (config อาจจะต่างกันในแต่ละ version)
ถ้าใช้ docker bridge network
```
debug=tor
onlynet=onion
proxy=${DOCKER_HOST_GATEWAY_IP}:9050 # where to connect tor SOCKS5 for outgoing connections
torcontrol=${DOCKER_HOST_GATEWAY_IP}:9051 # where to connect tor control for hidden bitcoin service
bind=0.0.0.0:8334=onion # where to receive incoming peer connections
```
ถ้าใช้ network host
```
debug=tor
onlynet=onion
proxy=127.0.0.1:9050
torcontrol=127.0.0.1:9051
bind=127.0.0.1:8334=onion
```
6. เขียน docker-compose.yml file ตัวอย่างผมใช้ image ของ https://github.com/lncm/docker-bitcoind
```
services:
bitcoind:
container_name: bitcoind
image: lncm/bitcoind:v28.0
user: "1000:1000" # run process with user 1000 (bitcoind user in container)
group_add:
- "${DEBIAN_TOR_GID}" # add user 1000 to debian-tor group (debian-tor group in host machine) to read tor control.authcookie file
volumes:
- ~/data/bitcoin/:/data/.bitcoin/ # where to store bitcoin data
- /run/tor/control.authcookie:/run/tor/control.authcookie:ro # map tor control.authcookie for authentication
ports:
- "8334:8334" # expose port 8334 to receive incoming peer from tor network
networks:
- ext_bitcoind_bridge # use external network to prevent ip changing after docker compose down and up again
networks:
ext_bitcoind_bridge:
external: true
name: bitcoind_bridge # need to run 'docker network create bitcoind_bridge' before docker compose up
```
7. docker compose up -d
8. ถ้าใช้ firewall ร่วมด้วยก็ต้องไป allow proxy port กับ control port ของ tor ให้เชื่อมต่อจาก docker network ได้ด้วย
ChatGPT ยังรู้กำเมียง 5555 แต่ถูกไม่ถูกผมก็ไม่ฮู้นะ #siamstr


GM ครับ #siamstr
วันนี้การจราจรไม่ติดขัดรวบ transactions กันได้นะครับ

