분산 네트워크용 결정론적 2차원 격자 + 행렬 아핀 계산 기반 다중 경로 라우팅과 지향성 가십을 구현하는 방법
작성자: bokkamsun@gmail.com
요약: 모든 피어를 같은 시드로 같은 격자에 배치한다. 같은 격자 위에서 최단 1경로 + 좌/우 우회 2경로를 결정론적으로 만든다. 메시지는 경로를 내장해 다음 노드 한 칸만 전진한다. 실패나 장애가 보이면 전방 이웃만 선택하는 지향성 가십을 짧게 켜서 커버리지를 보강한다. 이로써 재현성, 도달성, 대역 효율을 동시에 확보한다.
- 완전한 결정론성: 동일한 시드와 피어 집합이면 모든 노드가 똑같은 격자/경로를 재현한다.
- 구성적 다중경로: 최단 BFS에 아핀 편향 $T(\theta,k)$ 로 좌/우 경로를 의도적으로 합성한다.
- 경로 내장형 포워딩: 메시지에
path[]를 싣고 다음 IP 한 칸만 전진한다.
- 경량 구현, 높은 이식성: 8-이웃 BFS, 격자 스냅, 간단 행렬 연산만으로 구동한다.
- 기존 대비 차별성: 무작위/거미줄형 그래프 탐색이 아니라 결정론적 2D 임베딩 + 선형대수 기반 편향으로 경로를 재현 가능하게 합성한다.
- 실전성 검증: 채굴/투표/검증 흐름에 3경로를 동시에 적용해 혼잡/차단/부분장애에서도 도달률을 실사용 수준으로 확보한다.
본 발명은 공통 시드와 IP로 모든 피어를 결정론적으로 정방 격자에 배치한다. 같은 격자 위에서 최단 경로(BFS) 1개와 아핀 편향 $T(\theta,k)$ 로 만든 좌/우 우회 경로 2개를 함께 산출해 항상 3경로를 제공한다. 메시지는 이 경로들을 path[]에 내장하고 각 홉은 다음 IP 한 칸만 전진하므로 중간 판단이 없고 루프가 구조적으로 차단된다. 그리고 지향성 가십은 기존 가십을 대체한다. 전방 이웃만 선택하고 짧은 TTL로 확산해 팬아웃 3 이하를 유지하면서 전역 전파를 수행한다. 즉, 내장 3경로는 확정 경로 전달, 지향성 가십은 대규모 전파의 기본 엔진이다. 입력이 같으면 모든 노드가 동일 경로/동일 전파 패턴을 재현하므로 테스트/감사가 용이하고, 혼잡/검열/부분 장애에서도 안정적 전파와 낮은 비용을 동시에 달성한다.
1. 개요
본 기술은 무작위 전파 대신 결정론과 경로 내장을 사용한다. 절차는 다음과 같다.
- 결정론 정렬: 공통 시드와 주소로 모두가 같은 순서를 만든다.
- 격자 배치: 그 순서를 바둑판 격자에 채운다.
- 기본 경로 생성: 격자 8이웃 그래프에서 최단 경로를 구한다.
- 우회 경로 합성: 진행축 기준 아핀 편향으로 좌/우 중간점을 잡고, 두 구간 최단을 이어 우회 2경로를 얻는다.
- 경로 내장 전달: 메시지에
path[]를 싣고 다음 노드 한 칸만 보낸다. 중간 판단이 없어 루프와 지터가 줄어든다.
- 지향성 가십: 기존가십과 섞어 쓰거나, 전달 실패/지연 징후가 있으면 전방 이웃만 선택해 짧은 TTL로 확산한다. 필요할 때만 켜 대역 스파이크를 막는다.
- 중복 억제: 송신 측은 동일 첫 홉을 제거하고, 수신 측은 최근 ID 집합으로 중복을 드롭한다.
2. 기술분야
분산 네트워크와 블록체인 환경에서의 결정론적 토폴로지 구성과 다중 경로 메시지 라우팅.
3. 배경기술과 차별성
- 기존 임의 전파는 경로가 흔들려 재현성이 낮다.
- 격자/메쉬 기반 탐색은 단일 최단 중심으로 우회 설계가 빈약하다.
- 경로를 메시지에 내장하지 않으면 중간 홉의 로컬 상태에 경로가 좌우된다.
본 발명은 다음에서 차별화된다.
- 결정론 격자 사상으로 모든 노드가 동일 토폴로지를 재현한다.
- 행렬 아핀 편향으로 좌/우로 굽은 우회 경로를 수식적으로 설계하고, 격자 스냅과 두 구간 최단 결합으로 이산화한다.
- 경로 내장형 전달과 양단 중복 억제로 도달성과 효율을 동시에 달성한다.
4. 용어와 기호
피어 수 $N$, 정렬열 $\mathbf{v}=[v_0,\dots,v_{N-1}]$ 이고, 격자 한 변 길이 $S$와 좌표는 다음과 같다.
$$S=\left\lceil\sqrt{N}\right\rceil$$
$$r=\left\lfloor\frac{i}{S}\right\rfloor$$
$$c=i\bmod S$$
격자 좌표 벡터는 $\vec{p}=\begin{bmatrix} c \\ r \end{bmatrix}$ 이다.
여덟 이웃은 $\mathcal{N}_8=\{(-1,-1),(-1,0),(-1,1),(0,-1),(0,1),(1,-1),(1,0),(1,1)\}$ 이다.
정의: 결정론 임계값 함수(일반형) 에서 임계값은 $h_p=\mathrm{computeThreshold}\big(\mathrm{ip}(p),\mathrm{seed}\big)\in[0,2^w)$ 로 둔다.
정렬 키는 $(h_p,\;\mathrm{ip}(p))$ 이며 오름차순 사전식으로 정렬한다.
구현 예(해시 XOR 기반) 은 다음과 같다.
$$h_p=\text{LOW}_{w}\big(F(\text{seed})\;\oplus\;F(\text{ip}(p))\big)$$
여기서 $F$ 는 고정 해시 함수, $\oplus$ 는 비트 XOR, $\text{LOW}_{w}(\cdot)$ 는 하위 $w$비트 취함이다.
5. 발명의 요지
5.1 결정론 정렬
모든 노드는 동일한 seed와 피어 주소 집합에 대해 다음 임계값을 계산한다.
$$h_p=\text{LOW}_{w}\big(F(\text{seed})\;\oplus\;F(\text{ip}(p))\big)$$
정렬은 오름차순 $(h_p,\;\text{ip}(p))$ 기준으로 수행한다. 입력이 같으면 결과가 항상 같으므로 전 노드가 동일한 정렬열을 얻고, 이를 $S\times S$ 격자에 순차 배치하므로 토폴로지도 전 노드에서 동일하다.
데카르트 좌표
토폴로지 구성을 결정론적 격자 배치하여 행렬연산이 가능하다.
5.2 격자 사상
정렬 순서 $i$ 번째 피어를 $(r,c)$ 에 순차 배치한다. 빈 칸은 존재하지 않는 노드로 간주해 자동 회피된다.
5.3 최단 경로
여덟 이웃 무가중 그래프에서 시작 $\vec{p}_s$ 와 목표 $\vec{p}_g$ 사이 최단 홉수 경로 $\mathcal{P}_0$ 를 산출한다.
5.4 로컬-법선 평행이동 기반 편향
진행축을 기준으로 로컬 좌표에서 법선 방향($y$축) 으로 $\alpha$ 만큼 평행이동한 편향 중간점을 만든 뒤, 두 구간 최단을 이어 좌/우 대체 경로를 얻는다.
6. 수학적 구성
6.1 진행각과 변위
시작점과 목표점은 각각 $\vec{p}_s=\begin{bmatrix} c_s \\ r_s \end{bmatrix}$, $\vec{p}_g=\begin{bmatrix} c_g \\ r_g \end{bmatrix}$ 이다.
변위는 $\vec{d}=\vec{p}_g-\vec{p}_s$ 이고, 진행각은 $\theta=\mathrm{atan2}(r_g-r_s,\;c_g-c_s)$ 이다.
6.2 진행축 정렬과 로컬-법선 평행이동
회전행렬 R
$$R(\theta)=\begin{pmatrix}\cos\theta & -\sin\theta\\\sin\theta & \cos\theta\end{pmatrix}$$
1. 진행각으로 정렬한다.
$$\begin{bmatrix} x_L\\ y_L \end{bmatrix}=R(-\theta)\big(\vec{p}_s + t\,\vec{d} - \vec{p}_s\big),\qquad y_L \leftarrow y_L \pm \alpha,\qquad \tilde{\mathbf{p}}_m^{(\pm)}=\vec{p}_s+R(\theta)\begin{bmatrix} x_L\\ y_L \end{bmatrix}.$$
2. 로컬 법선($y_L$)으로 $\pm\alpha$ 평행이동한다.
3. 역정렬하여 월드 좌표로 복귀한다.
여기서 $\vec{d}=\vec{p}_g-\vec{p}_s$, $t\in(0,1)$ 이며 코드 기본은 $t=0.5$ 이다.
부연: 기존 문서의 $T(\theta,k)=R(\theta),S_x(k),R(-\theta)$ 표기는 개념 설명이며, 실제 구현은 로컬-법선 평행이동으로 동치 효과를 낸다.
6.2a 동차좌표 버전
현재 문서는 작성된 코드와 일관성을 유지하기위해, 동차좌표 없이 "로컬-법선 평행이동"으로 구현하였다. 추가로 이해를 돕기 위해 동일 동작을 3x3 동차 행렬로도 첨부한다.
$$T(a,b)=\begin{bmatrix}1&0&a\\0&1&b\\0&0&1\end{bmatrix},\quad R(\theta)=\begin{bmatrix}\cos\theta&-\sin\theta&0\\\sin\theta&\cos\theta&0\\0&0&1\end{bmatrix}$$
$$M_{\pm}=T(c_s,r_s)\;R(\theta)\;T\!\big(t\,\lVert\vec{d}\rVert,\;\pm\alpha\big)\;R(-\theta)\;T(-c_s,-r_s)$$
$$\tilde{\mathbf{p}}^{(\pm)}_m=\big(M_{\pm}\,[c_s,\;r_s,\;1]^T\big)_{xy},\qquad\hat{\mathbf{p}}^{(\pm)}_m=\mathrm{clipRound}\!\left(\tilde{\mathbf{p}}^{(\pm)}_m\right)$$
$$\tilde{\mathbf{p}}^{(\pm)}_m=\vec{p}_s+t\,\vec{d}\;\pm\;\alpha\,\hat{n}$$
즉 본문 식(6.3)과 완전히 동일하다. 여기서 $\vec{d}=\vec{p}_g-\vec{p}_s,\;\hat{n}=[-\sin\theta,\;\cos\theta]^T$.
- 선택 확장(개념용): 과거 표기 $T(\theta,k)=R(\theta)\,S_x(k)\,R(-\theta)$를 쓰고 싶다면,
$$M_{\pm}=T\;R(\theta)\;S_x(k)\;T\!\big(t\lVert\vec{d}\rVert,\;\pm\alpha\big)\;R(-\theta)\;T^{-1}$$
처럼 전개 지점에 끼우면 된다. 본 구현은 $S_x(k)=I$로 두고 평행이동만 사용한다.
- 구현: 동차 방식을 택해도 마지막은 동일하게
clipRound()와 경계 클램프를 적용한다.
6.3 편향 중간점과 격자 스냅
법선 단위벡터는 $\hat{n}=[-\sin\theta\;\cos\theta]$ 이다.
편향 세기는 $\alpha = 0.6,k,\lVert \vec{d}\rVert$ 이며 기본 $t=0.5$ 를 사용한다.
연속 공간상의 편향 중간점과 격자 반올림/경계 클램프는
$$\tilde{\mathbf{p}}_m^{(\pm)}=\vec{p}_s + t\,\vec{d}\;\pm\;\alpha\,\hat{n},\qquad\hat{\mathbf{p}}_m^{(\pm)}=\mathrm{clipRound}\!\left(\tilde{\mathbf{p}}_m^{(\pm)}\right).$$
- $\hat{\mathbf{p}}_m^{(\pm)}$ 이 시작 또는 목표와 같은 셀이면, 법선 $\hat{n}$ 방향으로 $\mathrm{bump}=\mathrm{sign}(\alpha)\cdot\max\!\big(1,\;0.1\lVert\vec{d}\rVert\big)$ 만큼 추가 평행이동 후 다시 clipRound 한다.
- 해당 셀이 비어 있으면 반경 $\le 3$ 내에서 가장 먼저 발견되는 유효 셀을 대체 선택한다.
6.4 두 구간 최단 결합
편향 경로는
$$\mathcal{P}_{\pm}=\mathrm{ShortestPath}(\vec{p}_s,\hat{\mathbf{p}}_m^{(\pm)})\;\oplus\;\mathrm{ShortestPath}(\hat{\mathbf{p}}_m^{(\pm)},\vec{p}_g)$$
UBMS 3 path [ t 값이 0.9 ]
이며, $\oplus$ 는 중간점 중복을 한 번만 포함하는 연결이다(코드에서 두 번째 구간은 인덱스 1부터 붙임).
7. 지향성 가십 전파(Directional Gossip) — 결정론 격자 기반 부채꼴 전파
7.1 정의
격자 좌표를 $\vec{p}=[c\;r]^T$ 로 두고, 여덟 이웃 집합은
$$\mathcal{N}_8=\{(-1,-1),(-1,0),(-1,1),(0,-1),(0,1),(1,-1),(1,0),(1,1)\}.$$
8이웃($\mathcal{N}_8$)
방향 부호 벡터 $\vec{u}=[s_x\;s_y]^T\in\{-1,0,1\}^2\setminus\{(0,0)\}$ 를 메시지 필드 op3="sx,sy"로 내장한다. 이는 시작점과 발신자 사이 상대 위치의 부호 정규화:
$$s_x=\operatorname{sign}(c_{\text{nbr}}-c_{\text{src}}),\qquad s_y=\operatorname{sign}(r_{\text{nbr}}-r_{\text{src}})$$
$$\operatorname{sign}(z)=\begin{cases}1,& z>0\\0,& z=0\\-1,& z<0\end{cases}$$
7.2 전파 규칙(부채꼴 전방 이웃)
현재 홉이 $\vec{p}$ 일 때 전방 이웃 집합을
$$\mathcal{F}_{\vec{u}}(\vec{p})=\{\;\vec{p}+\vec{\delta}\;\mid\;\vec{\delta}\in\mathcal{N}_8,\;\vec{\delta}\cdot\vec{u}>0\;\}$$
로 정의한다. 즉, $\vec{u}$ 와의 내적이 양수인 이웃만 선택.
- 축 방향 $(1,0)$: $(1,-1),(1,0),(1,1)$ 로 3분기.
- 축 방향 $(0,1)$: $(-1,1),(0,1),(1,1)$ 로 3분기.
- 대각 $(1,1)$: $(1,1),(1,0),(0,1)$ 로 3분기.
u=(1,0)
u=(1,1)
수신 노드는 $\mathrm{TTL}\leftarrow\mathrm{TTL}-1$ 후 유효 피어만 골라 $\mathcal{F}_{\vec{u}}(\vec{p})$ 로 송신하며, 입력 FD는 제외.
7.2a 직관 설명: $\Delta$(델타)와 $\vec{u}$(전진축)
- $\Delta$ = "한 칸 이동 후보." 현재 위치 $\vec{p}$에서 $\vec{p}+\Delta$로 1홉 이동한다.
- $\vec{u}$ = (sx, sy) = "가고 싶은 큰 방향의 부호." sx, sy $\in \{-1,0,1\}$, (0,0)은 금지.
- 전방 선택 규칙: 점수 = $dx \cdot sx + dy \cdot sy$
- 점수 > 0: 전방 이웃. 보낸다.
- 점수 = 0: 측면. 전방이 없을 때만 보조로 쓴다(7.7).
- 점수 < 0: 후방. 버린다.
- 요약: $\vec{u}$는 "전진축", $\Delta$는 "한 걸음". $dx \cdot sx + dy \cdot sy > 0$ 인 걸음만 전송한다.
7.3 TTL 설정(격자 대각 기반)
격자 한 변 $S=\lceil\sqrt{N}\rceil$, 전체 대각 길이
$$D=\sqrt{(S-1)^2+(S-1)^2}$$
지향성 가십의 TTL은
$$\mathrm{TTL}=\max\!\big(3,\;\lfloor \rho\cdot D+0.5\rfloor\big),\qquad \rho\in(0,1],\;\;\text{기본 }\rho=0.8.$$
7.4 메시지 형식
op3="sx,sy": 방향 벡터 $\vec{u}$.
ttl: 위 식의 TTL.
messageId: 고유 식별자.
payload: 송신자 상태.
7.5 결정론 시작 방향 선택
발신 노드가 자기 8이웃 중 선택한 시작 이웃 $(c_{\text{nbr}},r_{\text{nbr}})$ 에 대해
$$\vec{u}=\begin{bmatrix}\operatorname{sign}(c_{\text{nbr}}-c_{\text{self}})\\\operatorname{sign}(r_{\text{nbr}}-r_{\text{self}})\end{bmatrix}.$$
선택 정책(라운드로빈, 해시 최소 등)을 고정하면 동일 입력에서 결정론적 시작 방향이 재현된다.
7.6 중복 억제
각 노드는 messageId 또는 (header, op3, payload) 해시로 최근 수신 집합을 유지하고 중복 패킷을 드롭한다. 동일 첫 홉을 공유하는 분기는 송신 측에서 하나만 남긴다.
7.7 경계/결손 노드 처리
격자 경계 또는 결손(빈 셀)에서 전방 이웃이 비면 전파를 중단하지 않고 대체 전방 집합을 선택한다.
$$\mathcal{F}^\ast_{\vec{u}}(\vec{p})=\big(\mathcal{F}_{\vec{u}}(\vec{p})\cap \mathcal{V}\big)\;\cup\;\big\{\,\vec{p}+\vec{\delta}\;\mid\;\vec{\delta}\in\mathcal{N}_8,\;\vec{\delta}\cdot\vec{u}=0,\;\vec{p}+\vec{\delta}\in\mathcal{V}\,\big\}$$
여기서 $\mathcal{V}$ 는 유효 노드 집합이다. 즉, 우선 전방($\vec{\delta}\cdot\vec{u}>0$)을 사용하고, 없을 때만 측면($=0$)을 보조로 사용한다.
7.8 종료 조건과 루프 방지
$$\mathrm{TTL}\leftarrow \mathrm{TTL}-1,\qquad\text{if }\mathrm{TTL}\le 0\text{ then drop}.$$
최근 수신 집합 $\mathcal{R}$ 에 대해
$$\text{if }\texttt{messageId}\in \mathcal{R}\text{ then drop},\quad\text{else }\mathcal{R}\leftarrow \mathcal{R}\cup\{\texttt{messageId}\}.$$
전방 선택은 $\vec{\delta}\cdot\vec{u}\ge 0$ 만 허용하므로 역방향 전파가 구조적으로 배제된다.
7.9 도달률 하한(커버리지)와 TTL 하한
격자 변 $S$, 대각 길이 $D=\sqrt{2}\,(S-1)$. $\rho\in(0,1]$ 에 대해
$$\mathrm{TTL}_{\min}=\max\big(3,\;\lfloor \rho\,D + 0.5\rfloor\big)$$
을 쓰면, 장애 비율이 $\le (1-\rho)$ 인 균질 환경에서 부채꼴 전선의 도달률 하한이 유지된다. $\rho$ 를 늘리면 커버리지 증가, 대역비용 증가.
7.10 파라미터 튜닝 지침
- 팬아웃 상한: 각 홉 송신수 $\le 3$ 유지. 필요 시 샘플링 확률 $p\in(0,1]$ 도입.
$$\mathbb{E}[M_{\text{dir}}]\approx 3p\,\mathrm{TTL}.$$
TTL = 3 이웃 커버리지
- $\rho$: 평시 0.6 ~ 0.8, 장애 구간 감지 시 일시적으로 0.9 이상.
- 최근 집합 크기: 윈도 길이 $W\ge \mathrm{TTL}$ 로 설정.
7.11 보안/검열 회피 고려
- 방향 고정 공격 완화: 시작 방향 $\vec{u}$ 를 결정론적이되 라운드 시드로 주기 갱신.
$$\vec{u}_t=\mathrm{choose}\big(\mathcal{N}_8\setminus\{(0,0)\};\;\mathrm{seed}_t,\;\mathcal{N}_8\big)$$
동일 라운드 입력에 대해 전 노드가 같은 $\vec{u}_t$ 를 재현한다.
- 헤더 위/변조 검출: (op3, ttl, payload) 에 대한 경량 MAC 첨부.
7.12 성능 상한과 기대치 정리
총 송신 상한:
$$M_{\text{dir}}\le 3\,\mathrm{TTL},\qquad\mathrm{TTL}\le \rho\,\sqrt{2}\,(S-1)=\Theta(\sqrt{N})$$
전역 중복 포함 절댓값의 보수 상한은
$$M_{\text{dir}}^{\text{dup}}\le 3N$$
이지만, 최근 집합과 측면 대체 규칙으로 실측은 $\Theta(\sqrt{N})$ 에 근접한다.
7.13 호환성: 경로 전파와의 병행 운용
동일 메시지 ID에 대해 경로 전파(6절) 를 우선, 지향성 가십은 타임아웃 $T_{\text{fallback}}$ 후 보조 가동:
$$\text{if not delivered by }T_{\text{fallback}}\;\Rightarrow\;\text{start directional gossip with }\mathrm{TTL}=\mathrm{TTL}_{\min}.$$
증폭 방지를 위해 송신 측은 동일 첫 홉 중복을 제거한다.
8. 지향성 가십의 효과
- 경로 다양성: 8방향 중 선택된 $\vec{u}$ 기준 부채꼴 전방 3분기로 검열/혼잡 회피 확률 상승.
- 결정론성: 격자 사상과 시작 방향 정책 고정으로 재현 가능.
- 단순성: 조건 $\vec{\delta}\cdot\vec{u}>0$ 만으로 전방 선별.
8.1. 일반적인 gossip 전파
일반 gossip ttl = 1
일반 gossip ttl = 2
일반 gossip ttl = 3
일반 gossip ttl = 4
일반 gossip ttl = 5
일반 gossip ttl = end
음영구역 발생: 무작위 전파에 가까운 일반적인 가십전파는 필연적인 음영구역 발생.
8.2. 지향성 gossip 전파
지향성 gossip ttl = 1
지향성 gossip ttl = 3
지향성 gossip ttl = 5
지향성 gossip ttl = 7
지향성 gossip ttl = 11
지향성 gossip ttl = end
치밀하고 체계적인 전파: 각 노드는 방향벡터를 기준으로 전파방향을 설정, 역전파 중복전파 등이 최소화됨.
9. 경로 내장 전달과 중복 억제
메시지는 전체 경로와 길이를 포함하고 각 홉은 자기 다음 노드로만 전진한다. 송신 측은 세 경로의 첫 번째 다음 홉이 같으면 하나만 남긴다. 수신 측은 최근 본 식별자 또는 경로/내용 해시로 중복을 억제한다. 이중 억제는 증폭을 막으면서 3경로의 도달성 이점을 유지한다.
10. 장애와 혼잡 상황에서의 동작 이유
좌/우 편향 경로는 기하학적으로 분리된 통로를 제공한다. 편향 경로는 격자 위 두 구간 최단의 합성이어서 불필요한 우회가 작다. $|k|$ 가 커지면 경로 상관이 낮아져 검열/혼잡 회피에 유리하지만 지연은 증가한다. 기본적으로 $t=\tfrac{1}{2}$ 가 균형 잡힌 분산을 준다.
11. 실시예
동일 시드/주소 집합이면 모든 노드가 동일 격자 배치와 동일 3경로를 재현한다. 편향 강도 $|k|$ 를 조절하면 좌/우 경로의 분산 폭이 달라진다. 격자 끝 빈 칸은 자동 회피되며, 편향 중간점이 빈 칸이면 근접 유효 셀 대체로 경로 생성을 지속한다. 기본값은 $t=0.5$, $\alpha=0.6,k,\lVert\vec{d}\rVert$ 이다.
12. 산업상 이용가능성
- AI 분산노드: 분산네트워크 환경에서 AI노드간의 통신.
- 블록체인 합의: 투표/검증 신호를 3경로로 동시 전파해 정족수 도달 안정성을 높인다.
- 공개 피어 전파: 꼬리 지연과 실패율을 낮춘다.
- 사물망/현장망/애드혹망: 간섭/단절에도 즉시 우회한다.
- 오버레이/서비스 메쉬: 하부망과 무관하게 응용 계층에서 경로를 고정/내장한다.
운영 가이드: 시드는 라운드/시간 단위로 고정해 동일 격자를 재현한다. 편향 강도 $k$ 는 지연 중심이면 작게, 내결함성 중심이면 크게 정한다. 송신/수신 양단 억제로 중복 최소화. 메시지 길이는 경로 길이와 동일로 설정해 루프를 차단한다.
13. 성능과 복잡도
격자 면적은 $S^2$ 이고, 최단 탐색의 시간 복잡도는 대략 $O(S^2)$ 이다. 본 발명에서 제시하는 방법으로 세 경로 산출은 최단 1회와 편향 각 2회의 두 구간 결합으로 상수배 비용 증가에 그친다.
13.1 모델
- 지향성 가십 길이 척도: $D=\sqrt{2}\,(S-1)=\Theta(\sqrt{N})$.
- TTL 상한: $\mathrm{TTL}\le \rho\,D$.
13.2 경로 내장 3-경로 전파
- 경로 수: 3.
- 경로 길이: 각 $\Theta(\sqrt{N})$.
- 총 송신 수: $M_{\text{path}} \approx 3D=\Theta(\sqrt{N}).$
- 중복 없음. 지연: $\Theta(\sqrt{N})$ 홉.
13.3 지향성 가십
- 각 홉 전방 이웃 $\le 3$만 1회 송신.
- 총 송신 수 상한: $M_{\text{dir}}\le 3N=\Theta(N).$
- 중복은 최근 ID로 억제. 지연: $\Theta(\sqrt{N})$ 홉.
13.4 전통 가십(비교 기준)
- 팬아웃 $g\ge 2$, 라운드 수 $\Theta(\log N)$.
- 총 송신 수(중복 포함): $M_{\text{epi}}=\Theta\!\big(g\,N\log N\big).$
13.5 정량 예시
$N=10^4,\;\rho=0.8,\;g=3$ 가정.
- $D\approx 0.8\cdot\sqrt{2}\cdot(100-1)\approx 112$.
- 경로 전파: $M_{\text{path}}\approx 3D\approx 336$.
- 지향성 가십: $M_{\text{dir}}\le 3N=30{,}000$.
- 전통 가십: $M_{\text{epi}}\approx g\,N\log_2 N\approx 3\cdot10^4\cdot13.3\approx 399{,}000$.
13.6 비용/지연 트레이드오프
- 대역 효율: $M_{\text{path}}\ll M_{\text{dir}}< M_{\text{epi}}$.
- 도달성/내결함성: 전통 $\ge$ 지향성 $>$ 경로.
- 지연: 전통 $O(\log N)$, 경로/지향성 $O(\sqrt{N})$.
- 재현성/제어성: 경로/지향성은 결정론적, 전통은 비결정적.
13.7 운용 권고
- 평시: 경로 3개로 전역 신호 전달(대역 최소).
- 장애/검열 구간 탐지 시: 지향성 가십 보조 활성화로 커버리지 확보.
- 전통 가십은 피크/중복 비용이 커 상시 운용 비권장.
14. 청구항
청구항 1
결정론 정렬/정방 격자 사상을 수행하고, 격자 여덟 이웃 그래프에서 최단 경로 $\mathcal{P}_0$ 를 산출하며, 진행축 정렬-로컬 법선 평행이동-역정렬 변환을 통해 편향 중간점 $\hat{\mathbf{p}}_m$ 을 생성하고, 시작-중간점, 중간점-목표의 두 구간 최단을 연결하여 좌/우 편향 경로 $\mathcal{P}_{\pm}$ 를 생성한 뒤, 이를 $\mathcal{P}_0$ 와 함께 제공하는 다중 경로 라우팅 방법.
청구항 2
편향 중간점이 비어 있거나 유효하지 않을 때 반경 확장으로 근접 유효 셀을 대체 선택하여 편향 경로 생성을 유지하는 방법.
청구항 3
메시지에 전체 경로와 길이를 포함하여 각 홉에서 다음 노드로만 전진하도록 하여 루프를 억제하고 경로 재현성을 확보하는 방법.
청구항 4
송신 측에서 첫 번째 다음 홉이 같은 경로를 제거하고, 수신 측에서 최근 본 식별자 또는 경로/내용 해시로 중복을 억제하여 네트워크 증폭을 방지하는 방법.
청구항 5
연속 공간의 로컬-법선 평행이동 편향을 격자 반올림과 두 구간 최단 결합으로 이산화하여, 현실 네트워크 제약을 만족하면서 경로 다양화를 실현하는 방법.
청구항 6
상기 방법을 수행하기 위한 저장매체 또는 장치.
청구항 7
공통 시드와 각 피어 주소에 대해 $h_p=\mathrm{computeThreshold}\big(\mathrm{ip}(p),\mathrm{seed}\big)$ 를 산출하고, 정렬 키 $(h_p,\;\mathrm{ip}(p))$ 를 오름차순 사전식으로 정렬한 결과를 격자에 배치함으로써, 상기 정렬 및 배치가 모든 노드에서 동일한 토폴로지를 재현하도록 하는 방법.
청구항 8
격자 좌표에서 방향 부호 벡터 $\vec{u}\in\{-1,0,1\}^2\setminus\{(0,0)\}$ 를 메시지에 내장하고, 각 홉에서 여덟 이웃 $\mathcal{N}_8$ 중 내적이 양수인 전방 이웃
$$\mathcal{F}_{\vec{u}}(\vec{p})=\{\vec{p}+\vec{\delta}\mid \vec{\delta}\in\mathcal{N}_8,\;\vec{\delta}\cdot\vec{u}>0\}$$
으로만 전달하는 지향성 가십 전파 방법.
청구항 9
격자 한 변 $S$ 에 대해
$$\mathrm{TTL}=\max\big(3,\;\lfloor \rho\sqrt{2}\,(S-1)+0.5\rfloor\big)$$
로 TTL을 설정하여 과전파를 억제하면서 전역 도달성을 확보하는 방법.
청구항 10
발신 노드가 이웃 선택 정책을 결정론적으로 적용해 시작 방향 $\vec{u}$ 를 산출하고, 동일 입력에 대해 네트워크 전체에서 동일한 전파 부채꼴을 재현하는 방법.
청구항 11
수신 노드가 최근 수신 집합 기반 중복 억제를 수행하고, 송신 노드가 동일 첫 홉을 공유하는 분기 중 하나만 송신하도록 하여 증폭을 방지하는 방법.
15. 업계 한계와 본 기술의 가치
15.1 기존기술의 문제
- 경로가 매번 달라 재현 불가. 테스트와 감사가 어렵다.
- 중간 노드 판단 의존. 혼잡 시 경로 흔들림과 루프 발생.
- 가십 전파 남발. 대역/CPU 낭비와 꼬리 지연 확대.
- 우회 설계 부족. 검열/부분 장애 시 전달 실패 다발.
15.2 본 기술이 푸는 난제
- 결정론적 토폴로지: 모두가 같은 바둑판, 같은 순서. 결과가 항상 같다.
- 내장 경로 3개: 최단 1 + 우회 2. 한쪽이 막혀도 도착한다.
- 한 칸 전진 규칙: 중간 판단 제거. 루프 차단. 구현 단순.
- 지향성 가십: 필요 시 앞쪽으로만 빠르게 확산. 대역 통제 가능.
15.3 핵심 장점
- 대역 절감: 평시 전파량이 전통 가십 대비 한 자리수 수준.
- 지연 안정: 경로가 고정되어 지터 감소. 꼬리 지연 축소.
- 운영 단순화: 시드만 맞추면 전 노드가 동일 동작.
- 감사 용이: 재현 가능 경로로 원인 추적이 쉽다.
- 장애 내성: 검열/부분 단절/혼잡에서도 성공률 유지.
15.4 쉬운 설명
- 같은 시드로 같은 순서 목록 생성.
- 그 순서대로 바둑판 칸 채움.
- 기본 길 하나와 좌/우 우회 길 둘을 미리 생성.
- 메시지에 그 길을 넣고 다음 칸으로만 보냄.
- 기존 가십전파의 과도한 트래픽을 지향성 전파로 해결할 수 있음.
15.5 효과를 체감하는 곳
- AI 노드: AI 노드간의 통신, 분산네트워킹.
- 블록체인 합의: 투표/검증 신호의 정족수 도달 안정.
- 퍼블릭 피어망: 새 블록/헤더 전파 꼬리 지연 감소.
- 엣지/사물망: 간헐적 단절에서도 즉시 우회.
- 서비스 메쉬: 상위에서 경로 고정. 하부망 변화와 분리.
15.6 현장 응용
- 시드는 라운드 단위로 고정.
- 우회 강도는 목표에 맞춰 조정.
- 평시엔 3경로만. 실패 감지 시 지향성 가십을 짧게 가동.
- 첫 홉 중복 제거와 최근 수신 집합 상시 유지.
16. 결론
본 발명은 결정론 격자, 로컬-법선 평행이동 기반 아핀 편향, 경로 내장형 전달을 결합해, 어디서 계산해도 동일한 3경로를 재현한다. 메시지는 다음 노드로만 전진하므로 루프가 구조적으로 차단되고, 혼잡/검열/부분 장애에서도 도달성과 안정성을 확보한다.
더불어 지향성 가십은 전통 가십의 과도한 트래픽과 꼬리 지연 문제를 해결한다. 전방 이웃만 선택해 퍼지므로 매 홉 팬아웃이 최대 3으로 제한되고, 필요할 때만 짧게 가동해 네트워크 스파이크를 억제한다. 평시에는 내장 3경로로 대역을 절감하고, 실패나 장애가 감지될 때만 지향성 가십을 보조로 붙여 커버리지와 도달률을 끌어올린다. 결과적으로 본 기술은 예측 가능성(재현성), 비용 효율(대역/CPU 절감), 지연 안정(지터/꼬리 감소), 내결함성을 동시에 제공한다.
Method for Implementing Deterministic 2D Grid + Affine Matrix Multi-Path Routing and Directional Gossip for Distributed Networks
Author: bokkamsun@gmail.com
Abstract: All peers are placed on the same grid using the same seed. On that grid, one shortest path + two left/right detour paths are deterministically generated. Messages carry embedded routes and advance only one hop to the next node. When failure or disruption is detected, directional gossip selecting only forward neighbors is briefly activated to reinforce coverage. This simultaneously achieves reproducibility, reachability, and bandwidth efficiency.
- Complete determinism: Given the same seed and peer set, all nodes reproduce identical grid/routes.
- Constructive multi-path: Affine bias $T(\theta,k)$ synthesizes left/right routes on top of the shortest BFS path.
- Route-embedded forwarding: Messages carry
path[] and advance only one IP hop at a time.
- Lightweight, highly portable: Runs on 8-neighbor BFS, grid snapping, and simple matrix operations alone.
- Differentiation from prior art: Instead of random/spider-web graph traversal, routes are reproducibly synthesized via deterministic 2D embedding + linear algebra-based bias.
- Field-validated: Three concurrent paths applied to mining/voting/verification flows ensure reachability at production level even under congestion/blocking/partial failure.
This invention deterministically places all peers on a square grid using a common seed and IP. On that grid, it always produces 3 routes: one shortest path (BFS) plus two left/right detour routes generated via affine bias $T(\theta,k)$. Messages embed these routes in path[], and each hop advances only one IP forward, eliminating intermediate decisions and structurally preventing loops. Additionally, directional gossip replaces traditional gossip. By selecting only forward neighbors and spreading with short TTL, fan-out is maintained at 3 or below while achieving global propagation. In summary, embedded 3-path is for confirmed route delivery, while directional gossip is the base engine for large-scale propagation. When inputs are identical, all nodes reproduce identical routes/propagation patterns, making testing/auditing easy while achieving stable propagation and low cost even under congestion/censorship/partial failure.
1. Overview
This technology uses determinism and route embedding instead of random propagation. The procedure is as follows.
- Deterministic sorting: A common seed and addresses produce the same ordering on all nodes.
- Grid placement: That ordering fills a checkerboard grid.
- Base route generation: The shortest path is computed on the 8-neighbor grid graph.
- Detour route synthesis: Affine bias along the travel axis creates left/right midpoints, then two-segment shortest paths yield 2 detour routes.
- Route-embedded delivery: Messages carry
path[] and send only to the next node one hop away. No intermediate decisions, reducing loops and jitter.
- Directional gossip: Mixed with traditional gossip, or activated when delivery failure/delay is detected, selecting only forward neighbors with short TTL. Activated only when needed to prevent bandwidth spikes.
- Duplicate suppression: Sender removes identical first hops; receiver drops duplicates via recent ID set.
2. Technical Field
Deterministic topology construction and multi-path message routing in distributed network and blockchain environments.
3. Background Technology and Differentiation
- Conventional random propagation has low reproducibility due to fluctuating routes.
- Grid/mesh-based search focuses on single shortest path with weak detour design.
- Without embedding routes in messages, routes depend on intermediate hops' local state.
This invention differentiates in the following ways.
- Deterministic grid mapping enables all nodes to reproduce identical topology.
- Matrix affine bias mathematically designs curved detour routes, discretized via grid snapping and two-segment shortest path combination.
- Route-embedded delivery and dual-end duplicate suppression simultaneously achieve reachability and efficiency.
4. Terminology and Notation
Peer count $N$, sorted array $\mathbf{v}=[v_0,\dots,v_{N-1}]$, grid side length $S$ and coordinates are as follows.
$$S=\left\lceil\sqrt{N}\right\rceil$$
$$r=\left\lfloor\frac{i}{S}\right\rfloor$$
$$c=i\bmod S$$
The grid coordinate vector is $\vec{p}=\begin{bmatrix} c \\ r \end{bmatrix}$.
The eight neighbors are $\mathcal{N}_8=\{(-1,-1),(-1,0),(-1,1),(0,-1),(0,1),(1,-1),(1,0),(1,1)\}$.
Definition: Deterministic threshold function (general form) — the threshold is $h_p=\mathrm{computeThreshold}\big(\mathrm{ip}(p),\mathrm{seed}\big)\in[0,2^w)$.
The sort key is $(h_p,\;\mathrm{ip}(p))$, sorted in ascending lexicographic order.
Implementation example (hash XOR-based):
$$h_p=\text{LOW}_{w}\big(F(\text{seed})\;\oplus\;F(\text{ip}(p))\big)$$
Where $F$ is a fixed hash function, $\oplus$ is bitwise XOR, and $\text{LOW}_{w}(\cdot)$ takes the lower $w$ bits.
5. Gist of the Invention
5.1 Deterministic Sorting
All nodes compute the following threshold for the same seed and peer address set.
$$h_p=\text{LOW}_{w}\big(F(\text{seed})\;\oplus\;F(\text{ip}(p))\big)$$
Sorting is performed in ascending order by $(h_p,\;\text{ip}(p))$. Since identical inputs always produce identical results, all nodes obtain the same sorted array and sequentially place it on an $S\times S$ grid, making the topology identical across all nodes.
Cartesian Coordinates
Deterministic grid placement of topology enables matrix operations.
5.2 Grid Mapping
The $i$-th peer in sorted order is placed at $(r,c)$ sequentially. Empty cells are treated as non-existent nodes and automatically avoided.
5.3 Shortest Path
The shortest hop-count path $\mathcal{P}_0$ between start $\vec{p}_s$ and goal $\vec{p}_g$ is computed on the unweighted 8-neighbor graph.
5.4 Local-Normal Translation Based Bias
A biased midpoint is created by translating $\alpha$ in the normal direction ($y$-axis) in local coordinates relative to the travel axis, then connecting two-segment shortest paths to obtain left/right alternative routes.
6. Mathematical Construction
6.1 Travel Angle and Displacement
Start and goal points are $\vec{p}_s=\begin{bmatrix} c_s \\ r_s \end{bmatrix}$, $\vec{p}_g=\begin{bmatrix} c_g \\ r_g \end{bmatrix}$ respectively.
Displacement is $\vec{d}=\vec{p}_g-\vec{p}_s$, and travel angle is $\theta=\mathrm{atan2}(r_g-r_s,\;c_g-c_s)$.
6.2 Travel Axis Alignment and Local-Normal Translation
Rotation matrix R
$$R(\theta)=\begin{pmatrix}\cos\theta & -\sin\theta\\\sin\theta & \cos\theta\end{pmatrix}$$
1. Align to travel angle.
$$\begin{bmatrix} x_L\\ y_L \end{bmatrix}=R(-\theta)\big(\vec{p}_s + t\,\vec{d} - \vec{p}_s\big),\qquad y_L \leftarrow y_L \pm \alpha,\qquad \tilde{\mathbf{p}}_m^{(\pm)}=\vec{p}_s+R(\theta)\begin{bmatrix} x_L\\ y_L \end{bmatrix}.$$
2. Translate by $\pm\alpha$ along the local normal ($y_L$).
3. Reverse-align to return to world coordinates.
Where $\vec{d}=\vec{p}_g-\vec{p}_s$, $t\in(0,1)$, and the code default is $t=0.5$.
6.2a Homogeneous Coordinate Version
The current document implements "local-normal translation" without homogeneous coordinates for code consistency. The equivalent operation expressed as 3x3 homogeneous matrices is also provided for reference.
$$T(a,b)=\begin{bmatrix}1&0&a\\0&1&b\\0&0&1\end{bmatrix},\quad R(\theta)=\begin{bmatrix}\cos\theta&-\sin\theta&0\\\sin\theta&\cos\theta&0\\0&0&1\end{bmatrix}$$
- Bias midpoint generation matrix
$$M_{\pm}=T(c_s,r_s)\;R(\theta)\;T\!\big(t\,\lVert\vec{d}\rVert,\;\pm\alpha\big)\;R(-\theta)\;T(-c_s,-r_s)$$
$$\tilde{\mathbf{p}}^{(\pm)}_m=\big(M_{\pm}\,[c_s,\;r_s,\;1]^T\big)_{xy},\qquad\hat{\mathbf{p}}^{(\pm)}_m=\mathrm{clipRound}\!\left(\tilde{\mathbf{p}}^{(\pm)}_m\right)$$
- Equivalence: expanding the above yields
$$\tilde{\mathbf{p}}^{(\pm)}_m=\vec{p}_s+t\,\vec{d}\;\pm\;\alpha\,\hat{n}$$
which is completely identical to the main text equation (6.3). Here $\vec{d}=\vec{p}_g-\vec{p}_s,\;\hat{n}=[-\sin\theta,\;\cos\theta]^T$.
6.3 Bias Midpoint and Grid Snapping
The normal unit vector is $\hat{n}=[-\sin\theta\;\cos\theta]$.
Bias strength is $\alpha = 0.6,k,\lVert \vec{d}\rVert$ with default $t=0.5$.
$$\tilde{\mathbf{p}}_m^{(\pm)}=\vec{p}_s + t\,\vec{d}\;\pm\;\alpha\,\hat{n},\qquad\hat{\mathbf{p}}_m^{(\pm)}=\mathrm{clipRound}\!\left(\tilde{\mathbf{p}}_m^{(\pm)}\right).$$
- If $\hat{\mathbf{p}}_m^{(\pm)}$ coincides with the start or goal cell, an additional translation of $\mathrm{bump}=\mathrm{sign}(\alpha)\cdot\max\!\big(1,\;0.1\lVert\vec{d}\rVert\big)$ is applied in the normal $\hat{n}$ direction, followed by clipRound again.
- If the cell is empty, the nearest valid cell within radius $\le 3$ is selected as a substitute.
6.4 Two-Segment Shortest Path Combination
The biased route is
$$\mathcal{P}_{\pm}=\mathrm{ShortestPath}(\vec{p}_s,\hat{\mathbf{p}}_m^{(\pm)})\;\oplus\;\mathrm{ShortestPath}(\hat{\mathbf{p}}_m^{(\pm)},\vec{p}_g)$$
UBMS 3 path [ t = 0.9 ]
Where $\oplus$ denotes concatenation including the midpoint only once (in code, the second segment starts from index 1).
7. Directional Gossip Propagation — Grid-Based Fan-Shaped Propagation
7.1 Definition
With grid coordinates $\vec{p}=[c\;r]^T$, the eight-neighbor set is
$$\mathcal{N}_8=\{(-1,-1),(-1,0),(-1,1),(0,-1),(0,1),(1,-1),(1,0),(1,1)\}.$$
8-Neighbors ($\mathcal{N}_8$)
Direction sign vector $\vec{u}=[s_x\;s_y]^T\in\{-1,0,1\}^2\setminus\{(0,0)\}$ is embedded in the message field op3="sx,sy". This is the sign normalization of the relative position between origin and sender:
$$s_x=\operatorname{sign}(c_{\text{nbr}}-c_{\text{src}}),\qquad s_y=\operatorname{sign}(r_{\text{nbr}}-r_{\text{src}})$$
$$\operatorname{sign}(z)=\begin{cases}1,& z>0\\0,& z=0\\-1,& z<0\end{cases}$$
7.2 Propagation Rule (Fan-Shaped Forward Neighbors)
When the current hop is $\vec{p}$, the forward neighbor set is defined as
$$\mathcal{F}_{\vec{u}}(\vec{p})=\{\;\vec{p}+\vec{\delta}\;\mid\;\vec{\delta}\in\mathcal{N}_8,\;\vec{\delta}\cdot\vec{u}>0\;\}$$
Only neighbors with positive dot product with $\vec{u}$ are selected.
- Axis direction $(1,0)$: $(1,-1),(1,0),(1,1)$ — 3 branches.
- Axis direction $(0,1)$: $(-1,1),(0,1),(1,1)$ — 3 branches.
- Diagonal $(1,1)$: $(1,1),(1,0),(0,1)$ — 3 branches.
u=(1,0)
u=(1,1)
The receiving node decrements $\mathrm{TTL}\leftarrow\mathrm{TTL}-1$, selects only valid peers, and transmits via $\mathcal{F}_{\vec{u}}(\vec{p})$, excluding the input FD.
7.3 TTL Setting (Grid Diagonal Based)
Grid side $S=\lceil\sqrt{N}\rceil$, total diagonal length
$$D=\sqrt{(S-1)^2+(S-1)^2}$$
Directional gossip TTL is
$$\mathrm{TTL}=\max\!\big(3,\;\lfloor \rho\cdot D+0.5\rfloor\big),\qquad \rho\in(0,1],\;\;\text{default }\rho=0.8.$$
7.4 Message Format
op3="sx,sy": direction vector $\vec{u}$.
ttl: TTL from the formula above.
messageId: unique identifier.
payload: sender state.
7.5 Deterministic Initial Direction Selection
For the starting neighbor $(c_{\text{nbr}},r_{\text{nbr}})$ selected from the sender's 8 neighbors:
$$\vec{u}=\begin{bmatrix}\operatorname{sign}(c_{\text{nbr}}-c_{\text{self}})\\\operatorname{sign}(r_{\text{nbr}}-r_{\text{self}})\end{bmatrix}.$$
With a fixed selection policy (round-robin, hash minimum, etc.), the deterministic initial direction is reproduced for the same input.
7.6 Duplicate Suppression
Each node maintains a recent receive set via messageId or (header, op3, payload) hash, and drops duplicate packets. Branches sharing the same first hop are pruned to one at the sender side.
7.7 Boundary/Missing Node Handling
$$\mathcal{F}^\ast_{\vec{u}}(\vec{p})=\big(\mathcal{F}_{\vec{u}}(\vec{p})\cap \mathcal{V}\big)\;\cup\;\big\{\,\vec{p}+\vec{\delta}\;\mid\;\vec{\delta}\in\mathcal{N}_8,\;\vec{\delta}\cdot\vec{u}=0,\;\vec{p}+\vec{\delta}\in\mathcal{V}\,\big\}$$
Where $\mathcal{V}$ is the valid node set. Forward ($\vec{\delta}\cdot\vec{u}>0$) is used first; lateral ($=0$) serves as fallback only when forward is unavailable.
7.8 Termination Conditions and Loop Prevention
$$\mathrm{TTL}\leftarrow \mathrm{TTL}-1,\qquad\text{if }\mathrm{TTL}\le 0\text{ then drop}.$$
$$\text{if }\texttt{messageId}\in \mathcal{R}\text{ then drop},\quad\text{else }\mathcal{R}\leftarrow \mathcal{R}\cup\{\texttt{messageId}\}.$$
Forward selection allows only $\vec{\delta}\cdot\vec{u}\ge 0$, structurally excluding reverse propagation.
7.9 Reachability Lower Bound (Coverage) and TTL Lower Bound
$$\mathrm{TTL}_{\min}=\max\big(3,\;\lfloor \rho\,D + 0.5\rfloor\big)$$
With fault ratio $\le (1-\rho)$ in a homogeneous environment, the fan-shaped wavefront's reachability lower bound is maintained. Increasing $\rho$ raises coverage but also bandwidth cost.
7.10 Parameter Tuning Guidelines
- Fan-out cap: per-hop sends $\le 3$. Sampling probability $p\in(0,1]$ may be introduced if needed.
$$\mathbb{E}[M_{\text{dir}}]\approx 3p\,\mathrm{TTL}.$$
TTL = 3 Neighbor Coverage
- $\rho$: 0.6 ~ 0.8 normally; temporarily 0.9+ when fault zones are detected.
- Recent set size: window length $W\ge \mathrm{TTL}$.
7.11 Security/Censorship Evasion Considerations
- Direction-fixing attack mitigation: periodically update initial direction $\vec{u}$ via deterministic round seed.
$$\vec{u}_t=\mathrm{choose}\big(\mathcal{N}_8\setminus\{(0,0)\};\;\mathrm{seed}_t,\;\mathcal{N}_8\big)$$
All nodes reproduce the same $\vec{u}_t$ for the same round input.
- Header tampering detection: lightweight MAC attached to (op3, ttl, payload).
7.12 Performance Upper Bound and Expected Values
$$M_{\text{dir}}\le 3\,\mathrm{TTL},\qquad\mathrm{TTL}\le \rho\,\sqrt{2}\,(S-1)=\Theta(\sqrt{N})$$
$$M_{\text{dir}}^{\text{dup}}\le 3N$$
However, with recent sets and lateral substitution rules, measured values approach $\Theta(\sqrt{N})$.
7.13 Compatibility: Parallel Operation with Route Propagation
$$\text{if not delivered by }T_{\text{fallback}}\;\Rightarrow\;\text{start directional gossip with }\mathrm{TTL}=\mathrm{TTL}_{\min}.$$
To prevent amplification, the sender removes duplicate first-hop entries.
8. Effects of Directional Gossip
- Route diversity: Fan-shaped forward 3-branching based on selected $\vec{u}$ increases censorship/congestion evasion probability.
- Determinism: Reproducible via fixed grid mapping and initial direction policy.
- Simplicity: Forward selection by the single condition $\vec{\delta}\cdot\vec{u}>0$.
8.1. Standard Gossip Propagation
Standard gossip TTL = 1
Standard gossip TTL = 2
Standard gossip TTL = 3
Standard gossip TTL = 4
Standard gossip TTL = 5
Standard gossip TTL = end
Shadow zones occur: Standard gossip, which approaches random propagation, inevitably produces shadow zones.
8.2. Directional Gossip Propagation
Directional gossip TTL = 1
Directional gossip TTL = 3
Directional gossip TTL = 5
Directional gossip TTL = 7
Directional gossip TTL = 11
Directional gossip TTL = end
Dense and systematic propagation: Each node sets propagation direction based on the direction vector, minimizing reverse and duplicate propagation.
9. Route-Embedded Delivery and Duplicate Suppression
Messages include the full route and length; each hop advances only to its next node. The sender prunes routes with identical first next-hops to one. The receiver suppresses duplicates via recently-seen identifiers or route/content hashes. This dual suppression prevents amplification while preserving the reachability advantage of 3 routes.
10. Why It Works Under Failure and Congestion
Left/right biased routes provide geometrically separated corridors. Biased routes are compositions of two-segment shortest paths on the grid, keeping unnecessary detours small. As $|k|$ increases, route correlation decreases, favoring censorship/congestion evasion but increasing latency. The default $t=\tfrac{1}{2}$ provides balanced dispersion.
11. Embodiment
Given identical seed/address sets, all nodes reproduce the same grid placement and same 3 routes. Adjusting bias strength $|k|$ changes the dispersion width of left/right routes. Empty cells at grid edges are automatically avoided; if a biased midpoint falls on an empty cell, nearby valid cell substitution continues route generation. Defaults are $t=0.5$, $\alpha=0.6,k,\lVert\vec{d}\rVert$.
12. Industrial Applicability
- Distributed AI nodes: Communication between AI nodes in distributed network environments.
- Blockchain consensus: Simultaneously propagates voting/verification signals via 3 paths to improve quorum stability.
- Public peer propagation: Reduces tail latency and failure rates.
- IoT/field/ad-hoc networks: Immediate rerouting despite interference/disconnection.
- Overlay/service mesh: Fixes and embeds routes at the application layer independent of the underlying network.
Operations guide: Seed is fixed per round/time unit to reproduce the same grid. Bias strength $k$ is set small for latency focus, large for fault tolerance focus. Dual-end suppression minimizes duplicates. Message length equals route length to block loops.
13. Performance and Complexity
Grid area is $S^2$; shortest-path search time complexity is approximately $O(S^2)$. The three-route computation adds only constant-factor cost via one shortest path plus two two-segment combinations.
13.1 Model
- Directional gossip length scale: $D=\sqrt{2}\,(S-1)=\Theta(\sqrt{N})$.
- TTL upper bound: $\mathrm{TTL}\le \rho\,D$.
13.2 Route-Embedded 3-Path Propagation
- Route count: 3.
- Route length: each $\Theta(\sqrt{N})$.
- Total sends: $M_{\text{path}} \approx 3D=\Theta(\sqrt{N}).$
- No duplicates. Latency: $\Theta(\sqrt{N})$ hops.
13.3 Directional Gossip
- Per-hop forward neighbors $\le 3$, sent once each.
- Total send upper bound: $M_{\text{dir}}\le 3N=\Theta(N).$
- Duplicates suppressed via recent IDs. Latency: $\Theta(\sqrt{N})$ hops.
13.4 Traditional Gossip (Baseline)
- Fan-out $g\ge 2$, rounds $\Theta(\log N)$.
- Total sends (including duplicates): $M_{\text{epi}}=\Theta\!\big(g\,N\log N\big).$
13.5 Quantitative Example
Assuming $N=10^4,\;\rho=0.8,\;g=3$.
- $D\approx 0.8\cdot\sqrt{2}\cdot(100-1)\approx 112$.
- Route propagation: $M_{\text{path}}\approx 3D\approx 336$.
- Directional gossip: $M_{\text{dir}}\le 3N=30{,}000$.
- Traditional gossip: $M_{\text{epi}}\approx g\,N\log_2 N\approx 3\cdot10^4\cdot13.3\approx 399{,}000$.
13.6 Cost/Latency Trade-off
- Bandwidth efficiency: $M_{\text{path}}\ll M_{\text{dir}}< M_{\text{epi}}$.
- Reachability/fault tolerance: traditional $\ge$ directional $>$ route.
- Latency: traditional $O(\log N)$, route/directional $O(\sqrt{N})$.
- Reproducibility/controllability: route/directional are deterministic; traditional is non-deterministic.
13.7 Operational Recommendations
- Normal operation: 3 routes for global signal delivery (minimum bandwidth).
- Upon fault/censorship zone detection: activate directional gossip as backup for coverage.
- Traditional gossip not recommended for continuous use due to peak/duplicate costs.
14. Claims
Claim 1
A multi-path routing method that performs deterministic sorting/square grid mapping, computes shortest path $\mathcal{P}_0$ on an 8-neighbor grid graph, generates biased midpoint $\hat{\mathbf{p}}_m$ through travel-axis alignment-local normal translation-reverse alignment transformation, connects two-segment shortest paths from start-to-midpoint and midpoint-to-goal to generate left/right biased routes $\mathcal{P}_{\pm}$, and provides these together with $\mathcal{P}_0$.
Claim 2
A method that maintains biased route generation by selecting the nearest valid cell via radius expansion when the biased midpoint is empty or invalid.
Claim 3
A method that includes the full route and length in messages so each hop advances only to the next node, suppressing loops and ensuring route reproducibility.
Claim 4
A method that prevents network amplification by removing routes with identical first next-hops at the sender and suppressing duplicates via recently-seen identifiers or route/content hashes at the receiver.
Claim 5
A method that discretizes continuous-space local-normal translation bias via grid rounding and two-segment shortest path combination, achieving route diversification while satisfying real-network constraints.
Claim 6
A storage medium or apparatus for performing the above methods.
Claim 7
A method that computes $h_p=\mathrm{computeThreshold}\big(\mathrm{ip}(p),\mathrm{seed}\big)$ for each peer address using a common seed, sorts by key $(h_p,\;\mathrm{ip}(p))$ in ascending lexicographic order, and places results on a grid, ensuring all nodes reproduce identical topology.
Claim 8
A directional gossip propagation method that embeds direction sign vector $\vec{u}\in\{-1,0,1\}^2\setminus\{(0,0)\}$ in messages at grid coordinates, and at each hop forwards only to forward neighbors among the eight neighbors $\mathcal{N}_8$ with positive dot product:
$$\mathcal{F}_{\vec{u}}(\vec{p})=\{\vec{p}+\vec{\delta}\mid \vec{\delta}\in\mathcal{N}_8,\;\vec{\delta}\cdot\vec{u}>0\}$$
Claim 9
A method that sets TTL for grid side $S$ as
$$\mathrm{TTL}=\max\big(3,\;\lfloor \rho\sqrt{2}\,(S-1)+0.5\rfloor\big)$$
to suppress over-propagation while ensuring global reachability.
Claim 10
A method where the sending node deterministically applies neighbor selection policy to compute initial direction $\vec{u}$, reproducing identical propagation fan across the entire network for the same input.
Claim 11
A method that prevents amplification through recent-receive-set-based duplicate suppression at the receiver and single-transmission among branches sharing the same first hop at the sender.
15. Industry Limitations and Value of This Technology
15.1 Problems with Existing Technology
- Routes differ every time, making reproduction impossible. Testing and auditing are difficult.
- Dependence on intermediate node decisions. Route jitter and loops occur under congestion.
- Excessive gossip propagation. Bandwidth/CPU waste and tail latency expansion.
- Insufficient detour design. Frequent delivery failures under censorship/partial failure.
15.2 Challenges Solved by This Technology
- Deterministic topology: Everyone gets the same checkerboard, same order. Results are always identical.
- 3 embedded routes: 1 shortest + 2 detours. Delivery succeeds even if one side is blocked.
- One-hop-forward rule: Eliminates intermediate decisions. Blocks loops. Simple implementation.
- Directional gossip: Rapid forward-only spreading when needed. Bandwidth controllable.
15.3 Key Advantages
- Bandwidth savings: Normal propagation volume is an order of magnitude below traditional gossip.
- Latency stability: Fixed routes reduce jitter. Tail latency reduced.
- Operational simplicity: Match seeds and all nodes behave identically.
- Easy auditing: Reproducible routes make root cause tracing straightforward.
- Fault tolerance: Success rate maintained under censorship/partial disconnection/congestion.
15.4 Simple Explanation
- Generate the same ordered list from the same seed.
- Fill checkerboard cells in that order.
- Pre-generate one direct path and two left/right detour paths.
- Embed those paths in messages and send only to the next cell.
- Excessive traffic from traditional gossip is resolved via directional propagation.
15.5 Where the Effects Are Felt
- AI nodes: Communication between AI nodes, distributed networking.
- Blockchain consensus: Stable quorum achievement for voting/verification signals.
- Public peer networks: Reduced tail latency for new block/header propagation.
- Edge/IoT networks: Immediate rerouting despite intermittent disconnection.
- Service mesh: Routes fixed at upper layer. Decoupled from underlying network changes.
15.6 Field Application
- Seed fixed per round.
- Detour strength adjusted to objectives.
- Normal operation uses 3 routes only. Directional gossip activated briefly upon failure detection.
- First-hop deduplication and recent receive set maintained at all times.
16. Conclusion
This invention combines a deterministic grid, local-normal translation-based affine bias, and route-embedded delivery to reproduce identical 3 routes regardless of where computation occurs. Messages advance only to the next node, structurally blocking loops, and securing reachability and stability even under congestion/censorship/partial failure.
Furthermore, directional gossip solves the excessive traffic and tail latency problems of traditional gossip. By selecting only forward neighbors for spreading, per-hop fan-out is capped at 3, and brief activation only when needed suppresses network spikes. During normal operation, embedded 3 routes conserve bandwidth, and directional gossip is activated as backup only when failure is detected, boosting coverage and reachability. As a result, this technology simultaneously provides predictability (reproducibility), cost efficiency (bandwidth/CPU savings), latency stability (jitter/tail reduction), and fault tolerance.