From 8f27419b09f40636f77ad37b54e480bdb4a561a1 Mon Sep 17 00:00:00 2001 From: thatben Date: Fri, 19 Sep 2025 15:02:42 +0200 Subject: [PATCH] working example of two versions without localization --- .vitepress/config.mts | 325 +-- .vitepress/data/versions.ts | 171 ++ .vitepress/theme/index.ts | 6 +- es/codex/about.md | 3 - es/codex/disclaimer.md | 5 - es/codex/privacy-policy.md | 72 - es/codex/security.md | 7 - es/developers/api.md | 5 - es/index.md | 33 - es/learn/architecture.md | 89 - es/learn/local-marketplace.md | 669 ------ es/learn/using.md | 275 --- es/learn/what-is-codex.md | 37 - es/networks/networks.md | 19 - es/networks/testnet.md | 203 -- index.md | 11 +- ko/codex/about.md | 3 - ko/codex/disclaimer.md | 3 - ko/codex/security.md | 7 - ko/codex/terms-of-use.md | 94 - ko/developers/api.md | 5 - ko/index.md | 33 - ko/learn/architecture.md | 95 - ko/learn/build.md | 241 --- ko/learn/download-flow.md | 67 - ko/learn/local-marketplace.md | 669 ------ ko/learn/local-two-client-test.md | 235 -- ko/learn/quick-start.md | 159 -- ko/learn/run.md | 563 ----- ko/learn/tokenomics-litepaper.md | 276 --- ko/learn/troubleshoot.md | 30 - ko/learn/using.md | 275 --- ko/learn/what-is-codex.md | 39 - ko/learn/whitepaper.md | 28 - ko/networks/networks.md | 20 - ko/networks/testnet.md | 225 -- learn/local-marketplace.md | 670 ------ package-lock.json | 1912 ++++++++--------- ru/codex/about.md | 3 - ru/codex/disclaimer.md | 5 - ru/codex/privacy-policy.md | 72 - ru/codex/security.md | 7 - ru/codex/terms-of-use.md | 96 - ru/developers/api.md | 5 - ru/index.md | 33 - ru/learn/architecture.md | 86 - ru/learn/build.md | 238 -- ru/learn/download-flow.md | 67 - ru/learn/installer/install-and-run.md | 48 - ru/learn/installer/requirements.md | 23 - ru/learn/installer/upload-and-download.md | 27 - ru/learn/local-marketplace.md | 662 ------ ru/learn/local-two-client-test.md | 227 -- ru/learn/quick-start.md | 147 -- ru/learn/run.md | 534 ----- ru/learn/tokenomics-litepaper.md | 276 --- ru/learn/troubleshoot.md | 30 - ru/learn/using.md | 275 --- ru/learn/what-is-codex.md | 39 - ru/learn/whitepaper.md | 236 -- ru/networks/networks.md | 19 - ru/networks/testnet.md | 203 -- {codex => versions/0.0.1/codex}/about.md | 2 +- {codex => versions/0.0.1/codex}/disclaimer.md | 2 +- .../0.0.1}/codex/installer-disclaimer.md | 24 +- .../0.0.1/codex}/privacy-policy.md | 20 +- {codex => versions/0.0.1/codex}/security.md | 2 +- .../0.0.1/codex}/terms-of-use.md | 24 +- .../0.0.1/developers}/api.md | 2 +- versions/0.0.1/index.md | 6 + .../0.0.1/learn}/architecture.md | 20 +- {es => versions/0.0.1}/learn/build.md | 56 +- {es => versions/0.0.1}/learn/download-flow.md | 6 +- .../0.0.1/learn}/installer/install-and-run.md | 24 +- .../0.0.1/learn}/installer/requirements.md | 8 +- .../learn}/installer/upload-and-download.md | 15 +- .../0.0.1/learn}/local-two-client-test.md | 24 +- .../0.0.1/learn}/quick-start.md | 28 +- {learn => versions/0.0.1/learn}/run.md | 74 +- .../0.0.1/learn}/tokenomics-litepaper.md | 80 +- .../0.0.1/learn}/troubleshoot.md | 8 +- {learn => versions/0.0.1/learn}/using.md | 36 +- .../0.0.1/learn}/what-is-codex.md | 8 +- {learn => versions/0.0.1/learn}/whitepaper.md | 38 +- .../0.0.1/networks}/devnet.md | 2 +- .../0.0.1/networks}/networks.md | 6 +- .../0.0.1/networks}/testnet.md | 2 +- versions/0.0.1/sidebar.json | 122 ++ versions/0.1.0/codex/about.md | 3 + versions/0.1.0/codex/disclaimer.md | 5 + .../0.1.0/codex}/installer-disclaimer.md | 24 +- .../0.1.0}/codex/privacy-policy.md | 30 +- versions/0.1.0/codex/security.md | 7 + {es => versions/0.1.0}/codex/terms-of-use.md | 24 +- versions/0.1.0/developers/api.md | 5 + versions/0.1.0/index.md | 6 + versions/0.1.0/learn/architecture.md | 123 ++ {learn => versions/0.1.0/learn}/build.md | 56 +- .../0.1.0/learn}/download-flow.md | 6 +- .../0.1.0/learn/installer/install-and-run.md | 48 + .../0.1.0/learn/installer/requirements.md | 23 + .../learn/installer/upload-and-download.md | 26 + .../0.1.0}/learn/local-two-client-test.md | 47 +- {es => versions/0.1.0}/learn/quick-start.md | 45 +- {es => versions/0.1.0}/learn/run.md | 74 +- .../0.1.0}/learn/tokenomics-litepaper.md | 80 +- {es => versions/0.1.0}/learn/troubleshoot.md | 10 +- versions/0.1.0/learn/using.md | 126 ++ versions/0.1.0/learn/what-is-codex.md | 39 + {es => versions/0.1.0}/learn/whitepaper.md | 40 +- versions/0.1.0/networks/devnet.md | 8 + versions/0.1.0/networks/networks.md | 7 + versions/0.1.0/networks/testnet.md | 9 + versions/0.1.0/sidebar.json | 122 ++ 114 files changed, 2284 insertions(+), 10285 deletions(-) create mode 100644 .vitepress/data/versions.ts delete mode 100644 es/codex/about.md delete mode 100644 es/codex/disclaimer.md delete mode 100644 es/codex/privacy-policy.md delete mode 100644 es/codex/security.md delete mode 100644 es/developers/api.md delete mode 100644 es/index.md delete mode 100644 es/learn/architecture.md delete mode 100644 es/learn/local-marketplace.md delete mode 100644 es/learn/using.md delete mode 100644 es/learn/what-is-codex.md delete mode 100644 es/networks/networks.md delete mode 100644 es/networks/testnet.md delete mode 100644 ko/codex/about.md delete mode 100644 ko/codex/disclaimer.md delete mode 100644 ko/codex/security.md delete mode 100644 ko/codex/terms-of-use.md delete mode 100644 ko/developers/api.md delete mode 100644 ko/index.md delete mode 100644 ko/learn/architecture.md delete mode 100644 ko/learn/build.md delete mode 100644 ko/learn/download-flow.md delete mode 100644 ko/learn/local-marketplace.md delete mode 100644 ko/learn/local-two-client-test.md delete mode 100644 ko/learn/quick-start.md delete mode 100644 ko/learn/run.md delete mode 100644 ko/learn/tokenomics-litepaper.md delete mode 100644 ko/learn/troubleshoot.md delete mode 100644 ko/learn/using.md delete mode 100644 ko/learn/what-is-codex.md delete mode 100644 ko/learn/whitepaper.md delete mode 100644 ko/networks/networks.md delete mode 100644 ko/networks/testnet.md delete mode 100644 learn/local-marketplace.md delete mode 100644 ru/codex/about.md delete mode 100644 ru/codex/disclaimer.md delete mode 100644 ru/codex/privacy-policy.md delete mode 100644 ru/codex/security.md delete mode 100644 ru/codex/terms-of-use.md delete mode 100644 ru/developers/api.md delete mode 100644 ru/index.md delete mode 100644 ru/learn/architecture.md delete mode 100644 ru/learn/build.md delete mode 100644 ru/learn/download-flow.md delete mode 100644 ru/learn/installer/install-and-run.md delete mode 100644 ru/learn/installer/requirements.md delete mode 100644 ru/learn/installer/upload-and-download.md delete mode 100644 ru/learn/local-marketplace.md delete mode 100644 ru/learn/local-two-client-test.md delete mode 100644 ru/learn/quick-start.md delete mode 100644 ru/learn/run.md delete mode 100644 ru/learn/tokenomics-litepaper.md delete mode 100644 ru/learn/troubleshoot.md delete mode 100644 ru/learn/using.md delete mode 100644 ru/learn/what-is-codex.md delete mode 100644 ru/learn/whitepaper.md delete mode 100644 ru/networks/networks.md delete mode 100644 ru/networks/testnet.md rename {codex => versions/0.0.1/codex}/about.md (61%) rename {codex => versions/0.0.1/codex}/disclaimer.md (97%) rename {ru => versions/0.0.1}/codex/installer-disclaimer.md (93%) rename {codex => versions/0.0.1/codex}/privacy-policy.md (90%) rename {codex => versions/0.0.1/codex}/security.md (96%) rename {codex => versions/0.0.1/codex}/terms-of-use.md (96%) rename {developers => versions/0.0.1/developers}/api.md (95%) create mode 100644 versions/0.0.1/index.md rename {learn => versions/0.0.1/learn}/architecture.md (95%) rename {es => versions/0.0.1}/learn/build.md (90%) rename {es => versions/0.0.1}/learn/download-flow.md (96%) rename {learn => versions/0.0.1/learn}/installer/install-and-run.md (74%) rename {learn => versions/0.0.1/learn}/installer/requirements.md (87%) rename {learn => versions/0.0.1/learn}/installer/upload-and-download.md (78%) rename {learn => versions/0.0.1/learn}/local-two-client-test.md (95%) rename {learn => versions/0.0.1/learn}/quick-start.md (83%) rename {learn => versions/0.0.1/learn}/run.md (93%) rename {learn => versions/0.0.1/learn}/tokenomics-litepaper.md (93%) rename {learn => versions/0.0.1/learn}/troubleshoot.md (92%) rename {learn => versions/0.0.1/learn}/using.md (73%) rename {learn => versions/0.0.1/learn}/what-is-codex.md (96%) rename {learn => versions/0.0.1/learn}/whitepaper.md (98%) rename {networks => versions/0.0.1/networks}/devnet.md (88%) rename {networks => versions/0.0.1/networks}/networks.md (53%) rename {networks => versions/0.0.1/networks}/testnet.md (92%) create mode 100644 versions/0.0.1/sidebar.json create mode 100644 versions/0.1.0/codex/about.md create mode 100644 versions/0.1.0/codex/disclaimer.md rename {codex => versions/0.1.0/codex}/installer-disclaimer.md (93%) rename {ko => versions/0.1.0}/codex/privacy-policy.md (75%) create mode 100644 versions/0.1.0/codex/security.md rename {es => versions/0.1.0}/codex/terms-of-use.md (96%) create mode 100644 versions/0.1.0/developers/api.md create mode 100644 versions/0.1.0/index.md create mode 100644 versions/0.1.0/learn/architecture.md rename {learn => versions/0.1.0/learn}/build.md (90%) rename {learn => versions/0.1.0/learn}/download-flow.md (96%) create mode 100644 versions/0.1.0/learn/installer/install-and-run.md create mode 100644 versions/0.1.0/learn/installer/requirements.md create mode 100644 versions/0.1.0/learn/installer/upload-and-download.md rename {es => versions/0.1.0}/learn/local-two-client-test.md (87%) rename {es => versions/0.1.0}/learn/quick-start.md (65%) rename {es => versions/0.1.0}/learn/run.md (93%) rename {es => versions/0.1.0}/learn/tokenomics-litepaper.md (93%) rename {es => versions/0.1.0}/learn/troubleshoot.md (81%) create mode 100644 versions/0.1.0/learn/using.md create mode 100644 versions/0.1.0/learn/what-is-codex.md rename {es => versions/0.1.0}/learn/whitepaper.md (98%) create mode 100644 versions/0.1.0/networks/devnet.md create mode 100644 versions/0.1.0/networks/networks.md create mode 100644 versions/0.1.0/networks/testnet.md create mode 100644 versions/0.1.0/sidebar.json diff --git a/.vitepress/config.mts b/.vitepress/config.mts index bdd0ab7..76f5f5b 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -1,6 +1,7 @@ // import { defineConfig } from 'vitepress' import mdFootnote from 'markdown-it-footnote' import { withMermaid } from 'vitepress-plugin-mermaid' +import { generateVersionRewrites, generateVersionSidebars, generateVersionSwitcher, LATEST_VERSION } from './data/versions' // const { BASE: base = '/' } = process.env; // https://vitepress.dev/reference/site-config @@ -13,6 +14,10 @@ export default withMermaid({ ignoreDeadLinks: false, appearance: true, + rewrites: { + ...generateVersionRewrites() + }, + markdown: { math: true, config: (md) => { @@ -58,7 +63,8 @@ export default withMermaid({ { text: 'Privacy Policy', link: '/codex/privacy-policy' }, { text: 'Terms of Use', link: '/codex/terms-of-use' } ] - } + }, + generateVersionSwitcher() ], search: { @@ -81,62 +87,11 @@ export default withMermaid({ siteTitle: 'Codex • Docs', - logoLink: '/learn/what-is-codex', + sidebar: { + ...generateVersionSidebars() + }, - sidebar: [ - { - text: 'Introduction', - collapsed: false, - items: [ - { text: 'What is Codex?', link: '/learn/what-is-codex' }, - { text: 'Architecture', link: '/learn/architecture' }, - { text: 'Whitepaper', link: '/learn/whitepaper' }, - { text: 'Tokenomics Litepaper', link: '/learn/tokenomics-litepaper' } - ] - }, - { - text: 'Setup Codex with Installer', - collapsed: false, - items: [ - { text: 'Disclaimer', link: '/codex/installer-disclaimer' }, - { text: 'Requirements', link: '/learn/installer/requirements' }, - { text: 'Install and Run Codex', link: '/learn/installer/install-and-run' }, - { text: 'Upload/Download', link: '/learn/installer/upload-and-download' }, - ] - }, - { - text: 'Setup Codex Manually', - collapsed: false, - items: [ - { text: 'Disclaimer', link: '/codex/disclaimer' }, - { text: 'Quick start', link: '/learn/quick-start' }, - { text: 'Build Codex', link: '/learn/build' }, - { text: 'Run Codex', link: '/learn/run' }, - { text: 'Using Codex', link: '/learn/using' }, - { text: 'Local Two Client Test', link: '/learn/local-two-client-test' }, - { text: 'Local Marketplace', link: '/learn/local-marketplace' }, - { text: 'Download Flow', link: '/learn/download-flow' }, - { text: 'Troubleshoot', link: '/learn/troubleshoot' } - ] - }, - { - text: 'Developers', - collapsed: false, - items: [ - { text: 'API', link: '/developers/api' } - ] - }, - { - text: 'Codex', - collapsed: false, - items: [ - { text: 'About', link: '/codex/about' }, - { text: 'Security', link: '/codex/security' }, - { text: 'Privacy Policy', link: '/codex/privacy-policy' }, - { text: 'Terms of Use', link: '/codex/terms-of-use' } - ] - } - ], + logoLink: `/versions/${LATEST_VERSION}/learn/what-is-codex`, socialLinks: [ { icon: 'github', link: 'https://github.com/codex-storage/codex-docs' }, @@ -144,261 +99,5 @@ export default withMermaid({ { icon: 'youtube', link: 'https://www.youtube.com/@CodexStorage' }, { icon: 'discord', link: 'https://discord.gg/codex-storage' } ] - }, - - // Internationalization - https://vitepress.dev/guide/i18n - locales: { - root: { - label: 'English', - lang: 'en' - }, - // Russian - ru: { - label: 'Русский', - lang: 'ru-RU', - link: '/ru', - themeConfig: { - nav: [ - { text: 'Whitepaper', link: '/ru/learn/whitepaper' }, - { text: 'Tokenomics Litepaper', link: '/ru/learn/tokenomics-litepaper' }, - { - text: 'Codex', - items: [ - { text: 'О проекте', link: '/ru/codex/about' }, - { text: 'Безопасность', link: '/ru/codex/security' }, - { text: 'Политика конфиденциальности', link: '/ru/codex/privacy-policy' }, - { text: 'Условия использования', link: '/ru/codex/terms-of-use' } - ] - } - ], - editLink: { - pattern: 'https://github.com/codex-storage/codex-docs/edit/master/:path', - text: 'Редактировать эту страницу на GitHub', - }, - siteTitle: 'Codex • Документация', - logoLink: '/ru/learn/what-is-codex', - sidebar: [ - { - text: 'Введение', - collapsed: false, - items: [ - { text: 'Что такое Codex?', link: '/ru/learn/what-is-codex' }, - { text: 'Архитектура', link: '/ru/learn/architecture' }, - { text: 'Whitepaper', link: '/ru/learn/whitepaper' }, - { text: 'Tokenomics Litepaper', link: '/ru/learn/tokenomics-litepaper' } - ] - }, - { - text: 'Установка Codex с помощью установщика', - collapsed: false, - items: [ - { text: 'Отказ от ответственности', link: '/ru/codex/installer-disclaimer' }, - { text: 'Требования', link: '/ru/learn/installer/requirements' }, - { text: 'Установка и запуск Codex', link: '/ru/learn/installer/install-and-run' }, - { text: 'Загрузка/Скачивание', link: '/ru/learn/installer/upload-and-download' }, - ] - }, - { - text: 'Установка Codex вручную', - collapsed: false, - items: [ - { text: 'Отказ от ответственности', link: '/ru/codex/disclaimer' }, - { text: 'Быстрый старт', link: '/ru/learn/quick-start' }, - { text: 'Сборка Codex', link: '/ru/learn/build' }, - { text: 'Запуск Codex', link: '/ru/learn/run' }, - { text: 'Использование Codex', link: '/ru/learn/using' }, - { text: 'Локальное тестирование с двумя клиентами', link: '/ru/learn/local-two-client-test' }, - { text: 'Локальный маркетплейс', link: '/ru/learn/local-marketplace' }, - { text: 'Поток загрузки', link: '/ru/learn/download-flow' }, - { text: 'Устранение неполадок', link: '/ru/learn/troubleshoot' } - ] - }, - { - text: 'Сети Codex', - collapsed: false, - items: [ - { text: 'Devnet', link: '/ru/networks/devnet' }, - { text: 'Testnet', link: '/ru/networks/testnet' } - ] - }, - { - text: 'Разработчики', - collapsed: false, - items: [ - { text: 'API', link: '/ru/developers/api' } - ] - }, - { - text: 'Codex', - collapsed: false, - items: [ - { text: 'О проекте', link: '/ru/codex/about' }, - { text: 'Безопасность', link: '/ru/codex/security' }, - { text: 'Политика конфиденциальности', link: '/ru/codex/privacy-policy' }, - { text: 'Условия использования', link: '/ru/codex/terms-of-use' } - ] - } - ], - } - }, - // Korean - ko: { - label: '한국어', - lang: 'ko-KP', - link: '/ko', - themeConfig: { - nav: [ - { text: '백서', link: '/ko/learn/whitepaper' }, - { text: 'Tokenomics Litepaper', link: '/ko/learn/tokenomics-litepaper' }, - { - text: 'Codex', - items: [ - { text: '소개', link: '/ko/codex/about' }, - { text: '보안', link: '/ko/codex/security' }, - { text: '개인정보 처리방침', link: '/ko/codex/privacy-policy' }, - { text: '이용 약관', link: '/ko/codex/terms-of-use' } - ] - } - ], - editLink: { - pattern: 'https://github.com/codex-storage/codex-docs/edit/master/:path', - text: 'Edit this page on GitHub', - }, - siteTitle: 'Codex • 문서', - logoLink: '/ko/learn/what-is-codex', - sidebar: [ - { - text: 'Introduction', - collapsed: false, - items: [ - { text: 'Codex란 무엇인가?', link: '/ko/learn/what-is-codex' }, - { text: '아키텍처', link: '/ko/learn/architecture' }, - { text: '백서', link: '/ko/learn/whitepaper' }, - { text: 'Tokenomics Litepaper', link: '/ko/learn/tokenomics-litepaper' } - ] - }, - { - text: 'Setup Codex with Installer', - collapsed: false, - items: [ - { text: '면책 조항', link: '/ko/codex/installer-disclaimer' }, - { text: 'Requirements', link: '/ko/learn/installer/requirements' }, - { text: 'Install and Run Codex', link: '/ko/learn/installer/install-and-run' }, - { text: 'Upload/Download', link: '/ko/learn/installer/upload-and-download' }, - ] - }, - { - text: 'Setup Codex Manually', - collapsed: false, - items: [ - { text: '면책 조항', link: '/ko/codex/disclaimer' }, - { text: '빠른 시작', link: '/ko/learn/quick-start' }, - { text: 'Build Codex', link: '/ko/learn/build' }, - { text: 'Run Codex', link: '/ko/learn/run' }, - { text: '사용하기', link: '/ko/learn/using' }, - { text: 'Local Two Client Test', link: '/ko/learn/local-two-client-test' }, - { text: 'Local Marketplace', link: '/ko/learn/local-marketplace' }, - { text: 'Download Flow', link: '/ko/learn/download-flow' }, - { text: '문제 해결', link: '/ko/learn/troubleshoot' } - ] - }, - { - text: 'Developers', - collapsed: false, - items: [ - { text: 'API', link: '/developers/api' } - ] - }, - { - text: 'Codex', - collapsed: false, - items: [ - { text: '소개', link: '/ko/codex/about' }, - { text: '보안', link: '/ko/codex/security' }, - { text: '개인정보 처리방침', link: '/ko/codex/privacy-policy' }, - { text: '이용 약관', link: '/ko/codex/terms-of-use' } - ] - } - ], - } - }, - // Spanish - es: { - label: 'Español', - lang: 'es-ES', - link: '/es', - themeConfig: { - nav: [ - { text: 'Whitepaper', link: '/es/learn/whitepaper' }, - { text: 'Tokenomics Litepaper', link: '/es/learn/tokenomics-litepaper' }, - { - text: 'Codex', - items: [ - { text: 'Acerca de Codex', link: '/es/codex/about' }, - { text: 'Seguridad', link: '/es/codex/security' }, - { text: 'Política de privacidad', link: '/es/codex/privacy-policy' }, - { text: 'Términos de uso', link: '/es/codex/terms-of-use' } - ] - } - ], - editLink: { - pattern: 'https://github.com/codex-storage/codex-docs/edit/master/:path', - text: 'Redactar esta página en GitHub', - }, - siteTitle: 'Codex • Documentación', - logoLink: '/es/learn/what-is-codex', - sidebar: [ - { - text: 'Introducción', - collapsed: false, - items: [ - { text: '¿Qué es Codex?', link: '/es/learn/what-is-codex' }, - { text: 'Arquitectura', link: '/es/learn/architecture' }, - { text: 'Whitepaper', link: '/es/learn/whitepaper' }, - { text: 'Tokenomics Litepaper', link: '/es/learn/tokenomics-litepaper' } - ] - }, - { - text: 'Instalar Codex manualmente', - collapsed: false, - items: [ - { text: 'Descargo de responsabilidad', link: '/es/codex/disclaimer' }, - { text: 'Inicio rápido', link: '/es/learn/quick-start' }, - { text: 'Compilar Codex', link: '/es/learn/build' }, - { text: 'Ejecutar Codex', link: '/es/learn/run' }, - { text: 'Usar Codex', link: '/es/learn/using' }, - { text: 'Prueba local de dos clientes', link: '/es/learn/local-two-client-test' }, - { text: 'Mercado local', link: '/es/learn/local-marketplace' }, - { text: 'Flujo de descarga', link: '/es/learn/download-flow' }, - { text: 'Solucionar problemas', link: '/es/learn/troubleshoot' } - ] - }, - { - text: 'Redes Codex', - collapsed: false, - items: [ - { text: 'Devnet', link: '/es/networks/devnet' }, - { text: 'Testnet', link: '/es/networks/testnet' } - ] - }, - { - text: 'Desarrolladores', - collapsed: false, - items: [ - { text: 'API', link: '/developers/api' } - ] - }, - { - text: 'Codex', - collapsed: false, - items: [{ text: 'Acerca de', link: '/es/codex/about' }, - { text: 'Seguridad', link: '/es/codex/security' }, - { text: 'Política de privacidad', link: '/es/codex/privacy-policy' }, - { text: 'Términos de uso', link: '/es/codex/terms-of-use' } - ] - } - ], - } - } } -}) +}); diff --git a/.vitepress/data/versions.ts b/.vitepress/data/versions.ts new file mode 100644 index 0000000..bac5a7a --- /dev/null +++ b/.vitepress/data/versions.ts @@ -0,0 +1,171 @@ +import fs from "node:fs" +import path from "node:path" +import { DefaultTheme } from "vitepress/theme" +import util from "node:util" + +export const LATEST_VERSION = '0.0.1' + +export interface VersionInformation { + name: string, + sidebar: DefaultTheme.SidebarItem, +} + +function getFilesRecursively(dir: string): string[] { + const files: string[] = []; + + function traverseDirectory(currentDir: string) { + const entries = fs.readdirSync(currentDir, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = `${currentDir}/${entry.name}`; + + if (entry.isDirectory()) { + traverseDirectory(fullPath); + } else { + files.push(fullPath); + } + } + } + + traverseDirectory(dir); + + return files; +} + +/** + * Generates vitepress rewrites for all versions in the "versions" folder. + * The rewrites are used to format the URLs in `versions` to be more user-friendly. + * @returns {Record} A map of rewrite sources to their destinations. + */ +export function generateVersionRewrites(): Record { + const versionsDir = path.resolve(__dirname, '../../versions') + const versions = fs.readdirSync(versionsDir) + const rewrites = {}; + + // Generate rewrites for each version's files. + for (const version of versions) { + // Get all files recursively in the version folder + const files = getFilesRecursively(path.resolve(versionsDir, version)); + const rewriteSources = files.map(filePath => filePath.replace(versionsDir, 'versions')); + for (const rewriteSource of rewriteSources) { + rewrites[rewriteSource] = rewriteSource.replace(`versions/`, ''); + } + } + + console.log(rewrites); + return rewrites +} + +/** + * Generates a nav item for the version switcher, which contains all versions in the "versions" folder and the latest version. + * @returns {DefaultTheme.NavItem} A nav item that contains all versions in the "versions" folder. + */ +export function generateVersionSwitcher(): DefaultTheme.NavItem { + const versionsDir = path.resolve(__dirname, '../../versions') + const versions = fs.readdirSync(versionsDir) + + const versionSwitcher: DefaultTheme.NavItem = { + text: 'Switch Version', + items: [ + { + text: `${LATEST_VERSION} (latest)`, + link: `/versions/${LATEST_VERSION}` + } + ] + } + + for (const version of versions) { + versionSwitcher.items.push({ + text: version, + link: `/versions/${version}/` + }) + } + + return versionSwitcher; +} + +/** + * Replaces all links in the sidebar with their versioned equivalents. + * @example `{link: '/test'}` becomes `{link: '/0.1.0/test'}` + * @param sidebar The sidebar to replace links in. + * @param version The version to prepend to all links. + * @returns {DefaultTheme.SidebarItem[]} The sidebar with all links prepended with the version. + */ +function replaceLinksRecursive(sidebar: DefaultTheme.SidebarItem[], version: string): DefaultTheme.SidebarItem[] { + // Prepend the version to all links. `{VERSION}/$link` + const versionedSidebar = sidebar.map(item => { + // @ts-ignore + if (item.process === false) return item; + + if (item.link) { + item.link = `/versions/${version}${item.link}` + } + + if (item.items) { + item.items = replaceLinksRecursive(item.items, version) + } + + return item + }) + + return versionedSidebar +} + +/** + * Gets the sidebar for a specific version. + * This function will look for a sidebar.json5 file in the specified version's folder, or else return an empty sidebar. + * @param version Get the sidebar for a specific version. + * @returns {DefaultTheme.SidebarItem[]} The sidebar for the specified version. + */ +export function getSidebar(version: string): DefaultTheme.SidebarItem[] | DefaultTheme.SidebarMulti { + const versionDir = path.resolve(__dirname, `../../versions/${version}`) + const sidebarPath = path.resolve(versionDir, 'sidebar.json') + + if (fs.existsSync(sidebarPath)) { + const sidebar = JSON.parse(fs.readFileSync(sidebarPath, 'utf-8')) + + if (!Array.isArray(sidebar)) { + // Must be a multisidebar instance. + const multisidebar = sidebar as DefaultTheme.SidebarMulti; + + // Replace all links in the sidebar with their versioned equivalents. + Object.keys(multisidebar).forEach(key => { + multisidebar[key] = replaceLinksRecursive(multisidebar[key] as DefaultTheme.SidebarItem[], version) + }); + + return multisidebar; + } + + // Replace all links in the sidebar with their versioned equivalents. + return replaceLinksRecursive(sidebar, version) + } + + return []; +} + +/** + * Generates a sidebar for each version in the "versions" folder. + * @returns {DefaultTheme.SidebarMulti} A map of versions to their sidebars. + */ +export function generateVersionSidebars(): DefaultTheme.SidebarMulti { + const versionsDir = path.resolve(__dirname, '../../versions') + const versions = fs.readdirSync(versionsDir) + + const versionSidebars: DefaultTheme.SidebarMulti = {} + + for (const version of versions) { + const versionSidebar = getSidebar(version); + + if (Array.isArray(versionSidebar)) { + versionSidebars[`/versions/${version}/`] = versionSidebar as DefaultTheme.SidebarItem[] + } else { + Object.keys(versionSidebar).forEach(key => { + versionSidebars[`/versions/${version}${key}`] = versionSidebar[key] as DefaultTheme.SidebarItem[] + }); + } + } + + console.log(util.inspect(versionSidebars, false, null, true)) + + return versionSidebars +} diff --git a/.vitepress/theme/index.ts b/.vitepress/theme/index.ts index 9351867..df25d99 100644 --- a/.vitepress/theme/index.ts +++ b/.vitepress/theme/index.ts @@ -2,8 +2,12 @@ import DefaultTheme from 'vitepress/theme' import Layout from './Layout.vue' import './custom.css' +import { Theme } from 'vitepress' export default { extends: DefaultTheme, Layout: Layout, -} + enhanceApp({ app }) { + // ... + } +} satisfies Theme; diff --git a/es/codex/about.md b/es/codex/about.md deleted file mode 100644 index 6eb86cd..0000000 --- a/es/codex/about.md +++ /dev/null @@ -1,3 +0,0 @@ -# Acerca de Codex - -Trabajo en progreso :construction: diff --git a/es/codex/disclaimer.md b/es/codex/disclaimer.md deleted file mode 100644 index 0b7d33d..0000000 --- a/es/codex/disclaimer.md +++ /dev/null @@ -1,5 +0,0 @@ -# Descargo de Responsabilidad - -El código e instrucciones proporcionados en este repositorio y repositorios relacionados se proporcionan "tal cual", sin garantía de ningún tipo, expresa o implícita, incluyendo pero no limitado a la seguridad o corrección, o rendimiento del código o instrucciones proporcionadas. No aseguramos que el código funcionará según lo previsto, y los usuarios pueden experimentar retrasos, fallos, errores, omisiones o pérdida de información transmitida mientras usan o ejecutan Codex. - -La ejecución de Codex se realiza bajo su propio riesgo. Como tal, no somos responsables ni tenemos obligación por ningún daño que pueda ocurrir a su hardware, software, datos o red, ni por ninguna pérdida, reclamo, daño de cualquier naturaleza, u otra responsabilidad que surja de o en conexión con el uso del código e instrucciones proporcionadas. diff --git a/es/codex/privacy-policy.md b/es/codex/privacy-policy.md deleted file mode 100644 index 2ed2a13..0000000 --- a/es/codex/privacy-policy.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -lastUpdated: false ---- -# Política de Privacidad - -Última actualización: 9 de febrero de 2024 - -Esta Política de Privacidad tiene como objetivo informar a los usuarios sobre nuestro enfoque de privacidad con respecto a este sitio web ("**Sitio Web**"). En este sentido, si está visitando nuestro Sitio Web, esta Política de Privacidad se aplica a usted. - -### 1) Quiénes somos - -Para los propósitos de esta Política de Privacidad y la recopilación y procesamiento de datos personales como controlador, la entidad relevante es la Asociación Logos Collective, que tiene su oficina registrada en Zug y su domicilio legal en: - -``` -Logos Collective Association -c/o PST Consulting GmbH -Baarerstrasse 10 -6300 Zug -Suiza -``` - -Cuando nos referimos a "Logos", "nosotros" u otras referencias similares, nos referimos a la Asociación Logos Collective. - -### 2) Limitamos la recopilación y procesamiento de datos personales de su uso del Sitio Web - -Nos propósitos es limitar la recopilación y procesamiento de datos personales de los usuarios del Sitio Web. Solo recopilamos y procesamos ciertos datos personales para propósitos específicos y donde tenemos la base legal para hacerlo bajo la legislación de privacidad aplicable. No recopilamos ni procesamos ningún dato personal que no necesitemos y donde almacenemos cualquier dato personal, solo lo almacenaremos durante la cantidad de tiempo mínima necesaria para el propósito indicado. - -En este sentido, recopilamos y procesamos los siguientes datos personales de su uso del Sitio Web: - -* **IP address**: Como parte de dicho uso del Sitio Web, procesamos temporalmente su IP address pero no tenemos forma de identificarle. Sin embargo, tenemos un interés legítimo en procesar dichos IP addresses para garantizar la funcionalidad técnica y mejorar las medidas de seguridad del Sitio Web. Este IP address no se almacena por nosotros a lo largo del tiempo. - -### 3) Procesamiento de datos personales por terceros - -Además de nuestra recopilación limitada y procesamiento de datos personales, los terceros pueden recoger o procesar datos personales como resultado del Sitio Web utilizando ciertas características o para proporcionar ciertos contenidos. Si interactúa con dichos contenidos o características de terceros, se aplicará la respectiva política de privacidad de dichos terceros. - -### 4) Medidas de seguridad que tomamos en relación con el Sitio Web - -Como enfoque general, tomamos la seguridad de los datos en serio y hemos implementado una variedad de medidas de seguridad en el Sitio Web para mantener la seguridad de sus datos personales cuando presente dicha información a nosotros. - -### 5) Exportación de datos fuera de la Unión Europea y Suiza - -Estamos obligados a proteger la privacidad de los datos personales que haya enviado en el improbable caso de que exportemos sus datos personales a lugares fuera de la Unión Europea o Suiza. Esto significa que los datos personales solo se procesarán en países o por partes que proporcionen un nivel adecuado de protección como lo considere Suiza o la Comisión Europea. De lo contrario, usaremos otras formas de protecciones, como formas contractuales específicas para garantizar que dichos datos personales reciban la misma protección que se requiere en Suiza o Europa. En cualquier caso, la transmisión de datos personales fuera de la Unión Europea y Suiza siempre tendrá lugar en conformidad con la legislación de privacidad aplicable. - -### 6) Sus opciones y derechos - -Como se explica en esta Política de Privacidad, limitamos nuestra recopilación y procesamiento de sus datos personales siempre que sea posible. Sin embargo, todavía tiene ciertas opciones y derechos en relación con los datos personales que recopilamos y procesamos. Conforme a la legislación de privacidad aplicable, tiene el derecho de: - -* Solicitarle a nosotros que corrija o actualice sus datos personales (si es posible de manera razonable); - -* Solicitarle a nosotros que elimine sus datos personales de nuestros sistemas; - -* Solicitarle a nosotros una copia de sus datos personales, que también puede transferirse a otro controlador de datos en su solicitud; - -* Revocar su consentimiento para procesar sus datos personales (solo si se solicitó consentimiento para una actividad de procesamiento), que solo afecta las actividades de procesamiento basadas en su consentimiento y no afecta la validez de dichas actividades de procesamiento antes de que haya revocado su consentimiento; - -* Objeto al procesamiento de sus datos personales; y - -* Presentar una queja con el Comisionado Federal de Protección de Datos e Información (FDPIC), si cree que sus datos personales se han procesado ilegalmente. - -### 7) Enlaces a terceros - -En este Sitio Web, puede encontrarse con enlaces a sitios web de terceros. Estos sitios web de terceros tienen políticas de privacidad independientes y separadas. Por lo tanto, no tenemos responsabilidad o responsabilidad por el contenido y actividades de estos sitios web de terceros. - -### 8) Esta Política de Privacidad puede cambiar - -Podemos modificar o reemplazar cualquier parte de esta Política de Privacidad en cualquier momento y sin previo aviso. Por favor, compruebe periódicamente el Sitio Web para cualquier cambio. La nueva Política de Privacidad entrará en vigor inmediatamente al momento de su publicación en nuestro Sitio Web. - -### 9) Información de contacto - -Para cualquier pregunta sobre la Política de Privacidad, por favor contáctenos en legal@free.technology. - -Este documento está licenciado bajo CC-BY-SA. diff --git a/es/codex/security.md b/es/codex/security.md deleted file mode 100644 index 4433481..0000000 --- a/es/codex/security.md +++ /dev/null @@ -1,7 +0,0 @@ -# Seguridad - -Nos tomamos la seguridad muy en serio en Codex y en todo el Instituto de Tecnología Libre y sus afiliados. - -Por favor, reporte cualquier incidente de seguridad a través de security@free.technology. - -Por favor, reporte cualquier vulnerabilidad descubierta en nuestro programa de recompensas en HackenProof para ayudar a garantizar que nuestros protocolos y software permanezcan seguros. diff --git a/es/developers/api.md b/es/developers/api.md deleted file mode 100644 index 2fb3061..0000000 --- a/es/developers/api.md +++ /dev/null @@ -1,5 +0,0 @@ -# API de Codex - -Codex utiliza una API REST para interactuar con el nodo y podemos usar un cliente HTTP para la interacción y configuración. - -La especificación de la API se puede encontrar en [api.codex.storage](https://api.codex.storage) y se genera basándose en [openapi.yaml](https://github.com/codex-storage/nim-codex/blob/master/openapi.yaml). También generamos una [Colección de Postman](https://api.codex.storage/postman.json). diff --git a/es/index.md b/es/index.md deleted file mode 100644 index d560060..0000000 --- a/es/index.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -# https://vitepress.dev/reference/default-theme-home-page -layout: home - -hero: - name: Codex - text: Plataforma descentralizada de almacenamiento de datos - tagline: Codex es un protocolo de almacenamiento de datos descentralizado y duradero, creado para que la comunidad mundial pueda preservar su conocimiento más importante sin riesgo de censura. - actions: - - theme: brand - text: ¿Qué es Codex? - link: /es/learn/what-is-codex - - theme: alt - text: Inicio rápido - link: /es/learn/quick-start - - theme: alt - text: Unirse a la Red de Pruebas Codex - link: /es/networks/testnet - -features: - - title: Aprender - details: Obtén más información sobre Codex - link: /es/learn/what-is-codex - icon: 📚 - - title: Redes - details: Participa en la red Codex como operador de almacenamiento o Comprador - link: /es/networks/networks - icon: 🚦 - - title: Desarrolladores - details: Construye con Codex - link: /es/developers/api - icon: 🏗️ ---- diff --git a/es/learn/architecture.md b/es/learn/architecture.md deleted file mode 100644 index 5b93a19..0000000 --- a/es/learn/architecture.md +++ /dev/null @@ -1,89 +0,0 @@ -# Descripción y arquitectura - -Codex está construyendo un motor de almacenamiento de datos duradero que es completamente descentralizado, proporcionando resistencia a la corrupción y censura para aplicaciones web3. Protege de forma innata a los participantes de la red dando a los hosts negación plausible sobre los datos que almacenan, y a los clientes garantías de durabilidad comprobables—hasta 99.99%—mientras mantiene la eficiencia en almacenamiento y ancho de banda. - -Estas cuatro características clave se combinan para diferenciar a Codex de proyectos existentes en el nicho de almacenamiento descentralizado: - -- **Codificación de borrado:** Proporciona redundancia de datos eficiente, lo que aumenta las garantías de durabilidad de datos. - -- **Prueba de recuperabilidad basada en ZK:** Para garantías ligeras de durabilidad de datos. - -- **Mecanismo de reparación perezosa:** Para reconstrucción eficiente de datos y prevención de pérdidas. - -- **Incentivación:** Para fomentar el comportamiento racional, la participación generalizada en la red y la provisión eficiente de recursos finitos de la red. - - -### Descentralización incentivada - -Los mecanismos de incentivación son una de las piezas clave que faltan en las redes tradicionales de compartición de archivos. Codex cree que una estructura de incentivos robusta basada en el mercado asegurará una amplia participación entre los tipos de nodos detallados a continuación. - -El desarrollo de una estructura de incentivos adecuada está impulsado por los siguientes objetivos: - -- Oferta y demanda para fomentar el uso óptimo de los recursos de la red. - -- Aumentar la participación permitiendo que los nodos utilicen sus ventajas competitivas para maximizar beneficios. - -- Prevenir el spam y desalentar la participación maliciosa. - -Aunque aún está por finalizar, la estructura de incentivos de Codex involucrará un mercado de participantes que quieren almacenar datos, y aquellos que proveen almacenamiento publicando garantías, con estos últimos pujando por contratos de almacenamiento abiertos. Esta estructura busca asegurar que los incentivos de los participantes estén alineados, resultando en que Codex funcione según lo previsto. - - -### Arquitectura de la red - -Codex está compuesto por múltiples tipos de nodos, cada uno tomando un rol diferente en la operación de la red. De manera similar, las demandas de hardware para cada tipo de nodo varían, permitiendo que aquellos que operan dispositivos con recursos restringidos participen. - -**Nodos de almacenamiento** - -Como proveedores de almacenamiento confiable a largo plazo de Codex, los nodos de almacenamiento depositan garantías basadas en las garantías publicadas en el lado de la solicitud de contratos, y el número de slots que tiene un contrato. Esto está vinculado a la durabilidad demandada por el usuario. El incumplimiento en proporcionar prueba periódica de posesión de datos resulta en penalizaciones de recorte. - -**Nodo Agregador** - -Un método para descargar la codificación de borrado, generación de pruebas y agregación de pruebas por un nodo cliente con bajos recursos, actualmente en desarrollo y será parte del siguiente lanzamiento de Codex Q2/Q4 del próximo año. - -**Nodos cliente** - -Los nodos cliente hacen solicitudes para que otros nodos almacenen, encuentren y recuperen datos. La mayoría de la red Codex serán nodos Cliente, y estos participantes pueden funcionar como nodos de caché para compensar el costo de los recursos de red que consumen. - -Cuando un nodo se compromete con un contrato de almacenamiento y un usuario sube datos, la red verificará proactivamente que el nodo de almacenamiento esté en línea y que los datos sean recuperables. Los nodos de almacenamiento son entonces consultados aleatoriamente para transmitir pruebas de posesión de datos sobre un intervalo correspondiente a la duración del contrato y 9's de garantía de recuperabilidad que proporciona el protocolo. - -Si el nodo de almacenamiento envía pruebas inválidas o falla en proporcionarlas a tiempo, la red expulsa al nodo de almacenamiento del slot, y el slot estará disponible para el primer nodo que genere una prueba válida para ese slot. - -Cuando el contrato se vuelve a publicar, parte de la garantía del nodo defectuoso paga las tarifas de ancho de banda del nuevo nodo de almacenamiento. La codificación de borrado complementa el esquema de reparación permitiendo la reconstrucción de los fragmentos faltantes a partir de datos en otros slots dentro del mismo contrato de almacenamiento alojado por nodos sin fallas. - - -![arquitectura](/learn/architecture.png) - -### Arquitectura del mercado ### - -El mercado consiste en un contrato inteligente que se despliega en la cadena, y los módulos de compra y venta que son parte del software del nodo. El módulo de compra es responsable de publicar solicitudes de almacenamiento en el contrato inteligente. El módulo de ventas es su contraparte que los proveedores de almacenamiento usan para determinar en qué solicitudes de almacenamiento están interesados. - -#### Contrato inteligente #### - -El contrato inteligente facilita el emparejamiento entre proveedores de almacenamiento y clientes de almacenamiento. Un cliente de almacenamiento puede solicitar una cierta cantidad de almacenamiento por una cierta duración. Esta solicitud se publica entonces en la cadena, para que los proveedores de almacenamiento puedan verla y decidir si quieren llenar un slot en la solicitud. - -Los principales parámetros de una solicitud de almacenamiento son: -- la cantidad de bytes de almacenamiento solicitados -- un identificador de contenido (CID) de los datos que deben almacenarse -- la duración durante la cual los datos deben almacenarse -- el número de slots (basado en los parámetros de codificación de borrado) -- una cantidad de tokens para pagar por el almacenamiento - -A nivel de protocolo, un cliente de almacenamiento es libre de determinar estos parámetros como considere conveniente, para que pueda elegir un nivel de durabilidad que sea adecuado para los datos y ajustarse a los precios cambiantes del almacenamiento. Las aplicaciones construidas sobre Codex pueden proporcionar orientación a sus usuarios para elegir los parámetros correctos, análogo a cómo las carteras de Ethereum ayudan a determinar las tarifas de gas. - -El contrato inteligente también verifica que los proveedores de almacenamiento mantengan sus promesas. Los proveedores de almacenamiento publican garantías cuando prometen llenar un slot de una solicitud de almacenamiento. Se espera que publiquen pruebas de almacenamiento periódicas al contrato, ya sea directamente o a través de un agregador. Si fallan en hacerlo repetidamente, entonces su garantía puede ser confiscada. Su slot se otorga entonces a otro proveedor de almacenamiento. - -El contrato inteligente indica cuándo un determinado proveedor de almacenamiento debe proporcionar una prueba de almacenamiento. Esto no se hace en un intervalo de tiempo fijo, sino que se determina estocásticamente para asegurar que no sea posible que un proveedor de almacenamiento prediga cuándo debe proporcionar la siguiente prueba de almacenamiento. - -#### Compras #### - -El módulo de compra en el software del nodo interactúa con el contrato inteligente en nombre del operador del nodo. Publica solicitudes de almacenamiento y maneja cualquier otra interacción que se requiera durante la vida útil de la solicitud. Por ejemplo, cuando una solicitud se cancela porque no hay suficientes proveedores de almacenamiento interesados, entonces el módulo de compra puede retirar los tokens que estaban asociados con la solicitud. - -#### Ventas #### - -El módulo de ventas es la contraparte del módulo de ventas. Monitorea el contrato inteligente para ser notificado de las solicitudes de almacenamiento entrantes. Mantiene una lista de las solicitudes más prometedoras que puede cumplir. Favorecerá aquellas solicitudes que tengan una alta recompensa y baja garantía. Tan pronto como encuentra una solicitud adecuada, intentará primero reservar y luego llenar un slot descargando los datos asociados, creando una prueba de almacenamiento y publicándola en el contrato inteligente. Luego continuará monitoreando el contrato inteligente para proporcionarle pruebas de almacenamiento cuando sean requeridas. - -El módulo de ventas contiene una estrategia de mejor esfuerzo para determinar en qué solicitudes de almacenamiento está interesado. Con el tiempo, esperamos que surjan estrategias más especializadas para atender las necesidades de, por ejemplo, grandes proveedores versus proveedores que ejecutan un nodo desde su casa. - -### Libro Blanco ### - -Lee el [libro blanco de Codex](/learn/whitepaper) diff --git a/es/learn/local-marketplace.md b/es/learn/local-marketplace.md deleted file mode 100644 index 6582faa..0000000 --- a/es/learn/local-marketplace.md +++ /dev/null @@ -1,669 +0,0 @@ ---- -outline: [2, 3] ---- -# Running a Local Codex Network with Marketplace Support - -This tutorial will teach you how to run a small Codex network with the -_storage marketplace_ enabled; i.e., the functionality in Codex which -allows participants to offer and buy storage in a market, ensuring that -storage providers honor their part of the deal by means of cryptographic proofs. - -In this tutorial, you will: - -1. [Set Up a Geth PoA network](#_1-set-up-a-geth-poa-network); -2. [Set up The Marketplace](#_2-set-up-the-marketplace); -3. [Run Codex](#_3-run-codex); -4. [Buy and Sell Storage in the Marketplace](#_4-buy-and-sell-storage-on-the-marketplace). - -## Prerequisites - -To complete this tutorial, you will need: - -* the [geth](https://github.com/ethereum/go-ethereum) Ethereum client; - You need version `1.13.x` of geth as newer versions no longer support - Proof of Authority (PoA). This tutorial was tested using geth version `1.13.15`. -* a Codex binary, which [you can compile from source](https://github.com/codex-storage/nim-codex?tab=readme-ov-file#build-and-run). - -We will also be using [bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell)) -syntax throughout. If you use a different shell, you may need to adapt -things to your platform. - -To get started, create a new folder where we will keep the tutorial-related -files so that we can keep them separate from the codex repository. -We assume the name of the folder to be `marketplace-tutorial`. - -## 1. Set Up a Geth PoA Network - -For this tutorial, we will use a simple -[Proof-of-Authority](https://github.com/ethereum/EIPs/issues/225) network -with geth. The first step is creating a _signer account_: an account which -will be used by geth to sign the blocks in the network. -Any block signed by a signer is accepted as valid. - -### 1.1. Create a Signer Account - -To create a signer account, from the `marketplace-tutorial` directory run: - -```bash -geth account new --datadir geth-data -``` - -The account generator will ask you to input a password, which you can -leave blank. It will then print some information, -including the account's public address: - -```bash -INFO [09-29|16:49:24.244] Maximum peer count ETH=50 total=50 -Your new account is locked with a password. Please give a password. Do not forget this password. -Password: -Repeat password: - -Your new key was generated - -Public address of the key: 0x33A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB -Path of the secret key file: geth-data/keystore/UTC--2024-09-29T14-49-31.655272000Z--33a904ad57d0e2cb8ffe347d3c0e83c2e875e7db - -- You can share your public address with anyone. Others need it to interact with you. -- You must NEVER share the secret key with anyone! The key controls access to your funds! -- You must BACKUP your key file! Without the key, it's impossible to access account funds! -- You must REMEMBER your password! Without the password, it's impossible to decrypt the key! -``` - -In this example, the public address of the signer account is -`0x33A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB`. -Yours will print a different address. Save it for later usage. - -Next set an environment variable for later usage: - -```bash -export GETH_SIGNER_ADDR="0x0000000000000000000000000000000000000000" -echo ${GETH_SIGNER_ADDR} > geth_signer_address.txt -``` - -> Here make sure you replace `0x0000000000000000000000000000000000000000` -> with your public address of the signer account -> (`0x33A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB` in our example). - -### 1.2. Configure The Network and Create the Genesis Block - -The next step is telling geth what kind of network you want to run. -We will be running a [pre-merge](https://ethereum.org/en/roadmap/merge/) -network with Proof-of-Authority consensus. -To get that working, create a `network.json` file. - -If you set the `GETH_SIGNER_ADDR` variable above you can run the following -command to create the `network.json` file: - -```bash -echo "{\"config\": { \"chainId\": 12345, \"homesteadBlock\": 0, \"eip150Block\": 0, \"eip155Block\": 0, \"eip158Block\": 0, \"byzantiumBlock\": 0, \"constantinopleBlock\": 0, \"petersburgBlock\": 0, \"istanbulBlock\": 0, \"berlinBlock\": 0, \"londonBlock\": 0, \"arrowGlacierBlock\": 0, \"grayGlacierBlock\": 0, \"clique\": { \"period\": 1, \"epoch\": 30000 } }, \"difficulty\": \"1\", \"gasLimit\": \"8000000\", \"extradata\": \"0x0000000000000000000000000000000000000000000000000000000000000000${GETH_SIGNER_ADDR:2}0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\", \"alloc\": { \"${GETH_SIGNER_ADDR}\": { \"balance\": \"10000000000000000000000\"}}}" > network.json -``` - -You can also manually create the file remembering update it with your -signer public address: - -```json -{ - "config": { - "chainId": 12345, - "homesteadBlock": 0, - "eip150Block": 0, - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "berlinBlock": 0, - "londonBlock": 0, - "arrowGlacierBlock": 0, - "grayGlacierBlock": 0, - "clique": { - "period": 1, - "epoch": 30000 - } - }, - "difficulty": "1", - "gasLimit": "8000000", - "extradata": "0x000000000000000000000000000000000000000000000000000000000000000033A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "alloc": { - "0x33A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB": { - "balance": "10000000000000000000000" - } - } -} -``` - -Note that the signer account address is embedded in two different places: -* inside of the `"extradata"` string, surrounded by zeroes and stripped of - its `0x` prefix; -* as an entry key in the `alloc` session. - Make sure to replace that ID with the account ID that you wrote down in - [Step 1.1](#_1-1-create-a-signer-account). - -Once `network.json` is created, you can initialize the network with: - -```bash -geth init --datadir geth-data network.json -``` - -The output of the above command you may include some warnings, like: - -```bash -WARN [08-21|14:48:12.305] Unknown config environment variable envvar=GETH_SIGNER_ADDR -``` - -or even errors when running the command for the first time: - -```bash -ERROR[08-21|14:48:12.399] Head block is not reachable -``` - -The important part is that at the end you should see something similar to: - -```bash -INFO [08-21|14:48:12.639] Successfully wrote genesis state database=lightchaindata hash=768bf1..42d06a -``` - -### 1.3. Start your PoA Node - -We are now ready to start our $1$-node, private blockchain. -To launch the signer node, open a separate terminal in the same working -directory and make sure you have the `GETH_SIGNER_ADDR` set. -For convenience use the `geth_signer_address.txt`: - -```bash -export GETH_SIGNER_ADDR=$(cat geth_signer_address.txt) -``` - -Having the `GETH_SIGNER_ADDR` variable set, run: - -```bash -geth\ - --datadir geth-data\ - --networkid 12345\ - --unlock ${GETH_SIGNER_ADDR}\ - --nat extip:127.0.0.1\ - --netrestrict 127.0.0.0/24\ - --mine\ - --miner.etherbase ${GETH_SIGNER_ADDR}\ - --http\ - --allow-insecure-unlock -``` - -Note that, once again, the signer account created in -[Step 1.1](#_1-1-create-a-signer-account) appears both in -`--unlock` and `--allow-insecure-unlock`. - -Geth will prompt you to insert the account's password as it starts up. -Once you do that, it should be able to start up and begin "mining" blocks. - -Also here, you may encounter errors like: - -```bash -ERROR[08-21|15:00:27.625] Bootstrap node filtered by netrestrict id=c845e51a5e470e44 ip=18.138.108.67 -ERROR[08-21|15:00:27.625] Bootstrap node filtered by netrestrict id=f23ac6da7c02f84a ip=3.209.45.79 -ERROR[08-21|15:00:27.625] Bootstrap node filtered by netrestrict id=ef2d7ab886910dc8 ip=65.108.70.101 -ERROR[08-21|15:00:27.625] Bootstrap node filtered by netrestrict id=6b36f791352f15eb ip=157.90.35.166 -``` - -You can safely ignore them. - -If the command above fails with: - -```bash -Fatal: Failed to register the Ethereum service: only PoS networks are supported, please transition old ones with Geth v1.13.x -``` - -make sure, you are running the correct Geth version -(see Section [Prerequisites](#prerequisites)) - -## 2. Set Up The Marketplace - -You will need to open new terminal for this section and geth needs to be -running already. Setting up the Codex marketplace entails: - -1. Deploying the Codex Marketplace contracts to our private blockchain -2. Setup Ethereum accounts we will use to buy and sell storage in - the Codex marketplace -3. Provisioning those accounts with the required token balances - -### 2.1. Deploy the Codex Marketplace Contracts - -Make sure you leave the `marketplace-tutorial` directory, and clone -the `codex-storage/nim-codex.git`: - -```bash -git clone https://github.com/codex-storage/nim-codex.git -``` - -> If you just want to clone the repo to run the tutorial, you can -> skip the history and just download the head of the master branch by using -> `--depth 1` option: `git clone --depth 1 https://github.com/codex-storage/nim-codex.git` - -Thus, our directory structure for the purpose of this tutorial looks like this: - -```bash -| -|-- nim-codex -└-- marketplace-tutorial -``` - -> You could clone the `codex-storage/nim-codex.git` to some other location. -> Just to keeps things nicely separated it is best to make sure that -> `nim-codex` is not under `marketplace-tutorial` directory. - -Now, from the `nim-codex` folder run: - -```bash -make update && make -``` - -> This may take a moment as it will also build the `nim` compiler. Be patient. - -Now, in order to start a local Ethereum network run: - -```bash -cd vendor/codex-contracts-eth -npm install -``` - -> While writing the document we used `node` version `v20.17.0` and -> `npm` version `10.8.2`. - -Before continuing you now must **wait until $256$ blocks are mined** -**in your PoAnetwork**, or deploy will fail. This should take about -$4$ minutes and $30$ seconds. You can check which block height you are -currently at by running the following command -**from the `marketplace-tutorial` folder**: - -```bash -geth attach --exec web3.eth.blockNumber ./geth-data/geth.ipc -``` - -once that gets past $256$, you are ready to go. - -To deploy contracts, from the `codex-contracts-eth` directory run: - -```bash -export DISTTEST_NETWORK_URL=http://localhost:8545 -npx hardhat --network codexdisttestnetwork deploy -``` - -If the command completes successfully, you will see the output similar -to this one: - -```bash -Deployed Marketplace with Groth16 Verifier at: -0xCf0df6C52B02201F78E8490B6D6fFf5A82fC7BCd -``` -> of course your address will be different. - -You are now ready to prepare the accounts. - -### 2.2. Generate the Required Accounts - -We will run $2$ Codex nodes: a **storage provider**, which will sell storage -on the network, and a **client**, which will buy and use such storage; -we therefore need two valid Ethereum accounts. We could create random -accounts by using one of the many tools available to that end but, since -this is a tutorial running on a local private network, we will simply -provide you with two pre-made accounts along with their private keys, -which you can copy and paste instead: - -First make sure you're back in the `marketplace-tutorial` folder and -not the `codex-contracts-eth` subfolder. Then set these variables: - -**Storage:** -```bash -export ETH_STORAGE_ADDR=0x45BC5ca0fbdD9F920Edd12B90908448C30F32a37 -export ETH_STORAGE_PK=0x06c7ac11d4ee1d0ccb53811b71802fa92d40a5a174afad9f2cb44f93498322c3 -echo $ETH_STORAGE_PK > storage.pkey && chmod 0600 storage.pkey -``` - -**Client:** -```bash -export ETH_CLIENT_ADDR=0x9F0C62Fe60b22301751d6cDe1175526b9280b965 -export ETH_CLIENT_PK=0x5538ec03c956cb9d0bee02a25b600b0225f1347da4071d0fd70c521fdc63c2fc -echo $ETH_CLIENT_PK > client.pkey && chmod 0600 client.pkey -``` - -### 2.3. Provision Accounts with Tokens - -We now need to transfer some ETH to each of the accounts, as well as provide -them with some Codex tokens for the storage node to use as collateral and -for the client node to buy actual storage. - -Although the process is not particularly complicated, I suggest you use -[the script we prepared](https://github.com/gmega/local-codex-bare/blob/main/scripts/mint-tokens.js) -for that. This script, essentially: - -1. reads the Marketplace contract address and its ABI from the deployment data; -2. transfers $1$ ETH from the signer account to a target account if the target - account has no ETH balance; -3. mints $n$ Codex tokens and adds it into the target account's balance. - -To use the script, just download it into a local file named `mint-tokens.js`, -for instance using `curl` (make sure you are in -the `marketplace-tutorial` directory): - -```bash -# download script -curl https://raw.githubusercontent.com/gmega/codex-local-bare/main/scripts/mint-tokens.js -o mint-tokens.js -``` - -Then run: - -```bash -# set the contract file location (we assume you are in the marketplace-tutorial directory) -export CONTRACT_DEPLOY_FULL="../nim-codex/vendor/codex-contracts-eth/deployments/codexdisttestnetwork" -export GETH_SIGNER_ADDR=$(cat geth_signer_address.txt) -# Installs Web3-js -npm install web3 -# Provides tokens to the storage account. -node ./mint-tokens.js $CONTRACT_DEPLOY_FULL/TestToken.json $GETH_SIGNER_ADDR 0x45BC5ca0fbdD9F920Edd12B90908448C30F32a37 10000000000 -# Provides tokens to the client account. -node ./mint-tokens.js $CONTRACT_DEPLOY_FULL/TestToken.json $GETH_SIGNER_ADDR 0x9F0C62Fe60b22301751d6cDe1175526b9280b965 10000000000 -``` - -If you get a message like - -```bash -Usage: mint-tokens.js -``` - -then you need to ensure you provided all the required arguments. -In particular you need to ensure that the `GETH_SIGNER_ADDR` env variable -holds the signer address (we used -`export GETH_SIGNER_ADDR=$(cat geth_signer_address.txt)` above to -make sure it is set). - -## 3. Run Codex - -With accounts and geth in place, we can now start the Codex nodes. - -### 3.1. Storage Node - -The storage node will be the one storing data and submitting the proofs of -storage to the chain. To do that, it needs access to: - -1. the address of the Marketplace contract that has been deployed to - the local geth node in [Step 2.1](#_2-1-deploy-the-codex-marketplace-contracts); -2. the sample ceremony files which are shipped in the Codex contracts repo - (`nim-codex/vendor/codex-contracts-eth`). - -**Address of the Marketplace Contract.** The contract address can be found -inside of the file `nim-codex/vendor/codex-contracts-eth/deployments/codexdisttestnetwork/Marketplace.json`. -We captured that location above in `CONTRACT_DEPLOY_FULL` variable, thus, from -the `marketplace-tutorial` folder just run: - -```bash -grep '"address":' ${CONTRACT_DEPLOY_FULL}/Marketplace.json -``` - -which should print something like: -```bash -"address": "0xCf0df6C52B02201F78E8490B6D6fFf5A82fC7BCd", -``` - -> This address should match the address we got earlier when deploying -> the Marketplace contract above. - -Then run the following with the correct market place address: -```bash -export MARKETPLACE_ADDRESS="0x0000000000000000000000000000000000000000" -echo ${MARKETPLACE_ADDRESS} > marketplace_address.txt -``` - -where you replace `0x0000000000000000000000000000000000000000` with -the Marketplace contract above in -[Step 2.1](#_2-1-deploy-the-codex-marketplace-contracts). - -**Prover ceremony files.** The ceremony files are under the -`nim-codex/vendor/codex-contracts-eth/verifier/networks/codexdisttestnetwork` -subdirectory. There are three of them: `proof_main.r1cs`, `proof_main.zkey`, -and `prooof_main.wasm`. We will need all of them to start the Codex storage node. - -**Starting the storage node.** Let: - -* `PROVER_ASSETS` contain the directory where the prover ceremony files are - located. **This must be an absolute path**; -* `CODEX_BINARY` contain the location of your Codex binary; -* `MARKETPLACE_ADDRESS` contain the address of the Marketplace contract - (we have already set it above). - -Set these paths into environment variables (make sure you are in -the `marketplace-tutorial` directory): - -```bash -export CONTRACT_DEPLOY_FULL=$(realpath "../nim-codex/vendor/codex-contracts-eth/deployments/codexdisttestnetwork") -export PROVER_ASSETS=$(realpath "../nim-codex/vendor/codex-contracts-eth/verifier/networks/codexdisttestnetwork/") -export CODEX_BINARY=$(realpath "../nim-codex/build/codex") -export MARKETPLACE_ADDRESS=$(cat marketplace_address.txt) -``` -> you may notice, that we have already set the `CONTRACT_DEPLOY_FULL` variable -> above. Here, we make sure it is an absolute path. - -To launch the storage node, run: - -```bash -${CODEX_BINARY}\ - --data-dir=./codex-storage\ - --listen-addrs=/ip4/0.0.0.0/tcp/8080\ - --api-port=8000\ - --disc-port=8090\ - persistence\ - --eth-provider=http://localhost:8545\ - --eth-private-key=./storage.pkey\ - --marketplace-address=${MARKETPLACE_ADDRESS}\ - --validator\ - --validator-max-slots=1000\ - prover\ - --circom-r1cs=${PROVER_ASSETS}/proof_main.r1cs\ - --circom-wasm=${PROVER_ASSETS}/proof_main.wasm\ - --circom-zkey=${PROVER_ASSETS}/proof_main.zkey -``` - -**Starting the client node.** - -The client node is started similarly except that: - -* we need to pass the SPR of the storage node so it can form a network with it; -* since it does not run any proofs, it does not require any ceremony files. - -We get the Signed Peer Record (SPR) of the storage node so we can bootstrap -the client node with it. To get the SPR, issue the following call: - -```bash -curl -H 'Accept: text/plain' 'http://localhost:8000/api/codex/v1/spr' --write-out '\n' -``` - -You should get the SPR back starting with `spr:`. - -Before you proceed, open new terminal, and enter `marketplace-tutorial` directory. - -Next set these paths into environment variables: - -```bash -# set the SPR for the storage node -export STORAGE_NODE_SPR=$(curl -H 'Accept: text/plain' 'http://localhost:8000/api/codex/v1/spr') -# basic vars -export CONTRACT_DEPLOY_FULL=$(realpath "../nim-codex/vendor/codex-contracts-eth/deployments/codexdisttestnetwork") -export CODEX_BINARY=$(realpath "../nim-codex/build/codex") -export MARKETPLACE_ADDRESS=$(cat marketplace_address.txt) -``` -and then run: - -```bash -${CODEX_BINARY}\ - --data-dir=./codex-client\ - --listen-addrs=/ip4/0.0.0.0/tcp/8081\ - --api-port=8001\ - --disc-port=8091\ - --bootstrap-node=${STORAGE_NODE_SPR}\ - persistence\ - --eth-provider=http://localhost:8545\ - --eth-private-key=./client.pkey\ - --marketplace-address=${MARKETPLACE_ADDRESS} -``` - -## 4. Buy and Sell Storage on the Marketplace - -Any storage negotiation has two sides: a buyer and a seller. -Therefore, before we can actually request storage, we must first offer -some of it for sale. - -### 4.1 Sell Storage - -The following request will cause the storage node to put out $50\text{MB}$ -of storage for sale for $1$ hour, at a price of $1$ Codex token -per slot per second, while expressing that it's willing to take at most -a $1000$ Codex token penalty for not fulfilling its part of the contract.[^1] - -```bash -curl 'http://localhost:8000/api/codex/v1/sales/availability' \ - --header 'Content-Type: application/json' \ - --data '{ - "totalSize": "50000000", - "duration": "3600", - "minPrice": "1", - "maxCollateral": "1000" -}' -``` - -This should return a JSON response containing an `id` (e.g. `"id": "0xb55b3bc7aac2563d5bf08ce8a177a38b5a40254bfa7ee8f9c52debbb176d44b0"`) -which identifies this storage offer. - -> To make JSON responses more readable, you can try -> [jq](https://jqlang.github.io/jq/) JSON formatting utility -> by just adding `| jq` after the command. -> On macOS you can install with `brew install jq`. - -To check the current storage offers for this node, you can issue: - -```bash -curl 'http://localhost:8000/api/codex/v1/sales/availability' -``` - -or with `jq`: - -```bash -curl 'http://localhost:8000/api/codex/v1/sales/availability' | jq -``` - -This should print a list of offers, with the one you just created figuring -among them (for our tutorial, there will be only one offer returned -at this time). - -### 4.2. Buy Storage - -Before we can buy storage, we must have some actual data to request -storage for. Start by uploading a small file to your client node. -On Linux (or macOS) you could, for instance, use `dd` to generate a $1M$ file: - -```bash -dd if=/dev/urandom of=./data.bin bs=1M count=1 -``` - -Assuming your file is named `data.bin`, you can upload it with: - -```bash -curl --request POST http://localhost:8001/api/codex/v1/data --header 'Content-Type: application/octet-stream' --write-out '\n' -T ./data.bin -``` - -Once the upload completes, you should see a _Content Identifier_, -or _CID_ (e.g. `zDvZRwzm2mK7tvDzKScRLapqGdgNTLyyEBvx1TQY37J2CdWdS6Sj`) -for the uploaded file printed to the terminal. -Use that CID in the purchase request: - -```bash -# make sure to replace the CID before with the CID you got in the previous step -export CID=zDvZRwzm2mK7tvDzKScRLapqGdgNTLyyEBvx1TQY37J2CdWdS6Sj -``` - -```bash -curl "http://localhost:8001/api/codex/v1/storage/request/${CID}" \ - --header 'Content-Type: application/octet-stream' \ - --data "{ - \"duration\": \"600\", - \"reward\": \"1\", - \"proofProbability\": \"3\", - \"expiry\": \"500\", - \"nodes\": 3, - \"tolerance\": 1, - \"collateral\": \"1000\" - }" \ - --write-out '\n' -``` - -The parameters under `--data` say that: - -1. we want to purchase storage for our file for $5$ minutes (`"duration": "600"`); -2. we are willing to pay up to $1$ token per slot per second (`"reward": "1"`) -3. our file will be split into three pieces (`"nodes": 3`). - Because we set `"tolerance": 1` we only need two (`nodes - tolerance`) - pieces to rebuild the file; i.e., we can tolerate that at most one node - stops storing our data; either due to failure or other reasons; -4. we demand `1000` tokens in collateral from storage providers for each piece. - Since there are $3$ such pieces, there will be `3000` in total collateral - committed by the storage provider(s) once our request is started. -5. finally, the `expiry` puts a time limit for filling all the slots by - the storage provider(s). If slot are not filled by the `expire` interval, - the request will timeout and fail. - -### 4.3. Track your Storage Requests - -POSTing a storage request will make it available in the storage market, -and a storage node will eventually pick it up. - -You can poll the status of your request by means of: -```bash -export STORAGE_PURCHASE_ID="1d0ec5261e3364f8b9d1cf70324d70af21a9b5dccba380b24eb68b4762249185" -curl "http://localhost:8001/api/codex/v1/storage/purchases/${STORAGE_PURCHASE_ID}" -``` - -For instance: - -```bash -> curl 'http://localhost:8001/api/codex/v1/storage/purchases/6c698cd0ad71c41982f83097d6fa75beb582924e08a658357a1cd4d7a2a6766d' -``` - -This returns a result like: - -```json -{ - "requestId": "0x86501e4677a728c6a8031971d09b921c3baa268af06b9f17f1b745e7dba5d330", - "request": { - "client": "0x9f0c62fe60b22301751d6cde1175526b9280b965", - "ask": { - "slots": 3, - "slotSize": "262144", - "duration": "1000", - "proofProbability": "3", - "reward": "1", - "collateral": "1", - "maxSlotLoss": 1 - }, - "content": { - "cid": "zDvZRwzkyw1E7ABaUSmgtNEDjC7opzhUoHo99Vpvc98cDWeCs47u" - }, - "expiry": "1711992852", - "nonce": "0x9f5e651ecd3bf73c914f8ed0b1088869c64095c0d7bd50a38fc92ebf66ff5915", - "id": "0x6c698cd0ad71c41982f83097d6fa75beb582924e08a658357a1cd4d7a2a6766d" - }, - "state": "submitted", - "error": null -} -``` - -Shows that a request has been submitted but has not yet been filled. -Your request will be successful once `"state"` shows `"started"`. -Anything other than that means the request has not been completely -processed yet, and an `"error"` state other than `null` means it failed. - -Well, it was quite a journey, wasn't it? You can congratulate yourself for -successfully finishing the codex marketplace tutorial! - -[^1]: Codex files get partitioned into pieces called "slots" and distributed -to various storage providers. The collateral refers to one such slot, -and will be slowly eaten away as the storage provider fails to deliver -timely proofs, but the actual logic is [more involved than that](https://github.com/codex-storage/codex-contracts-eth/blob/6c9f797f408608958714024b9055fcc330e3842f/contracts/Marketplace.sol#L209). diff --git a/es/learn/using.md b/es/learn/using.md deleted file mode 100644 index c0ac91e..0000000 --- a/es/learn/using.md +++ /dev/null @@ -1,275 +0,0 @@ ---- -outline: [2, 3] ---- -# Using Codex - -We can interact with Codex using [REST API](/developers/api). This document will show you several useful examples. - -Also, we can check [Codex App UI](https://app.codex.storage). - -Command line interpreter on [Linux/macOS](#linux-macos) and [Windows](#windows) works slightly different, so please use steps for your OS. - -## Linux/macOS - -### Overview -1. [Debug](#debug) -2. [Upload a file](#upload-a-file) -3. [Download a file](#download-a-file) -4. [Local data](#local-data) -5. [Create storage availability](#create-storage-availability) -6. [Purchase storage](#purchase-storage) -7. [View purchase status](#view-purchase-status) - -### Debug -An easy way to check that your node is up and running is: - -```shell -curl http://localhost:8080/api/codex/v1/debug/info \ - -w '\n' -``` - -This will return a JSON structure with plenty of information about your local node. It contains peer information that may be useful when troubleshooting connection issues. - -### Upload a file -> [!Warning] -> Once you upload a file to Codex, other nodes in the network can download it. Please do not upload anything you don't want others to access, or, properly encrypt your data *first*. - -```shell -curl -X POST \ - http://localhost:8080/api/codex/v1/data \ - -H 'Content-Type: application/octet-stream' \ - -w '\n' \ - -T -``` - -On successful upload, you'll receive a CID. This can be used to download the file from any node in the network. - -> [!TIP] -> Are you on the [Codex Discord server](https://discord.gg/codex-storage)? Post your CID in the [# :wireless: | share-cids](https://discord.com/channels/895609329053474826/1278383098102284369) channel, see if others are able to download it. Codex does not (yet?) provide file metadata, so if you want others to be able to open your file, tell them which extension to give it. - -### Download a file -When you have a CID of data you want to download, you can use the following commands: - -```shell -# paste your CID from the previous step here between the quotes -CID="..." -``` - -```shell -curl "http://localhost:8080/api/codex/v1/data/${CID}/network/stream" \ - -o "${CID}.png" -``` - -Please use the correct extension for the downloaded file, because Codex does not store yet content-type or extension information. - -### Local data -You can view which datasets are currently being stored by your node: - -```shell -curl http://localhost:8080/api/codex/v1/data \ - -w '\n' -``` - -### Create storage availability -> [!WARNING] -> This step requires that Codex was started with the [`prover`](/learn/run#codex-storage-node) option. - -In order to start selling storage space to the network, you must configure your node with the following command. Once configured, the node will monitor on-chain requests-for-storage and will automatically enter into contracts that meet these specifications. In order to enter and maintain storage contracts, your node is required to submit zero-knowledge storage proofs. The calculation of these proofs will increase the CPU and RAM usage of Codex. - -```shell -curl -X POST \ - http://localhost:8080/api/codex/v1/sales/availability \ - -H 'Content-Type: application/json' \ - -w '\n' \ - -d '{ - "totalSize": "8000000", - "duration": "7200", - "minPrice": "10", - "maxCollateral": "10" - }' -``` - -For descriptions of each parameter, please view the [spec](https://api.codex.storage/#tag/Marketplace/operation/offerStorage). - -### Purchase storage -To purchase storage space from the network, first you must upload your data. Once you have the CID, use the following to create a request-for-storage. - -Set your CID: - -```shell -# paste your CID from the previous step here between the quotes -CID="..." -echo "CID: ${CID}" -``` - -Next you can run: - -```shell -curl -X POST \ - "http://localhost:8080/api/codex/v1/storage/request/${CID}" \ - -w '\n' \ - -d '{ - "duration": "3600", - "reward": "1", - "proofProbability": "5", - "expiry": "1200", - "nodes": 5, - "tolerance": 2, - "collateral": "1" - }' -``` - -For descriptions of each parameter, please view the [spec](https://api.codex.storage/#tag/Marketplace/operation/createStorageRequest). - -When successful, this request will return a Purchase-ID. - -### View purchase status -Using a Purchase-ID, you can check the status of your request-for-storage contract: - -```shell -# paste your PURCHASE_ID from the previous step here between the quotes -PURCHASE_ID="..." -``` - -Then: - -```shell -curl "http://localhost:8080/api/codex/v1/storage/purchases/${PURCHASE_ID}" \ - -w '\n' -``` - -This will display state and error information for your purchase. -| State | Description | -|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Pending | Request is waiting for chain confirmation. | -| Submitted | Request is on-chain. Hosts may now attempt to download the data. | -| Started | Hosts have downloaded the data and provided proof-of-storage. | -| Failed | The request was started, but (too many) hosts failed to provide proof-of-storage on time. While the data may still be available in the network, for the purpose of the purchase it is considered lost. | -| Finished | The request was started successfully and the duration has elapsed. | -| Expired | (Not enough) hosts have submitted proof-of-storage before the request's expiry elapsed. | -| Errored | An unfortunate state of affairs. The 'error' field should tell you more. | - -## Windows - -### Overview {#overview-windows} -1. [Debug](#debug-windows) -2. [Upload a file](#upload-a-file-windows) -3. [Download a file](#download-a-file-windows) -4. [Local data](#local-data-windows) -5. [Create storage availability](#create-storage-availability-windows) -6. [Purchase storage](#purchase-storage-windows) -7. [View purchase status](#view-purchase-status-windows) - -### Debug {#debug-windows} -An easy way to check that your node is up and running is: - -```batch -curl http://localhost:8080/api/codex/v1/debug/info -``` - -This will return a JSON structure with plenty of information about your local node. It contains peer information that may be useful when troubleshooting connection issues. - -### Upload a file {#upload-a-file-windows} -> [!Warning] -> Once you upload a file to Codex, other nodes in the network can download it. Please do not upload anything you don't want others to access, or, properly encrypt your data *first*. - -```batch -curl -X POST ^ - http://localhost:8080/api/codex/v1/data ^ - -H "Content-Type: application/octet-stream" ^ - -T -``` - -On successful upload, you'll receive a CID. This can be used to download the file from any node in the network. - -> [!TIP] -> Are you on the [Codex Discord server](https://discord.gg/codex-storage)? Post your CID in the [# :wireless: | share-cids](https://discord.com/channels/895609329053474826/1278383098102284369) channel, see if others are able to download it. Codex does not (yet?) provide file metadata, so if you want others to be able to open your file, tell them which extension to give it. - -### Download a file {#download-a-file-windows} -When you have a CID of data you want to download, you can use the following commands: - -```batch -:: paste your CID from the previous step here between the quotes -set CID="..." -``` - -```batch -curl "http://localhost:8080/api/codex/v1/data/%CID%/network/stream" ^ - -o "%CID%.png" -``` - -Please use the correct extension for the downloaded file, because Codex does not store yet content-type or extension information. - -### Local data {#local-data-windows} -You can view which datasets are currently being stored by your node: - -```batch -curl http://localhost:8080/api/codex/v1/data -``` - -### Create storage availability {#create-storage-availability-windows} -> [!WARNING] -> This step requires that Codex was started with the [`prover`](/learn/run#codex-storage-node) option. - -In order to start selling storage space to the network, you must configure your node with the following command. Once configured, the node will monitor on-chain requests-for-storage and will automatically enter into contracts that meet these specifications. In order to enter and maintain storage contracts, your node is required to submit zero-knowledge storage proofs. The calculation of these proofs will increase the CPU and RAM usage of Codex. - -```batch -curl -X POST ^ - http://localhost:8080/api/codex/v1/sales/availability ^ - -H "Content-Type: application/json" ^ - -d "{""totalSize"": ""8000000"", ""duration"": ""7200"", ""minPrice"": ""10"", ""maxCollateral"": ""10""}" -``` - -For descriptions of each parameter, please view the [spec](https://api.codex.storage/#tag/Marketplace/operation/offerStorage). - -### Purchase storage {#purchase-storage-windows} -To purchase storage space from the network, first you must upload your data. Once you have the CID, use the following to create a request-for-storage. - -Set your CID: - -```batch -:: paste your CID from the previous step here between the quotes -set CID="..." -echo CID: %CID% -``` - -Next you can run: - -```batch -curl -X POST ^ - "http://localhost:8080/api/codex/v1/storage/request/%CID%" ^ - -H "Content-Type: application/json" ^ - -d "{""duration"": ""3600"",""reward"": ""1"", ""proofProbability"": ""5"", ""expiry"": ""1200"", ""nodes"": 5, ""tolerance"": 2, ""collateral"": ""1""}" -``` - -For descriptions of each parameter, please view the [spec](https://api.codex.storage/#tag/Marketplace/operation/createStorageRequest). - -When successful, this request will return a Purchase-ID. - -### View purchase status {#view-purchase-status-windows} -Using a Purchase-ID, you can check the status of your request-for-storage contract: - -```batch -:: paste your PURCHASE_ID from the previous step here between the quotes -set PURCHASE_ID="..." -``` - -Then: - -```batch -curl "http://localhost:8080/api/codex/v1/storage/purchases/%PURCHASE_ID%" -``` - -This will display state and error information for your purchase. -| State | Description | -|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Pending | Request is waiting for chain confirmation. | -| Submitted | Request is on-chain. Hosts may now attempt to download the data. | -| Started | Hosts have downloaded the data and provided proof-of-storage. | -| Failed | The request was started, but (too many) hosts failed to provide proof-of-storage on time. While the data may still be available in the network, for the purpose of the purchase it is considered lost. | -| Finished | The request was started successfully and the duration has elapsed. | -| Expired | (Not enough) hosts have submitted proof-of-storage before the request's expiry elapsed. | -| Errored | An unfortunate state of affairs. The 'error' field should tell you more. | - -## Known issues -1. We add a new line to the API calls to get more readable output, please check [[rest] Add line ending on responses #771](https://github.com/codex-storage/nim-codex/issues/771) for more details. diff --git a/es/learn/what-is-codex.md b/es/learn/what-is-codex.md deleted file mode 100644 index 86911a6..0000000 --- a/es/learn/what-is-codex.md +++ /dev/null @@ -1,37 +0,0 @@ -# ¿Qué es Codex? - -Codex es un protocolo de almacenamiento de datos descentralizado. Sus características principales son una fuerte resistencia a la censura y garantías de durabilidad. Tiene una implementación de referencia con el mismo nombre, escrita en nim. Sirve como la capa de almacenamiento del stack tecnológico de [Logos](https://logos.co/). Junto con la capa de acuerdo sin confianza, [Nomos](http://nomos.tech), y la capa de comunicaciones, [Waku](http://waku.org), es uno de los proyectos fundacionales del Logos Collective. - -
- -### Motivo - -El panorama del almacenamiento remoto está dominado por un número cada vez menor de potencias de internet—Google, Microsoft, Amazon, etc. Si bien estos servicios obtienen altas puntuaciones en términos de experiencia de usuario y conveniencia, el almacenamiento de datos en la nube centralizada sufre de las siguientes desventajas: - -- Censura - -- Falta de propiedad de los datos - -- Brechas de seguridad y interrupciones - -- Alto costo - -Los proveedores de almacenamiento en la nube centralizado tienen un historial establecido de censura de datos y, como propietarios de facto de dichos datos, tienen el poder de hacerlo según sus propios estándares. Además, las plataformas centralizadas han sido víctimas de importantes filtraciones de datos e interrupciones del servicio en numerosas ocasiones. - -Tales incidentes han creado un hueco en el mercado para una alternativa descentralizada y resistente a la censura. Las redes existentes de almacenamiento y compartición de archivos entre pares abordan algunos de estos problemas—como la robustez frente a interrupciones de la red y una deseable resistencia a la censura. Sin embargo, sin incentivos adecuados y fuertes garantías de durabilidad de datos, no constituyen cimientos adecuados sobre los que construir aplicaciones verdaderamente imparables. - -Las soluciones de almacenamiento descentralizado existentes pretenden mejorar las primeras plataformas de compartición de archivos P2P como eDonkey y Gnutella. Sin embargo, el mercado todavía carece de una solución de almacenamiento descentralizado que sea eficiente en términos de uso de almacenamiento y ancho de banda, mientras ofrece garantías de rendimiento y durabilidad comparables a los incumbentes. - -
- -### Descentralizando el almacenamiento de datos - -Codex comenzó en 2021 para abordar la necesidad de una capa de almacenamiento durable y descentralizada para el stack tecnológico web3. - -El nombre "Codex" se refiere a una forma antigua de libro—una alusión a las garantías de durabilidad extremadamente robustas—99.99%—del motor de almacenamiento de datos. - -Codex fue anunciado como un protocolo central del Logos Collective en junio de 2023. - -### Red de pruebas - -Codex se encuentra actualmente en fase de red de pruebas. La implementación del cliente es software libre y abierto. Si estás interesado, te animamos a probar Codex, conectarte a la red de pruebas y experimentar con sus características. [Comienza aquí](./quick-start.md) \ No newline at end of file diff --git a/es/networks/networks.md b/es/networks/networks.md deleted file mode 100644 index 6e31990..0000000 --- a/es/networks/networks.md +++ /dev/null @@ -1,19 +0,0 @@ -# Redes Codex - -En Codex, estamos lanzando varias redes que se utilizan para diferentes propósitos -| Red | Estado | Blockchain | Propósito | -| ------------------ | ----------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| Devnet | :building_construction: | [Geth PoA](https://geth.ethereum.org/docs/fundamentals/private-network) | Dedicada a propósitos de desarrollo y siguiendo las últimas compilaciones de `master` | -| [Testnet](testnet) | :white_check_mark: | [Geth PoA](https://geth.ethereum.org/docs/fundamentals/private-network) | Una red pública para propósitos de prueba, siguiendo las últimas versiones | -| Mainnet | :construction: | :construction: | La red pública principal | - -Las principales diferencias entre las redes son las siguientes: -- Propósito de la red -- Nodos de arranque -- Número de nodos de almacenamiento -- Volumen de almacenamiento disponible -- Red blockchain -- Versión del contrato del mercado -- Conjunto de archivos de circuito utilizados para la verificación de pruebas - -La forma más fácil de comenzar a usar Codex es [Unirse a la Red de Pruebas](testnet). diff --git a/es/networks/testnet.md b/es/networks/testnet.md deleted file mode 100644 index 33b33af..0000000 --- a/es/networks/testnet.md +++ /dev/null @@ -1,203 +0,0 @@ ---- -outline: [2, 4] ---- -# Codex Testnet - -The Codex Testnet has been launched and is ready to be used for testing. - -Your participation in the Codex Testnet is subject to the [Codex Testnet Terms and Conditions](https://github.com/codex-storage/codex-testnet-starter/blob/master/Codex%20Testnet%20Terms%20and%20Conditions.pdf) and [Codex Testnet Privacy Policy](https://github.com/codex-storage/codex-testnet-starter/blob/master/Codex%20Testnet%20Privacy%20Policy.pdf). - -**Guides.** We have basic guides covering how to set up a Storage Client which can be used to upload and persist files by buying storage in the Codex network. We recommend that you start with those. - -Running a Storage Provider is more involved and is covered as a separate guide which demonstrates the storage sales side, as well as how to run Codex with its own local Ethereum execution client. - -Guides are available either on Discord, as step-by-step, interactive guides, or here as simple instructions that you can follow: - -- **Basic: running a storage client.** [[Discord](#sc-guide-discord) | [web](#sc-guide-web)] -- **Advanced: Running a storage provider.** [[web](#sp-guide-web)] - -The guides were tested on the following operating systems: - - - Linux: Ubuntu 24.04, Debian 12, Fedora 40 - - macOS: 15 - - Windows: 11, Server 2022 - -## Running a Storage Client (Discord Version) {#sc-guide-discord} - -You can join [Codex Discord server](https://discord.gg/codex-storage) and jump into the [#:tv:|join-testnet](https://discord.com/channels/895609329053474826/1289923125928001702) channel. - -It is mostly the same as a [Web guide](#sc-guide-web), but uses Discord capabilities so you can have an interactive, step-by-step guide, and you also can get a support in the [#:sos:|node-help](https://discord.com/channels/895609329053474826/1286205545837105224) channel. - -## Running a Storage Client (Web Version) {#sc-guide-web} - -**Prerequisites** - - - Access to your Internet router so you can [configure port forwarding](#basic-common) - -Steps for [Linux/macOS](#basic-linux-macos) and [Windows](#basic-windows) are slightly different, so please use ones for your OS. - -
- -### Linux/macOS {#basic-linux-macos} - -1. Download the master tarball from the Codex testnet starter repository, and untar its contents: - ```shell - curl -LO https://github.com/codex-storage/codex-testnet-starter/archive/master.tar.gz - tar xzvf master.tar.gz - rm master.tar.gz - ``` - -2. Navigate to the scripts folder: - ```shell - cd codex-testnet-starter-master/scripts - ``` - -3. Install dependencies when required: - ```shell - # Debian-based Linux - sudo apt update && sudo apt install libgomp1 - ``` - -4. Download Codex binaries from GitHub releases: - ```shell - ./download_online.sh - ``` - -5. Generate an ethereum keypair: - ```shell - ./generate.sh - ``` - Your private key will be saved to `eth.key` and address to `eth.address` file. - -6. Fill-up your address shown on the screen with the tokens: - - Use the web faucets to mint some [ETH](https://faucet-eth.testnet.codex.storage) and [TST](https://faucet-tst.testnet.codex.storage) tokens. - - We can also do this using Discord [# bot](https://discord.com/channels/895609329053474826/1230785221553819669) channel - - Use `/set ethaddress` command to enter your generated address - - Use `/mint` command to receive ETH and TST tokens - - Use `/balance` command to check if you have received test tokens successfully - -7. Run Codex node: - ```shell - ./run_client.sh - ``` - -8. Configure [port forwarding](#basic-common) and we are ready go to. - -### Windows {#basic-windows} - -1. Download the master tarball from the Codex testnet starter repository, and untar its contents: - > [!WARNING] - > Windows antivirus software and built-in firewalls may cause steps to fail. We will cover some possible errors here, but always consider checking your setup if requests fail - in particular, if temporarily disabling your antivirus fixes it, then it is likely to be the culprit. - - ```batch - curl -LO https://github.com/codex-storage/codex-testnet-starter/archive/master.tar.gz - ``` - - If you see an error like: - - ```batch - curl: (35) schannel: next InitializeSecurityContext failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012) - The revocation function was unable to check revocation for the certificate. - ``` - - You may need to add the `--ssl-no-revoke` option to your curl call, e.g.: - - ```batch - curl -LO --ssl-no-revoke https://github.com/codex-storage/codex-testnet-starter/archive/master.tar.gz - ``` - -1. Extract the contents of the tar file, and then delete it: - ```batch - tar xzvf master.tar.gz - del master.tar.gz - ``` - -2. Navigate to the scripts folder: - ```batch - cd codex-testnet-starter-master\scripts\windows - ``` - -3. Download Codex binaries from GitHub releases: - ```batch - download-online.bat - ``` - -4. Generate an ethereum keypair: - ```batch - generate.bat - ``` - Your private key will be saved to `eth.key` and address to `eth.address` file. - -5. Fill-up your address shown on the screen with the tokens: - - Use the web faucets to mint some [ETH](https://faucet-eth.testnet.codex.storage) and [TST](https://faucet-tst.testnet.codex.storage) tokens. - - We can also do this using Discord [# bot](https://discord.com/channels/895609329053474826/1230785221553819669) channel - - Use `/set ethaddress` command to enter your generated address - - Use `/mint` command to receive ETH and TST tokens - - Use `/balance` command to check if you have received test tokens successfully - -6. Run Codex node: - ```batch - run-client.bat - ``` - - 7. Configure [port forwarding](#basic-common) and we are ready go to. - -### All OS {#basic-common} - -Configure [port forwarding](https://en.wikipedia.org/wiki/Port_forwarding) on your Internet router -| # | Protocol | Port | Description | -| - | -------- | ------ | ----------------- | -| 1 | `UDP` | `8090` | `Codex Discovery` | -| 2 | `TCP` | `8070` | `Codex Transport` | - -After your node is up and running, you can use the [Codex API](/developers/api) to be able to interact with your Codex node, please check our [API walk-through](/learn/using) for more details. - -You also can use [Codex App UI](https://app.codex.storage) to interact with your local Codex node. - -Need help? Reach out to us in [#:sos:|node-help](https://discord.com/channels/895609329053474826/1286205545837105224) channel or check [troubleshooting guide](/learn/troubleshoot.md). - -## Running a Storage Provider (Web Version) {#sp-guide-web} - -Work in progress :construction: - -## Testnet Data - -### Bootstrap Nodes -**Codex** -```shell -spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P -spr:CiUIAhIhAyUvcPkKoGE7-gh84RmKIPHJPdsX5Ugm_IHVJgF-Mmu_EgIDARo8CicAJQgCEiEDJS9w-QqgYTv6CHzhGYog8ck92xflSCb8gdUmAX4ya78QoemesAYaCwoJBES39Q2RAnVOKkYwRAIgLi3rouyaZFS_Uilx8k99ySdQCP1tsmLR21tDb9p8LcgCIG30o5YnEooQ1n6tgm9fCT7s53k6XlxyeSkD_uIO9mb3 -spr:CiUIAhIhA6_j28xa--PvvOUxH10wKEm9feXEKJIK3Z9JQ5xXgSD9EgIDARo8CicAJQgCEiEDr-PbzFr74--85TEfXTAoSb195cQokgrdn0lDnFeBIP0QzOGesAYaCwoJBK6Kf1-RAnVEKkcwRQIhAPUH5nQrqG4OW86JQWphdSdnPA98ErQ0hL9OZH9a4e5kAiBBZmUl9KnhSOiDgU3_hvjXrXZXoMxhGuZ92_rk30sNDA -spr:CiUIAhIhA7E4DEMer8nUOIUSaNPA4z6x0n9Xaknd28Cfw9S2-cCeEgIDARo8CicAJQgCEiEDsTgMQx6vydQ4hRJo08DjPrHSf1dqSd3bwJ_D1Lb5wJ4Qt_CesAYaCwoJBEDhWZORAnVYKkYwRAIgFNzhnftocLlVHJl1onuhbSUM7MysXPV6dawHAA0DZNsCIDRVu9gnPTH5UkcRXLtt7MLHCo4-DL-RCMyTcMxYBXL0 -spr:CiUIAhIhAzZn3JmJab46BNjadVnLNQKbhnN3eYxwqpteKYY32SbOEgIDARo8CicAJQgCEiEDNmfcmYlpvjoE2Np1Wcs1ApuGc3d5jHCqm14phjfZJs4QrvWesAYaCwoJBKpA-TaRAnViKkcwRQIhANuMmZDD2c25xzTbKSirEpkZYoxbq-FU_lpI0K0e4mIVAiBfQX4yR47h1LCnHznXgDs6xx5DLO5q3lUcicqUeaqGeg -spr:CiUIAhIhAgybmRwboqDdUJjeZrzh43sn5mp8jt6ENIb08tLn4x01EgIDARo8CicAJQgCEiECDJuZHBuioN1QmN5mvOHjeyfmanyO3oQ0hvTy0ufjHTUQh4ifsAYaCwoJBI_0zSiRAnVsKkcwRQIhAJCb_z0E3RsnQrEePdJzMSQrmn_ooHv6mbw1DOh5IbVNAiBbBJrWR8eBV6ftzMd6ofa5khNA2h88OBhMqHCIzSjCeA -spr:CiUIAhIhAntGLadpfuBCD9XXfiN_43-V3L5VWgFCXxg4a8uhDdnYEgIDARo8CicAJQgCEiECe0Ytp2l-4EIP1dd-I3_jf5XcvlVaAUJfGDhry6EN2dgQsIufsAYaCwoJBNEmoCiRAnV2KkYwRAIgXO3bzd5VF8jLZG8r7dcLJ_FnQBYp1BcxrOvovEa40acCIDhQ14eJRoPwJ6GKgqOkXdaFAsoszl-HIRzYcXKeb7D9 -``` - -**Geth** -```shell -enode://cff0c44c62ecd6e00d72131f336bb4e4968f2c1c1abeca7d4be2d35f818608b6d8688b6b65a18f1d57796eaca32fd9d08f15908a88afe18c1748997235ea6fe7@159.223.243.50:40010 -enode://ea331eaa8c5150a45b793b3d7c17db138b09f7c9dd7d881a1e2e17a053e0d2600e0a8419899188a87e6b91928d14267949a7e6ec18bfe972f3a14c5c2fe9aecb@68.183.245.13:40030 -enode://4a7303b8a72db91c7c80c8fb69df0ffb06370d7f5fe951bcdc19107a686ba61432dc5397d073571433e8fc1f8295127cabbcbfd9d8464b242b7ad0dcd35e67fc@174.138.127.95:40020 -enode://36f25e91385206300d04b95a2f8df7d7a792db0a76bd68f897ec7749241b5fdb549a4eecfab4a03c36955d1242b0316b47548b87ad8291794ab6d3fecda3e85b@64.225.89.147:40040 -enode://2e14e4a8092b67db76c90b0a02d97d88fc2bb9df0e85df1e0a96472cdfa06b83d970ea503a9bc569c4112c4c447dbd1e1f03cf68471668ba31920ac1d05f85e3@170.64.249.54:40050 -enode://6eeb3b3af8bef5634b47b573a17477ea2c4129ab3964210afe3b93774ce57da832eb110f90fbfcfa5f7adf18e55faaf2393d2e94710882d09d0204a9d7bc6dd2@143.244.205.40:40060 -enode://6ba0e8b5d968ca8eb2650dd984cdcf50acc01e4ea182350e990191aadd79897801b79455a1186060aa3818a6bc4496af07f0912f7af53995a5ddb1e53d6f31b5@209.38.160.40:40070 -``` - -### Smart contracts - -| Contract | Address | -| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| Token | [`0x34a22f3911De437307c6f4485931779670f78764`](https://explorer.testnet.codex.storage/address/0x34a22f3911De437307c6f4485931779670f78764) | -| Verifier | [`0x02dd582726F7507D7d0F8bD8bf8053d3006F9092`](https://explorer.testnet.codex.storage/address/0x02dd582726F7507D7d0F8bD8bf8053d3006F9092) | -| Marketplace | [`0xAB03b6a58C5262f530D54146DA2a552B1C0F7648`](https://explorer.testnet.codex.storage/address/0xAB03b6a58C5262f530D54146DA2a552B1C0F7648) | - -### Endpoints - -| # | Service | URL | -| - | --------------- | ---------------------------------------------------------------------------- | -| 1 | Geth Public RPC | [rpc.testnet.codex.storage](https://rpc.testnet.codex.storage) | -| 2 | Block explorer | [explorer.testnet.codex.storage](https://explorer.testnet.codex.storage) | -| 3 | Faucet ETH | [faucet-eth.testnet.codex.storage](https://faucet-eth.testnet.codex.storage) | -| 4 | Faucet TST | [faucet-tst.testnet.codex.storage](https://faucet-tst.testnet.codex.storage) | -| 5 | Status page | [status.testnet.codex.storage](https://status.testnet.codex.storage) | diff --git a/index.md b/index.md index 0fcfc25..bf2f425 100644 --- a/index.md +++ b/index.md @@ -2,6 +2,9 @@ # https://vitepress.dev/reference/default-theme-home-page layout: home +# It would be great if the /versions/0.0.1 links below could somehow use +# LATEST_VERSION from versions.ts + hero: name: Codex text: Decentralised data storage platform @@ -9,18 +12,18 @@ hero: actions: - theme: brand text: What is Codex? - link: /learn/what-is-codex + link: ./versions/0.0.1/learn/what-is-codex - theme: alt text: Quick start - link: /learn/quick-start + link: ./versions/0.0.1/learn/quick-start features: - title: Learn details: Get more information about Codex - link: /learn/what-is-codex + link: ./versions/0.0.1/learn/what-is-codex icon: 📚 - title: Developers details: Build Codex - link: /developers/api + link: ./versions/0.0.1/developers/api icon: 🏗️ --- diff --git a/ko/codex/about.md b/ko/codex/about.md deleted file mode 100644 index d24d3e9..0000000 --- a/ko/codex/about.md +++ /dev/null @@ -1,3 +0,0 @@ -# Codex 소개 - -작업 진행 중 :construction: diff --git a/ko/codex/disclaimer.md b/ko/codex/disclaimer.md deleted file mode 100644 index 92afe67..0000000 --- a/ko/codex/disclaimer.md +++ /dev/null @@ -1,3 +0,0 @@ -# 면책 조항 - -Codex의 실행은 귀하의 책임 하에 이루어집니다. 따라서 당사는 귀하의 하드웨어, 소프트웨어, 데이터 또는 네트워크에 발생할 수 있는 어떠한 손상이나, 제공된 코드와 지침의 사용과 관련하여 발생하는 손실, 청구, 어떠한 성격의 손해 또는 기타 책임에 대해 책임지지 않으며 의무를 지지 않습니다. diff --git a/ko/codex/security.md b/ko/codex/security.md deleted file mode 100644 index c4d89b3..0000000 --- a/ko/codex/security.md +++ /dev/null @@ -1,7 +0,0 @@ -# 보안 - -Codex와 IFT 및 관련 기관에서는 보안을 매우 중요하게 생각합니다. - -보안 관련 사고는 security@free.technology를 통해 신고해 주시기 바랍니다. - -우리의 프로토콜과 소프트웨어가 안전하게 유지될 수 있도록 HackenProof의 바운티 프로그램을 통해 발견된 취약점을 신고해 주시기 바랍니다. diff --git a/ko/codex/terms-of-use.md b/ko/codex/terms-of-use.md deleted file mode 100644 index 2417a07..0000000 --- a/ko/codex/terms-of-use.md +++ /dev/null @@ -1,94 +0,0 @@ ---- -lastUpdated: false ---- -# 이용 약관 - -최종 업데이트: 2024년 2월 14일 - -본 웹사이트 이용 약관("**웹사이트 이용 약관**")은 귀하의 웹사이트 사용에 적용됩니다. 웹사이트를 사용함으로써 귀하는 본 웹사이트 이용 약관에 동의하게 됩니다. - -If you do not agree with these Website Terms of Use, you must not access or use the Website. - -### 1) Who we are - -For the purposes of these Website Terms of Use, the relevant entity is the Logos Collective Association, which has its registered office in Zug and its legal domicile address at: - -``` -Logos Collective Association -c/o PST Consulting GmbH -Baarerstrasse 10 -6300 Zug -Switzerland -``` - -Whenever we refer to "Logos", "we", "us" or any other similar references, we are referring to the Logos Collective Association. - -### 2) Disclaimers - -The Website is provided by us on an 'as is' basis and you use the Website at your own sole discretion and risk. - -We disclaim all warranties of any kind, express or implied, including without limitation the warranties of merchantability, fitness for a particular purpose, and non-infringement of intellectual property or other violation of rights. We do not warrant or make any representations concerning the completeness, accuracy, legality, utility, reliability, suitability or availability of the use of the Website, the content on this Website or otherwise relating to the Website, such content or on any sites linked to this site.These disclaimers will apply to the maximum extent permitted by applicable law. - -We make no claims that the Website or any of its content is accessible, legally compliant or appropriate in your jurisdiction. Your access or use of the Website is at your own sole discretion and you are solely responsible for complying with any applicable local laws. - -The content herein or as accessible through this website is intended to be made available for informational purposes only and should not be considered as creating any expectations or forming the basis of any contract, commitment or binding obligation with us. No information herein shall be considered to contain or be relied upon as a promise, representation, warranty or guarantee, whether express or implied and whether as to the past, present or the future in relation to the projects and matters described herein. - -The information contained herein does not constitute financial, legal, tax, or other advice and should not be treated as such. - -Nothing in this Website should be construed by you as an offer to buy or sell, or soliciting any offer to buy or sell any tokens or any security. - -### 3) Forward looking statements - -The Website may also contain forward-looking statements that are based on current expectations, estimates, forecasts, assumptions and projections about the technology, industry and markets in general. - -The forward looking statements, which may include statements about the roadmap, project descriptions, technical details, functionalities, features, the development and use of tokens by projects, and any other statements related to such matters or as accessible through this website are subject to a high degree of risk and uncertainty. The forward looking statements are subject to change based on, among other things, market conditions, technical developments, and regulatory environment. The actual development and results, including the order and the timeline, might vary from what's presented. The information contained herein is a summary and does not purport to be accurate, reliable or complete and we bear no responsibility for the accuracy, reliability or completeness of information contained herein. Because of the high degree of risk and uncertainty described above, you should not place undue reliance on any matters described in this website or as accessible through this website. - -While we aim to update our website regularly, all information, including the timeline and the specifics of each stage, is subject to change and may be amended or supplemented at any time, without notice and at our sole discretion. - -### 4) Intellectual property rights - -The Website and its contents are made available under Creative Commons Attribution 4.0 International license (CC-BY 4.0). In essence this licence allows users to copy, modify and distribute the content in any format for any purpose, including commercial use, subject to certain requirements such as attributing us. For the full terms of this licence, please refer to the following website: https://creativecommons.org/licenses/by/4.0/. - -### 5) Third party website links - -To the extent the Website provides any links to a third party website, then their terms and conditions, including privacy policies, govern your use of those third party websites. By linking such third party websites, Status does not represent or imply that it endorses or supports such third party websites or content therein, or that it believes such third party websites and content therein to be accurate, useful or non-harmful. We have no control over such third party websites and will not be liable for your use of or activities on any third party websites accessed through the Website. If you access such third party websites through the Website, it is at your own risk and you are solely responsible for your activities on such third party websites. - -### 6) Limitation of liability - -We will not be held liable to you under any contract, negligence, strict liability, or other legal or equitable theory for any lost profits, cost of procurement for substitute services, or any special, incidental, or consequential damages related to, arising from, or in any way connected with these Website Terms of Use, the Website, the content on the Website, or your use of the Website, even if we have been advised of the possibility of such damages. In any event, our aggregate liability for such claims is limited to EUR 100 (one hundred Euros). This limitation of liability will apply to the maximum extent permitted by applicable law. - -### 7) Indemnity - -You shall indemnify us and hold us harmless from and against any and all claims, damages and expenses, including attorneys' fees, arising from or related to your use of the Website, the content on the Website, including without limitation your violation of these Website Terms of Use. - -### 8) Modifications - -We may modify or replace any part of this Website Terms of Use at any time and without notice. You are responsible for checking the Website periodically for any changes. The new Website Terms of Use will be effective immediately upon its posting on the Website. - -### 9) Governing law - -Swiss law governs these Website Terms of Use and any disputes between you and us, whether in court or arbitration, without regard to conflict of laws provisions. - -### 10) Disputes - -In these terms, "dispute" has the broadest meaning enforceable by law and includes any claim you make against or controversy you may have in relation to these Website Terms of Use, the Website, the content on the Website, or your use of the Website. - -We prefer arbitration over litigation as we believe it meets our principle of resolving disputes in the most effective and cost effective manner. You are bound by the following arbitration clause, which waives your right to litigation and to be heard by a judge. Please note that court review of an arbitration award is limited. You also waive all your rights to a jury trial (if any) in any and all jurisdictions. - -If a (potential) dispute arises, you must first use your reasonable efforts to resolve it amicably with us. If these efforts do not result in a resolution of such dispute, you shall then send us a written notice of dispute setting out (i) the nature of the dispute, and the claim you are making; and (ii) the remedy you are seeking. - -If we and you are unable to further resolve this dispute within sixty (60) calendar days of us receiving this notice of dispute, then any such dispute will be referred to and finally resolved by you and us through an arbitration administered by the Swiss Chambers' Arbitration Institution in accordance with the Swiss Rules of International Arbitration for the time being in force, which rules are deemed to be incorporated herein by reference. The arbitral decision may be enforced in any court. The arbitration will be held in Zug, Switzerland, and may be conducted via video conference virtual/online methods if possible. The tribunal will consist of one arbitrator, and all proceedings as well as communications between the parties will be kept confidential. The language of the arbitration will be in English. Payment of all relevant fees in respect of the arbitration, including filing, administration and arbitrator fees will be in accordance with the Swiss Rules of International Arbitration. - -Regardless of any applicable statute of limitations, you must bring any claims within one year after the claim arose or the time when you should have reasonably known about the claim. You also waive the right to participate in a class action lawsuit or a classwide arbitration against us. - -### 11) About these Website Terms of Use - -These Website Terms of Use cover the entire agreement between you and us regarding the Website and supersede all prior and contemporaneous understandings, agreements, representations and warranties, both written and oral, with respect to the Website. - -The captions and headings identifying sections and subsections of these Website Terms of Use are for reference only and do not define, modify, expand, limit, or affect the interpretation of any provisions of these Website Terms of Use. - -If any part of these Website Terms of Use is held invalid or unenforceable, that part will be severable from these Website Terms of Use, and the remaining portions will remain in full force and effect. If we fail to enforce any of these Website Terms of Use, that does not mean that we have waived our right to enforce them. - -If you have any specific questions about these Website Terms of Use, please contact us at llegal@free.technology. - -This document is licensed under CC-BY-SA. diff --git a/ko/developers/api.md b/ko/developers/api.md deleted file mode 100644 index 31197cd..0000000 --- a/ko/developers/api.md +++ /dev/null @@ -1,5 +0,0 @@ -# Codex API - -Codex는 노드와 상호작용하기 위해 REST API를 사용하며, HTTP 클라이언트를 사용하여 상호작용 및 구성할 수 있습니다. - -API 명세는 [api.codex.storage](https://api.codex.storage)에서 확인할 수 있으며 [openapi.yaml](https://github.com/codex-storage/nim-codex/blob/master/openapi.yaml)을 기반으로 생성됩니다. 또한 [Postman 컬렉션](https://api.codex.storage/postman.json)도 제공합니다. diff --git a/ko/index.md b/ko/index.md deleted file mode 100644 index 7ab7bd5..0000000 --- a/ko/index.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -# https://vitepress.dev/reference/default-theme-home-page -layout: home - -hero: - name: Codex - text: 탈중앙 데이터 스토리지 플랫폼 - tagline: Codex는 전 세계 커뮤니티가 검열에 대한 위험 없이 중요한 지식을 보존할 수 있도록 지원하는 지속 가능하고 탈중앙화된 데이터 스토리지 프로토콜입니다. - actions: - - theme: brand - text: Codex란? - link: /ko/learn/what-is-codex - - theme: alt - text: 빠른 시작 - link: /ko/learn/quick-start - - theme: alt - text: Codex 테스트넷 참여하기 - link: /ko/networks/testnet - -features: - - title: 학습 - details: Codex에 대해 자세히 알아보기 - link: /ko/learn/what-is-codex - icon: 📚 - - title: 네트워크 - details: 저장소 운영자 또는 구매자로서 Codex 네트워크에 참여 - link: /ko/networks/networks - icon: 🚦 - - title: 개발자 - details: Codex로 빌드하기 - link: /ko/developers/api - icon: 🏗️ ---- diff --git a/ko/learn/architecture.md b/ko/learn/architecture.md deleted file mode 100644 index 308ce13..0000000 --- a/ko/learn/architecture.md +++ /dev/null @@ -1,95 +0,0 @@ -# 설명 및 아키텍처 - -Codex는 완전히 탈중앙화된 형태의 내구성 높은 데이터 저장 엔진을 구축하고 있으며, Web3 애플리케이션에 대해 손상 및 검열 저항성을 제공합니다. Codex는 저장된 데이터에 대해 호스트에게는 **그럴듯한 부인 가능성**(plausible deniability)을, 클라이언트에게는 최대 **99.99%의 입증 가능한 내구성 보장**을 제공함으로써 네트워크 참여자들을 근본적으로 보호합니다. 이 모든 기능은 저장 효율성과 대역폭 효율성도 유지하면서 구현됩니다. - -다음의 네 가지 핵심 기능은 Codex를 기존의 분산 스토리지 프로젝트들과 차별화합니다: - -- **이레이저 코딩(Erasure coding):** 데이터 중복성을 효율적으로 제공하여 내구성 보장을 향상시킵니다. - -- **제로 지식 기반 데이터 복구 증명(ZK-based proof-of-retrievability):** 가볍고 효율적인 데이터 내구성 검증을 가능하게 합니다. - -- **지연 복구 메커니즘(Lazy repair mechanism):** 효율적인 데이터 복구 및 손실 방지를 지원합니다. - -- **인센티브 설계(Incentivization):** 합리적인 행동을 유도하고, 네트워크 참여를 확대하며, 제한된 네트워크 자원의 효율적인 활용을 장려합니다. - -### 인센티브 기반 탈중앙화 - -기존 파일 공유 네트워크에서는 인센티브 메커니즘이 핵심적으로 부족한 요소 중 하나입니다. Codex는 견고한 **마켓플레이스 기반 인센티브 구조**를 통해 아래에 설명된 다양한 노드 유형 전반에 걸쳐 **광범위한 참여를 유도할 수 있다**고 믿습니다. - -적절한 인센티브 구조의 개발은 다음과 같은 목표를 바탕으로 추진됩니다: - -- **수요와 공급을 조율**하여 네트워크 자원의 최적 사용을 유도 -- 각 노드가 **자신의 경쟁력을 활용해 수익을 극대화**할 수 있도록 하여 참여를 증가 -- **스팸을 방지하고 악의적인 참여를 억제** - -Codex의 인센티브 구조는 아직 최종 확정되지는 않았지만, 데이터를 저장하고자 하는 참여자들과, 저장 공간을 제공하며 **담보를 걸고 공개 저장 계약에 입찰하는 제공자들**로 구성된 마켓플레이스를 중심으로 운영될 예정입니다. 이 구조는 참여자들의 인센티브를 자연스럽게 정렬시켜, Codex가 설계 의도대로 작동하도록 하는 것을 목표로 합니다. - -### 네트워크 아키텍처 - -Codex는 여러 유형의 노드로 구성되어 있으며, 각 노드는 네트워크 운영에서 서로 다른 역할을 수행합니다. 이에 따라 노드 유형별로 요구되는 하드웨어 사양도 달라져, 자원이 제한된 장치에서도 네트워크 참여가 가능하도록 설계되어 있습니다. - -**스토리지 노드(Storage nodes)** - -스토리지 노드는 Codex에서 장기적으로 신뢰할 수 있는 저장 공간을 제공하는 역할을 합니다. 이들은 계약 요청 측에서 게시한 담보금과 계약이 갖는 슬롯 수에 따라 **담보를 예치**하며, 이는 사용자가 요구하는 내구성 수준과 직접적으로 연결되어 있습니다. -스토리지 노드는 **정기적으로 데이터 보유 증명을 제출해야** 하며, 이를 이행하지 못할 경우 **패널티**(slashing)가 부과됩니다. - -**애그리게이터 노드(Aggregator Node)** - -리소스가 제한된 클라이언트 노드가 **이레이저 코딩**, **증명 생성**, **증명 집계 작업을 위임**할 수 있도록 하는 방식입니다. 현재 개발 중이며, 내년 2분기 또는 4분기 Codex의 향후 릴리스에 포함될 예정입니다. - -**클라이언트 노드(Client nodes)** - -클라이언트 노드는 **다른 노드에게 데이터를 저장, 검색, 전송하도록 요청**하는 역할을 합니다. Codex 네트워크의 대부분은 클라이언트 노드로 구성되며, 이들은 네트워크 자원 소비에 따른 비용을 상쇄하기 위해 **캐싱 노드 역할을 병행**할 수 있습니다. - -노드가 저장 계약에 참여하고 사용자가 데이터를 업로드하면, **네트워크는 해당 스토리지 노드가 온라인 상태이며 데이터가 검색 가능한지 사전 검증**을 수행합니다. 이후 계약 기간과 Codex 프로토콜이 보장하는 검색 가능성(9’s of retrievability)에 따라, **스토리지 노드는 무작위로 선택되어 정기적으로 데이터 보유 증명을 브로드캐스트**해야 합니다. - -스토리지 노드가 유효하지 않은 증명을 제출하거나 기한 내 제출에 실패할 경우, 네트워크는 해당 노드를 슬롯에서 제거하고, **해당 슬롯에 대해 유효한 증명을 가장 먼저 생성한 노드**가 그 자리를 차지하게 됩니다. - -계약이 다시 게시될 때, 문제가 있던 노드가 예치한 담보금 일부는 **새로운 스토리지 노드의 대역폭 비용**을 충당하는 데 사용됩니다. 또한 **이레이저 코딩은 복구 스킴을 보완하여**, 동일한 저장 계약 내의 무결한 노드가 보유한 다른 슬롯의 데이터를 통해 **손실된 조각을 재구성**할 수 있도록 합니다. - -![architect](/learn/architecture.png) - -### 마켓플레이스 아키텍처 - -Codex의 마켓플레이스는 **온체인에 배포된 스마트 계약**과, 노드 소프트웨어에 포함된 **구매 및 판매 모듈**로 구성됩니다. - -구매 모듈은 스마트 계약에 **스토리지 요청을 게시하는 역할**을 하며, 판매 모듈은 스토리지 제공자가 **관심 있는 요청을 선택**할 수 있도록 돕는 기능입니다. - -#### 스마트 계약 - -스마트 계약은 **스토리지 제공자와 클라이언트를 연결**해주는 역할을 합니다. - -스토리지 클라이언트는 특정 기간 동안 특정 용량의 저장 공간을 요청할 수 있으며, 이 요청은 온체인에 게시되어 스토리지 제공자가 이를 확인하고. 요청된 슬롯을 채울지 결정할 수 있도록 합니다. - -스토리지 요청의 주요 파라미터는 다음과 같습니다: - -- 요청된 저장 용량 (바이트 단위) -- 저장될 데이터의 콘텐츠 식별자(CID) -- 데이터가 저장되어야 하는 기간 -- 슬롯 개수 (이레이저 코딩 파라미터 기반) -- 저장 공간에 대해 지불할 토큰 수량 - -프로토콜 차원에서 스토리지 클라이언트는 위의 파라미터를 **자유롭게 설정**할 수 있으며, 데이터의 특성에 맞는 내구성을 선택하거나, 변화하는 스토리지 가격에 대응할 수 있습니다. - -Codex 위에 구축된 애플리케이션은 사용자가 올바른 파라미터를 선택할 수 있도록 가이드할 수 있으며, 이는 이더리움 지갑이 가스 요금을 추천하는 방식과 유사합니다. - -스마트 계약은 스토리지 제공자가 **약속한 대로 서비스를 이행하는지도 검증**합니다. 스토리지 제공자는 슬롯을 채우기로 약속할 때 **담보금을 예치**해야 하며, 정기적으로 **스토리지 증명**을 스마트 계약에 제출해야 합니다(직접 또는 애그리게이터를 통해 가능). 이를 반복적으로 실패할 경우 담보금은 몰수되며, 해당 슬롯은 다른 스토리지 제공자에게 이전됩니다. - -또한 스마트 계약은 특정 스토리지 제공자가 언제 스토리지 증명을 제출해야 하는지를 **지정**합니다. 이 시점은 고정된 주기로 정해지지 않으며, **무작위적으로 결정**되어 스토리지 제공자가 다음 증명 시점을 예측할 수 없도록 합니다. - -#### 구매(Purchasing) - -노드 소프트웨어 내의 **구매 모듈**은 노드 운영자를 대신하여 스마트 계약과 상호작용합니다. 이 모듈은 **스토리지 요청을 게시**하고, 요청이 유효한 동안 필요한 기타 상호작용도 처리합니다. 예를 들어, **관심 있는 스토리지 제공자가 충분하지 않아 요청이 취소될 경우**, 구매 모듈은 해당 요청에 할당되었던 토큰을 **회수**할 수 있습니다. - -#### 판매(Sales) - -**판매 모듈**은 구매 모듈의 상대 역할로, 스마트 계약을 **모니터링하여 새로운 스토리지 요청이 등록되는 것을 감지**합니다. -이 모듈은 자신이 수락할 수 있는 **가장 유망한 요청 목록**을 유지하며, 보상은 높고 담보 요구는 낮은 요청을 **우선적으로 선택**합니다. - -적절한 요청을 찾으면, 해당 데이터를 **다운로드**, **스토리지 증명 생성**, **스마트 계약에 증명 게시**의 절차를 거쳐 슬롯을 우선적으로 예약하고 채우려 시도합니다. 이후에는 스마트 계약을 계속 모니터링하며 요구될 때마다 스토리지 증명을 제출합니다. - -판매 모듈은 어떤 스토리지 요청에 관심을 가질지 결정하는 **베스트 에포트(best-effort)** 전략을 따릅니다. 시간이 지남에 따라, **대형 제공자**와 **개인 홈 서버 운영자**와 같은 다양한 유형의 운영자 요구에 맞춘 보다 **전문화된 전략들이 등장할 것으로 기대**됩니다. - -### 백서 - -[Codex 백서](/learn/whitepaper)에서 더 자세한 내용을 확인해 보세요. diff --git a/ko/learn/build.md b/ko/learn/build.md deleted file mode 100644 index b558e78..0000000 --- a/ko/learn/build.md +++ /dev/null @@ -1,241 +0,0 @@ -# Build Codex - -## Table of Contents - -- [Install developer tools](#prerequisites) - - [Linux](#linux) - - [macOS](#macos) - - [Windows + MSYS2](#windows-msys2) - - [Other](#other) -- [Clone and prepare the Git repository](#repository) -- [Build the executable](#executable) -- [Run the example](#example-usage) - -**Optional** -- [Run the tests](#tests) - -## Prerequisites - -To build nim-codex, developer tools need to be installed and accessible in the OS. - -Instructions below correspond roughly to environmental setups in nim-codex's [CI workflow](https://github.com/codex-storage/nim-codex/blob/master/.github/workflows/ci.yml) and are known to work. - -Other approaches may be viable. On macOS, some users may prefer [MacPorts](https://www.macports.org/) to [Homebrew](https://brew.sh/). On Windows, rather than use MSYS2, some users may prefer to install developer tools with [winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/), [Scoop](https://scoop.sh/), or [Chocolatey](https://chocolatey.org/), or download installers for e.g. Make and CMake while otherwise relying on official Windows developer tools. Community contributions to these docs and our build system are welcome! - -### Rust - -The current implementation of Codex's zero-knowledge proving circuit requires the installation of rust v1.79.0 or greater. Be sure to install it for your OS and add it to your terminal's path such that the command `cargo --version` gives a compatible version. - -### Linux - -> [!WARNING] -> Linux builds currently require gcc $\leq$ 13. If this is not an option in your -> system, you can try [building within Docker](#building-within-docker) as a workaround. - -*Package manager commands may require `sudo` depending on OS setup.* - -On a bare bones installation of Debian (or a distribution derived from Debian, such as Ubuntu), run - -```shell -apt-get update && apt-get install build-essential cmake curl git rustc cargo -``` - -Non-Debian distributions have different package managers: `apk`, `dnf`, `pacman`, `rpm`, `yum`, etc. - -For example, on a bare bones installation of Fedora, run - -```shell -dnf install @development-tools cmake gcc-c++ rust cargo -``` - -In case your distribution does not provide required Rust version, we may install it using [rustup](https://www.rust-lang.org/tools/install) -```shell -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- --default-toolchain=1.79.0 -y - -. "$HOME/.cargo/env" -``` - -Note that you will currently not be able to build Codex with gcc 14. To verify that -you have a supported version, run: - -```shell -gcc --version -``` - -If you get a number that starts with 14 (e.g. `14.2.0`), then you need to either -downgrade, or try a workaround like [building within Docker](#building-within-docker). - -### macOS - -Install the [Xcode Command Line Tools](https://mac.install.guide/commandlinetools/index.html) by opening a terminal and running -```shell -xcode-select --install -``` - -Install [Homebrew (`brew`)](https://brew.sh/) and in a new terminal run -```shell -brew install bash cmake rust -``` - -Check that `PATH` is setup correctly -```shell -which bash cmake - -# /usr/local/bin/bash -# /usr/local/bin/cmake -``` - -### Windows + MSYS2 - -*Instructions below assume the OS is 64-bit Windows and that the hardware or VM is [x86-64](https://en.wikipedia.org/wiki/X86-64) compatible.* - -Download and run the installer from [msys2.org](https://www.msys2.org/). - -Launch an MSYS2 [environment](https://www.msys2.org/docs/environments/). UCRT64 is generally recommended: from the Windows *Start menu* select `MSYS2 MinGW UCRT x64`. - -Assuming a UCRT64 environment, in Bash run -```shell -pacman -Suy -pacman -S base-devel git unzip mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-rust -``` - -We should downgrade GCC to version 13 [^gcc-14] -```shell -pacman -U --noconfirm \ - https://repo.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-gcc-13.2.0-6-any.pkg.tar.zst \ - https://repo.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-gcc-libs-13.2.0-6-any.pkg.tar.zst -``` - -#### Optional: VSCode Terminal integration - -You can link the MSYS2-UCRT64 terminal into VSCode by modifying the configuration file as shown below. -File: `C:/Users//AppData/Roaming/Code/User/settings.json` -```json -{ - ... - "terminal.integrated.profiles.windows": { - ... - "MSYS2-UCRT64": { - "path": "C:\\msys64\\usr\\bin\\bash.exe", - "args": [ - "--login", - "-i" - ], - "env": { - "MSYSTEM": "UCRT64", - "CHERE_INVOKING": "1", - "MSYS2_PATH_TYPE": "inherit" - } - } - } -} -``` - -### Other - -It is possible that nim-codex can be built and run on other platforms supported by the [Nim](https://nim-lang.org/) language: BSD family, older versions of Windows, etc. There has not been sufficient experimentation with nim-codex on such platforms, so instructions are not provided. Community contributions to these docs and our build system are welcome! - -## Repository - -In Bash run -```shell -git clone https://github.com/codex-storage/nim-codex.git repos/nim-codex && cd repos/nim-codex -``` - -nim-codex uses the [nimbus-build-system](https://github.com/status-im/nimbus-build-system), so next run -```shell -make update -``` - -This step can take a while to complete because by default it builds the [Nim compiler](https://nim-lang.org/docs/nimc.html). - -To see more output from `make` pass `V=1`. This works for all `make` targets in projects using the nimbus-build-system -```shell -make V=1 update -``` - -## Executable - -In Bash run -```shell -make -``` - -The default `make` target creates the `build/codex` executable. - -## Tools - -### Circuit download tool - -To build the circuit download tool located in `tools/cirdl` run: - -```shell -make cirdl -``` - -## Example usage - -See the instructions in the [Quick Start](/learn/quick-start). - -## Tests - -In Bash run -```shell -make test -``` - -### testAll - -#### Prerequisites - -To run the integration tests, an Ethereum test node is required. Follow these instructions to set it up. - -##### Windows (do this before 'All platforms') - -1. Download and install Visual Studio 2017 or newer. (Not VSCode!) In the Workloads overview, enable `Desktop development with C++`. ( https://visualstudio.microsoft.com ) - -##### All platforms - -1. Install NodeJS (tested with v18.14.0), consider using NVM as a version manager. [Node Version Manager (`nvm`)](https://github.com/nvm-sh/nvm#readme) -1. Open a terminal -1. Go to the vendor/codex-contracts-eth folder: `cd //vendor/codex-contracts-eth/` -1. `npm install` -> Should complete with the number of packages added and an overview of known vulnerabilities. -1. `npm test` -> Should output test results. May take a minute. - -Before the integration tests are started, you must start the Ethereum test node manually. -1. Open a terminal -1. Go to the vendor/codex-contracts-eth folder: `cd //vendor/codex-contracts-eth/` -1. `npm start` -> This should launch Hardhat, and output a number of keys and a warning message. - -#### Run - -The `testAll` target runs the same tests as `make test` and also runs tests for nim-codex's Ethereum contracts, as well a basic suite of integration tests. - -To run `make testAll`. - -Use a new terminal to run: -```shell -make testAll -``` - -## Building Within Docker - -For the specific case of Linux distributions which ship with gcc 14 -and a downgrade to 13 is not possible/desirable, building within a Docker -container and pulling the binaries out by copying or mounting remains an -option; e.g.: - -```bash= -# Clone original repo. -git clone https://github.com/codex-storage/nim-codex - -# Build inside docker -docker build -t codexstorage/nim-codex:latest -f nim-codex/docker/codex.Dockerfile nim-codex - -# Extract executable -docker create --name=codex-build codexstorage/nim-codex:latest -docker cp codex-build:/usr/local/bin/codex ./codex -docker cp codex-build:/usr/local/bin/cirdl ./cirdl -``` - -and voilà, you should have the binaries available in the current folder. diff --git a/ko/learn/download-flow.md b/ko/learn/download-flow.md deleted file mode 100644 index f8dec92..0000000 --- a/ko/learn/download-flow.md +++ /dev/null @@ -1,67 +0,0 @@ -# Download Flow -Sequence of interactions that result in dat blocks being transferred across the network. - -## Local Store -When data is available in the local blockstore, - -```mermaid -sequenceDiagram -actor Alice -participant API -Alice->>API: Download(CID) -API->>+Node/StoreStream: Retrieve(CID) -loop Get manifest block, then data blocks - Node/StoreStream->>NetworkStore: GetBlock(CID) - NetworkStore->>LocalStore: GetBlock(CID) - LocalStore->>NetworkStore: Block - NetworkStore->>Node/StoreStream: Block -end -Node/StoreStream->>Node/StoreStream: Handle erasure coding -Node/StoreStream->>-API: Data stream -API->>Alice: Stream download of block -``` - -## Network Store -When data is not found ih the local blockstore, the block-exchange engine is used to discover the location of the block within the network. Connection will be established to the node(s) that have the block, and exchange can take place. - -```mermaid -sequenceDiagram -box -actor Alice -participant API -participant Node/StoreStream -participant NetworkStore -participant Discovery -participant Engine -end -box -participant OtherNode -end -Alice->>API: Download(CID) -API->>+Node/StoreStream: Retrieve(CID) -Node/StoreStream->>-API: Data stream -API->>Alice: Download stream begins -loop Get manifest block, then data blocks - Node/StoreStream->>NetworkStore: GetBlock(CID) - NetworkStore->>Engine: RequestBlock(CID) - opt CID not known - Engine->>Discovery: Discovery Block - Discovery->>Discovery: Locates peers who provide block - Discovery->>Engine: Peers - Engine->>Engine: Update peers admin - end - Engine->>Engine: Select optimal peer - Engine->>OtherNode: Send WantHave list - OtherNode->>Engine: Send BlockPresence - Engine->>Engine: Update peers admin - Engine->>Engine: Decide to buy block - Engine->>OtherNode: Send WantBlock list - OtherNode->>Engine: Send Block - Engine->>NetworkStore: Block - NetworkStore->>NetworkStore: Add to Local store - NetworkStore->>Node/StoreStream: Resolve Block - Node/StoreStream->>Node/StoreStream: Handle erasure coding - Node/StoreStream->>API: Push data to stream -end -API->>Alice: Download stream finishes -``` diff --git a/ko/learn/local-marketplace.md b/ko/learn/local-marketplace.md deleted file mode 100644 index 6582faa..0000000 --- a/ko/learn/local-marketplace.md +++ /dev/null @@ -1,669 +0,0 @@ ---- -outline: [2, 3] ---- -# Running a Local Codex Network with Marketplace Support - -This tutorial will teach you how to run a small Codex network with the -_storage marketplace_ enabled; i.e., the functionality in Codex which -allows participants to offer and buy storage in a market, ensuring that -storage providers honor their part of the deal by means of cryptographic proofs. - -In this tutorial, you will: - -1. [Set Up a Geth PoA network](#_1-set-up-a-geth-poa-network); -2. [Set up The Marketplace](#_2-set-up-the-marketplace); -3. [Run Codex](#_3-run-codex); -4. [Buy and Sell Storage in the Marketplace](#_4-buy-and-sell-storage-on-the-marketplace). - -## Prerequisites - -To complete this tutorial, you will need: - -* the [geth](https://github.com/ethereum/go-ethereum) Ethereum client; - You need version `1.13.x` of geth as newer versions no longer support - Proof of Authority (PoA). This tutorial was tested using geth version `1.13.15`. -* a Codex binary, which [you can compile from source](https://github.com/codex-storage/nim-codex?tab=readme-ov-file#build-and-run). - -We will also be using [bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell)) -syntax throughout. If you use a different shell, you may need to adapt -things to your platform. - -To get started, create a new folder where we will keep the tutorial-related -files so that we can keep them separate from the codex repository. -We assume the name of the folder to be `marketplace-tutorial`. - -## 1. Set Up a Geth PoA Network - -For this tutorial, we will use a simple -[Proof-of-Authority](https://github.com/ethereum/EIPs/issues/225) network -with geth. The first step is creating a _signer account_: an account which -will be used by geth to sign the blocks in the network. -Any block signed by a signer is accepted as valid. - -### 1.1. Create a Signer Account - -To create a signer account, from the `marketplace-tutorial` directory run: - -```bash -geth account new --datadir geth-data -``` - -The account generator will ask you to input a password, which you can -leave blank. It will then print some information, -including the account's public address: - -```bash -INFO [09-29|16:49:24.244] Maximum peer count ETH=50 total=50 -Your new account is locked with a password. Please give a password. Do not forget this password. -Password: -Repeat password: - -Your new key was generated - -Public address of the key: 0x33A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB -Path of the secret key file: geth-data/keystore/UTC--2024-09-29T14-49-31.655272000Z--33a904ad57d0e2cb8ffe347d3c0e83c2e875e7db - -- You can share your public address with anyone. Others need it to interact with you. -- You must NEVER share the secret key with anyone! The key controls access to your funds! -- You must BACKUP your key file! Without the key, it's impossible to access account funds! -- You must REMEMBER your password! Without the password, it's impossible to decrypt the key! -``` - -In this example, the public address of the signer account is -`0x33A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB`. -Yours will print a different address. Save it for later usage. - -Next set an environment variable for later usage: - -```bash -export GETH_SIGNER_ADDR="0x0000000000000000000000000000000000000000" -echo ${GETH_SIGNER_ADDR} > geth_signer_address.txt -``` - -> Here make sure you replace `0x0000000000000000000000000000000000000000` -> with your public address of the signer account -> (`0x33A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB` in our example). - -### 1.2. Configure The Network and Create the Genesis Block - -The next step is telling geth what kind of network you want to run. -We will be running a [pre-merge](https://ethereum.org/en/roadmap/merge/) -network with Proof-of-Authority consensus. -To get that working, create a `network.json` file. - -If you set the `GETH_SIGNER_ADDR` variable above you can run the following -command to create the `network.json` file: - -```bash -echo "{\"config\": { \"chainId\": 12345, \"homesteadBlock\": 0, \"eip150Block\": 0, \"eip155Block\": 0, \"eip158Block\": 0, \"byzantiumBlock\": 0, \"constantinopleBlock\": 0, \"petersburgBlock\": 0, \"istanbulBlock\": 0, \"berlinBlock\": 0, \"londonBlock\": 0, \"arrowGlacierBlock\": 0, \"grayGlacierBlock\": 0, \"clique\": { \"period\": 1, \"epoch\": 30000 } }, \"difficulty\": \"1\", \"gasLimit\": \"8000000\", \"extradata\": \"0x0000000000000000000000000000000000000000000000000000000000000000${GETH_SIGNER_ADDR:2}0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\", \"alloc\": { \"${GETH_SIGNER_ADDR}\": { \"balance\": \"10000000000000000000000\"}}}" > network.json -``` - -You can also manually create the file remembering update it with your -signer public address: - -```json -{ - "config": { - "chainId": 12345, - "homesteadBlock": 0, - "eip150Block": 0, - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "berlinBlock": 0, - "londonBlock": 0, - "arrowGlacierBlock": 0, - "grayGlacierBlock": 0, - "clique": { - "period": 1, - "epoch": 30000 - } - }, - "difficulty": "1", - "gasLimit": "8000000", - "extradata": "0x000000000000000000000000000000000000000000000000000000000000000033A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "alloc": { - "0x33A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB": { - "balance": "10000000000000000000000" - } - } -} -``` - -Note that the signer account address is embedded in two different places: -* inside of the `"extradata"` string, surrounded by zeroes and stripped of - its `0x` prefix; -* as an entry key in the `alloc` session. - Make sure to replace that ID with the account ID that you wrote down in - [Step 1.1](#_1-1-create-a-signer-account). - -Once `network.json` is created, you can initialize the network with: - -```bash -geth init --datadir geth-data network.json -``` - -The output of the above command you may include some warnings, like: - -```bash -WARN [08-21|14:48:12.305] Unknown config environment variable envvar=GETH_SIGNER_ADDR -``` - -or even errors when running the command for the first time: - -```bash -ERROR[08-21|14:48:12.399] Head block is not reachable -``` - -The important part is that at the end you should see something similar to: - -```bash -INFO [08-21|14:48:12.639] Successfully wrote genesis state database=lightchaindata hash=768bf1..42d06a -``` - -### 1.3. Start your PoA Node - -We are now ready to start our $1$-node, private blockchain. -To launch the signer node, open a separate terminal in the same working -directory and make sure you have the `GETH_SIGNER_ADDR` set. -For convenience use the `geth_signer_address.txt`: - -```bash -export GETH_SIGNER_ADDR=$(cat geth_signer_address.txt) -``` - -Having the `GETH_SIGNER_ADDR` variable set, run: - -```bash -geth\ - --datadir geth-data\ - --networkid 12345\ - --unlock ${GETH_SIGNER_ADDR}\ - --nat extip:127.0.0.1\ - --netrestrict 127.0.0.0/24\ - --mine\ - --miner.etherbase ${GETH_SIGNER_ADDR}\ - --http\ - --allow-insecure-unlock -``` - -Note that, once again, the signer account created in -[Step 1.1](#_1-1-create-a-signer-account) appears both in -`--unlock` and `--allow-insecure-unlock`. - -Geth will prompt you to insert the account's password as it starts up. -Once you do that, it should be able to start up and begin "mining" blocks. - -Also here, you may encounter errors like: - -```bash -ERROR[08-21|15:00:27.625] Bootstrap node filtered by netrestrict id=c845e51a5e470e44 ip=18.138.108.67 -ERROR[08-21|15:00:27.625] Bootstrap node filtered by netrestrict id=f23ac6da7c02f84a ip=3.209.45.79 -ERROR[08-21|15:00:27.625] Bootstrap node filtered by netrestrict id=ef2d7ab886910dc8 ip=65.108.70.101 -ERROR[08-21|15:00:27.625] Bootstrap node filtered by netrestrict id=6b36f791352f15eb ip=157.90.35.166 -``` - -You can safely ignore them. - -If the command above fails with: - -```bash -Fatal: Failed to register the Ethereum service: only PoS networks are supported, please transition old ones with Geth v1.13.x -``` - -make sure, you are running the correct Geth version -(see Section [Prerequisites](#prerequisites)) - -## 2. Set Up The Marketplace - -You will need to open new terminal for this section and geth needs to be -running already. Setting up the Codex marketplace entails: - -1. Deploying the Codex Marketplace contracts to our private blockchain -2. Setup Ethereum accounts we will use to buy and sell storage in - the Codex marketplace -3. Provisioning those accounts with the required token balances - -### 2.1. Deploy the Codex Marketplace Contracts - -Make sure you leave the `marketplace-tutorial` directory, and clone -the `codex-storage/nim-codex.git`: - -```bash -git clone https://github.com/codex-storage/nim-codex.git -``` - -> If you just want to clone the repo to run the tutorial, you can -> skip the history and just download the head of the master branch by using -> `--depth 1` option: `git clone --depth 1 https://github.com/codex-storage/nim-codex.git` - -Thus, our directory structure for the purpose of this tutorial looks like this: - -```bash -| -|-- nim-codex -└-- marketplace-tutorial -``` - -> You could clone the `codex-storage/nim-codex.git` to some other location. -> Just to keeps things nicely separated it is best to make sure that -> `nim-codex` is not under `marketplace-tutorial` directory. - -Now, from the `nim-codex` folder run: - -```bash -make update && make -``` - -> This may take a moment as it will also build the `nim` compiler. Be patient. - -Now, in order to start a local Ethereum network run: - -```bash -cd vendor/codex-contracts-eth -npm install -``` - -> While writing the document we used `node` version `v20.17.0` and -> `npm` version `10.8.2`. - -Before continuing you now must **wait until $256$ blocks are mined** -**in your PoAnetwork**, or deploy will fail. This should take about -$4$ minutes and $30$ seconds. You can check which block height you are -currently at by running the following command -**from the `marketplace-tutorial` folder**: - -```bash -geth attach --exec web3.eth.blockNumber ./geth-data/geth.ipc -``` - -once that gets past $256$, you are ready to go. - -To deploy contracts, from the `codex-contracts-eth` directory run: - -```bash -export DISTTEST_NETWORK_URL=http://localhost:8545 -npx hardhat --network codexdisttestnetwork deploy -``` - -If the command completes successfully, you will see the output similar -to this one: - -```bash -Deployed Marketplace with Groth16 Verifier at: -0xCf0df6C52B02201F78E8490B6D6fFf5A82fC7BCd -``` -> of course your address will be different. - -You are now ready to prepare the accounts. - -### 2.2. Generate the Required Accounts - -We will run $2$ Codex nodes: a **storage provider**, which will sell storage -on the network, and a **client**, which will buy and use such storage; -we therefore need two valid Ethereum accounts. We could create random -accounts by using one of the many tools available to that end but, since -this is a tutorial running on a local private network, we will simply -provide you with two pre-made accounts along with their private keys, -which you can copy and paste instead: - -First make sure you're back in the `marketplace-tutorial` folder and -not the `codex-contracts-eth` subfolder. Then set these variables: - -**Storage:** -```bash -export ETH_STORAGE_ADDR=0x45BC5ca0fbdD9F920Edd12B90908448C30F32a37 -export ETH_STORAGE_PK=0x06c7ac11d4ee1d0ccb53811b71802fa92d40a5a174afad9f2cb44f93498322c3 -echo $ETH_STORAGE_PK > storage.pkey && chmod 0600 storage.pkey -``` - -**Client:** -```bash -export ETH_CLIENT_ADDR=0x9F0C62Fe60b22301751d6cDe1175526b9280b965 -export ETH_CLIENT_PK=0x5538ec03c956cb9d0bee02a25b600b0225f1347da4071d0fd70c521fdc63c2fc -echo $ETH_CLIENT_PK > client.pkey && chmod 0600 client.pkey -``` - -### 2.3. Provision Accounts with Tokens - -We now need to transfer some ETH to each of the accounts, as well as provide -them with some Codex tokens for the storage node to use as collateral and -for the client node to buy actual storage. - -Although the process is not particularly complicated, I suggest you use -[the script we prepared](https://github.com/gmega/local-codex-bare/blob/main/scripts/mint-tokens.js) -for that. This script, essentially: - -1. reads the Marketplace contract address and its ABI from the deployment data; -2. transfers $1$ ETH from the signer account to a target account if the target - account has no ETH balance; -3. mints $n$ Codex tokens and adds it into the target account's balance. - -To use the script, just download it into a local file named `mint-tokens.js`, -for instance using `curl` (make sure you are in -the `marketplace-tutorial` directory): - -```bash -# download script -curl https://raw.githubusercontent.com/gmega/codex-local-bare/main/scripts/mint-tokens.js -o mint-tokens.js -``` - -Then run: - -```bash -# set the contract file location (we assume you are in the marketplace-tutorial directory) -export CONTRACT_DEPLOY_FULL="../nim-codex/vendor/codex-contracts-eth/deployments/codexdisttestnetwork" -export GETH_SIGNER_ADDR=$(cat geth_signer_address.txt) -# Installs Web3-js -npm install web3 -# Provides tokens to the storage account. -node ./mint-tokens.js $CONTRACT_DEPLOY_FULL/TestToken.json $GETH_SIGNER_ADDR 0x45BC5ca0fbdD9F920Edd12B90908448C30F32a37 10000000000 -# Provides tokens to the client account. -node ./mint-tokens.js $CONTRACT_DEPLOY_FULL/TestToken.json $GETH_SIGNER_ADDR 0x9F0C62Fe60b22301751d6cDe1175526b9280b965 10000000000 -``` - -If you get a message like - -```bash -Usage: mint-tokens.js -``` - -then you need to ensure you provided all the required arguments. -In particular you need to ensure that the `GETH_SIGNER_ADDR` env variable -holds the signer address (we used -`export GETH_SIGNER_ADDR=$(cat geth_signer_address.txt)` above to -make sure it is set). - -## 3. Run Codex - -With accounts and geth in place, we can now start the Codex nodes. - -### 3.1. Storage Node - -The storage node will be the one storing data and submitting the proofs of -storage to the chain. To do that, it needs access to: - -1. the address of the Marketplace contract that has been deployed to - the local geth node in [Step 2.1](#_2-1-deploy-the-codex-marketplace-contracts); -2. the sample ceremony files which are shipped in the Codex contracts repo - (`nim-codex/vendor/codex-contracts-eth`). - -**Address of the Marketplace Contract.** The contract address can be found -inside of the file `nim-codex/vendor/codex-contracts-eth/deployments/codexdisttestnetwork/Marketplace.json`. -We captured that location above in `CONTRACT_DEPLOY_FULL` variable, thus, from -the `marketplace-tutorial` folder just run: - -```bash -grep '"address":' ${CONTRACT_DEPLOY_FULL}/Marketplace.json -``` - -which should print something like: -```bash -"address": "0xCf0df6C52B02201F78E8490B6D6fFf5A82fC7BCd", -``` - -> This address should match the address we got earlier when deploying -> the Marketplace contract above. - -Then run the following with the correct market place address: -```bash -export MARKETPLACE_ADDRESS="0x0000000000000000000000000000000000000000" -echo ${MARKETPLACE_ADDRESS} > marketplace_address.txt -``` - -where you replace `0x0000000000000000000000000000000000000000` with -the Marketplace contract above in -[Step 2.1](#_2-1-deploy-the-codex-marketplace-contracts). - -**Prover ceremony files.** The ceremony files are under the -`nim-codex/vendor/codex-contracts-eth/verifier/networks/codexdisttestnetwork` -subdirectory. There are three of them: `proof_main.r1cs`, `proof_main.zkey`, -and `prooof_main.wasm`. We will need all of them to start the Codex storage node. - -**Starting the storage node.** Let: - -* `PROVER_ASSETS` contain the directory where the prover ceremony files are - located. **This must be an absolute path**; -* `CODEX_BINARY` contain the location of your Codex binary; -* `MARKETPLACE_ADDRESS` contain the address of the Marketplace contract - (we have already set it above). - -Set these paths into environment variables (make sure you are in -the `marketplace-tutorial` directory): - -```bash -export CONTRACT_DEPLOY_FULL=$(realpath "../nim-codex/vendor/codex-contracts-eth/deployments/codexdisttestnetwork") -export PROVER_ASSETS=$(realpath "../nim-codex/vendor/codex-contracts-eth/verifier/networks/codexdisttestnetwork/") -export CODEX_BINARY=$(realpath "../nim-codex/build/codex") -export MARKETPLACE_ADDRESS=$(cat marketplace_address.txt) -``` -> you may notice, that we have already set the `CONTRACT_DEPLOY_FULL` variable -> above. Here, we make sure it is an absolute path. - -To launch the storage node, run: - -```bash -${CODEX_BINARY}\ - --data-dir=./codex-storage\ - --listen-addrs=/ip4/0.0.0.0/tcp/8080\ - --api-port=8000\ - --disc-port=8090\ - persistence\ - --eth-provider=http://localhost:8545\ - --eth-private-key=./storage.pkey\ - --marketplace-address=${MARKETPLACE_ADDRESS}\ - --validator\ - --validator-max-slots=1000\ - prover\ - --circom-r1cs=${PROVER_ASSETS}/proof_main.r1cs\ - --circom-wasm=${PROVER_ASSETS}/proof_main.wasm\ - --circom-zkey=${PROVER_ASSETS}/proof_main.zkey -``` - -**Starting the client node.** - -The client node is started similarly except that: - -* we need to pass the SPR of the storage node so it can form a network with it; -* since it does not run any proofs, it does not require any ceremony files. - -We get the Signed Peer Record (SPR) of the storage node so we can bootstrap -the client node with it. To get the SPR, issue the following call: - -```bash -curl -H 'Accept: text/plain' 'http://localhost:8000/api/codex/v1/spr' --write-out '\n' -``` - -You should get the SPR back starting with `spr:`. - -Before you proceed, open new terminal, and enter `marketplace-tutorial` directory. - -Next set these paths into environment variables: - -```bash -# set the SPR for the storage node -export STORAGE_NODE_SPR=$(curl -H 'Accept: text/plain' 'http://localhost:8000/api/codex/v1/spr') -# basic vars -export CONTRACT_DEPLOY_FULL=$(realpath "../nim-codex/vendor/codex-contracts-eth/deployments/codexdisttestnetwork") -export CODEX_BINARY=$(realpath "../nim-codex/build/codex") -export MARKETPLACE_ADDRESS=$(cat marketplace_address.txt) -``` -and then run: - -```bash -${CODEX_BINARY}\ - --data-dir=./codex-client\ - --listen-addrs=/ip4/0.0.0.0/tcp/8081\ - --api-port=8001\ - --disc-port=8091\ - --bootstrap-node=${STORAGE_NODE_SPR}\ - persistence\ - --eth-provider=http://localhost:8545\ - --eth-private-key=./client.pkey\ - --marketplace-address=${MARKETPLACE_ADDRESS} -``` - -## 4. Buy and Sell Storage on the Marketplace - -Any storage negotiation has two sides: a buyer and a seller. -Therefore, before we can actually request storage, we must first offer -some of it for sale. - -### 4.1 Sell Storage - -The following request will cause the storage node to put out $50\text{MB}$ -of storage for sale for $1$ hour, at a price of $1$ Codex token -per slot per second, while expressing that it's willing to take at most -a $1000$ Codex token penalty for not fulfilling its part of the contract.[^1] - -```bash -curl 'http://localhost:8000/api/codex/v1/sales/availability' \ - --header 'Content-Type: application/json' \ - --data '{ - "totalSize": "50000000", - "duration": "3600", - "minPrice": "1", - "maxCollateral": "1000" -}' -``` - -This should return a JSON response containing an `id` (e.g. `"id": "0xb55b3bc7aac2563d5bf08ce8a177a38b5a40254bfa7ee8f9c52debbb176d44b0"`) -which identifies this storage offer. - -> To make JSON responses more readable, you can try -> [jq](https://jqlang.github.io/jq/) JSON formatting utility -> by just adding `| jq` after the command. -> On macOS you can install with `brew install jq`. - -To check the current storage offers for this node, you can issue: - -```bash -curl 'http://localhost:8000/api/codex/v1/sales/availability' -``` - -or with `jq`: - -```bash -curl 'http://localhost:8000/api/codex/v1/sales/availability' | jq -``` - -This should print a list of offers, with the one you just created figuring -among them (for our tutorial, there will be only one offer returned -at this time). - -### 4.2. Buy Storage - -Before we can buy storage, we must have some actual data to request -storage for. Start by uploading a small file to your client node. -On Linux (or macOS) you could, for instance, use `dd` to generate a $1M$ file: - -```bash -dd if=/dev/urandom of=./data.bin bs=1M count=1 -``` - -Assuming your file is named `data.bin`, you can upload it with: - -```bash -curl --request POST http://localhost:8001/api/codex/v1/data --header 'Content-Type: application/octet-stream' --write-out '\n' -T ./data.bin -``` - -Once the upload completes, you should see a _Content Identifier_, -or _CID_ (e.g. `zDvZRwzm2mK7tvDzKScRLapqGdgNTLyyEBvx1TQY37J2CdWdS6Sj`) -for the uploaded file printed to the terminal. -Use that CID in the purchase request: - -```bash -# make sure to replace the CID before with the CID you got in the previous step -export CID=zDvZRwzm2mK7tvDzKScRLapqGdgNTLyyEBvx1TQY37J2CdWdS6Sj -``` - -```bash -curl "http://localhost:8001/api/codex/v1/storage/request/${CID}" \ - --header 'Content-Type: application/octet-stream' \ - --data "{ - \"duration\": \"600\", - \"reward\": \"1\", - \"proofProbability\": \"3\", - \"expiry\": \"500\", - \"nodes\": 3, - \"tolerance\": 1, - \"collateral\": \"1000\" - }" \ - --write-out '\n' -``` - -The parameters under `--data` say that: - -1. we want to purchase storage for our file for $5$ minutes (`"duration": "600"`); -2. we are willing to pay up to $1$ token per slot per second (`"reward": "1"`) -3. our file will be split into three pieces (`"nodes": 3`). - Because we set `"tolerance": 1` we only need two (`nodes - tolerance`) - pieces to rebuild the file; i.e., we can tolerate that at most one node - stops storing our data; either due to failure or other reasons; -4. we demand `1000` tokens in collateral from storage providers for each piece. - Since there are $3$ such pieces, there will be `3000` in total collateral - committed by the storage provider(s) once our request is started. -5. finally, the `expiry` puts a time limit for filling all the slots by - the storage provider(s). If slot are not filled by the `expire` interval, - the request will timeout and fail. - -### 4.3. Track your Storage Requests - -POSTing a storage request will make it available in the storage market, -and a storage node will eventually pick it up. - -You can poll the status of your request by means of: -```bash -export STORAGE_PURCHASE_ID="1d0ec5261e3364f8b9d1cf70324d70af21a9b5dccba380b24eb68b4762249185" -curl "http://localhost:8001/api/codex/v1/storage/purchases/${STORAGE_PURCHASE_ID}" -``` - -For instance: - -```bash -> curl 'http://localhost:8001/api/codex/v1/storage/purchases/6c698cd0ad71c41982f83097d6fa75beb582924e08a658357a1cd4d7a2a6766d' -``` - -This returns a result like: - -```json -{ - "requestId": "0x86501e4677a728c6a8031971d09b921c3baa268af06b9f17f1b745e7dba5d330", - "request": { - "client": "0x9f0c62fe60b22301751d6cde1175526b9280b965", - "ask": { - "slots": 3, - "slotSize": "262144", - "duration": "1000", - "proofProbability": "3", - "reward": "1", - "collateral": "1", - "maxSlotLoss": 1 - }, - "content": { - "cid": "zDvZRwzkyw1E7ABaUSmgtNEDjC7opzhUoHo99Vpvc98cDWeCs47u" - }, - "expiry": "1711992852", - "nonce": "0x9f5e651ecd3bf73c914f8ed0b1088869c64095c0d7bd50a38fc92ebf66ff5915", - "id": "0x6c698cd0ad71c41982f83097d6fa75beb582924e08a658357a1cd4d7a2a6766d" - }, - "state": "submitted", - "error": null -} -``` - -Shows that a request has been submitted but has not yet been filled. -Your request will be successful once `"state"` shows `"started"`. -Anything other than that means the request has not been completely -processed yet, and an `"error"` state other than `null` means it failed. - -Well, it was quite a journey, wasn't it? You can congratulate yourself for -successfully finishing the codex marketplace tutorial! - -[^1]: Codex files get partitioned into pieces called "slots" and distributed -to various storage providers. The collateral refers to one such slot, -and will be slowly eaten away as the storage provider fails to deliver -timely proofs, but the actual logic is [more involved than that](https://github.com/codex-storage/codex-contracts-eth/blob/6c9f797f408608958714024b9055fcc330e3842f/contracts/Marketplace.sol#L209). diff --git a/ko/learn/local-two-client-test.md b/ko/learn/local-two-client-test.md deleted file mode 100644 index c3a2041..0000000 --- a/ko/learn/local-two-client-test.md +++ /dev/null @@ -1,235 +0,0 @@ -# Codex 두 클라이언트 테스트 - -두 클라이언트 테스트는 설정을 확인하고 Codex API에 익숙해지기 위해 수행할 수 있는 수동 테스트입니다. 이 단계들은 두 개의 노드를 실행하고 연결하여 하나에 파일을 업로드한 다음 다른 노드에서 해당 파일을 다운로드하는 과정을 안내합니다. 이 테스트에는 마켓플레이스 기능을 사용할 수 있도록 로컬 블록체인 노드를 실행하는 것도 포함됩니다. - -## Prerequisite - -Make sure you have [built the client](/learn/build) or obtained [compiled binary](/learn/quick-start#get-codex-binary). - -## Steps - -### 0. Setup blockchain node (optional) - -You need to have installed NodeJS and npm in order to spinup a local blockchain node. - -Go to directory `vendor/codex-contracts-eth` and run these two commands: -``` -npm ci -npm start -``` - -This will launch a local Ganache blockchain. - -### 1. Launch Node #1 - -Open a terminal and run: -- Mac/Linux: - ```shell - codex \ - --data-dir="$(pwd)/Data1" \ - --api-port=8080 \ - --disc-port=8090 \ - --listen-addrs="/ip4/127.0.0.1/tcp/8070" - ``` -- Windows: - ```batch - codex.exe ^ - --data-dir="Data1" ^ - --api-port=8080 ^ - --disc-port=8090 ^ - --listen-addrs="/ip4/127.0.0.1/tcp/8070" - ``` - -Optionally, if you want to use the Marketplace blockchain functionality, you need to also include these flags: `--persistence --eth-account=`, where `account` can be one following: - - - `0x70997970C51812dc3A010C7d01b50e0d17dc79C8` - - `0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC` - - `0x90F79bf6EB2c4f870365E785982E1f101E93b906` - - `0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65` - -**For each node use a different account!** - -| Argument | Description | -|----------------|-----------------------------------------------------------------------| -| `data-dir` | We specify a relative path where the node will store its data. | -| `listen-addrs` | Multiaddress where the node will accept connections from other nodes. | -| `api-port` | Port on localhost where the node will expose its API. | -| `disc-port` | Port the node will use for its discovery service. | -| `persistence` | Enables Marketplace functionality. Requires a blockchain connection. | -| `eth-account` | Defines which blockchain account the node should use. | - -Codex uses sane defaults for most of its arguments. Here we specify some explicitly for the purpose of this walk-through. - -### 2. Sign of life - -Run the command : - -```bash -curl -X GET http://127.0.0.1:8080/api/codex/v1/debug/info -``` - -This GET request will return the node's debug information. The response will be in JSON and should look like: - -```json -{ - "id": "16Uiu2HAmJ3TSfPnrJNedHy2DMsjTqwBiVAQQqPo579DuMgGxmG99", - "addrs": [ - "/ip4/127.0.0.1/tcp/8070" - ], - "repo": "/Users/user/projects/nim-codex/Data1", - "spr": "spr:CiUIAhIhA1AL2J7EWfg7x77iOrR9YYBisY6CDtU2nEhuwDaQyjpkEgIDARo8CicAJQgCEiEDUAvYnsRZ-DvHvuI6tH1hgGKxjoIO1TacSG7ANpDKOmQQ2MWasAYaCwoJBH8AAAGRAh-aKkYwRAIgB2ooPfAyzWEJDe8hD2OXKOBnyTOPakc4GzqKqjM2OGoCICraQLPWf0oSEuvmSroFebVQx-3SDtMqDoIyWhjq1XFF", - "announceAddresses": [ - "/ip4/127.0.0.1/tcp/8070" - ], - "table": { - "localNode": { - "nodeId": "f6e6d48fa7cd171688249a57de0c1aba15e88308c07538c91e1310c9f48c860a", - "peerId": "16Uiu2HAmJ3TSfPnrJNedHy2DMsjTqwBiVAQQqPo579DuMgGxmG99", - "record": "...", - "address": "0.0.0.0:8090", - "seen": false - }, - "nodes": [] - }, - "codex": { - "version": "untagged build", - "revision": "b3e626a5" - } -} -``` - -| Field | Description | -| ------------------- | ---------------------------------------------------------------------------------------- | -| `id` | Id of the node. Also referred to as 'peerId'. | -| `addrs` | Multiaddresses currently open to accept connections from other nodes. | -| `repo` | Path of this node's data folder. | -| `spr` | Signed Peer Record, encoded information about this node and its location in the network. | -| `announceAddresses` | Multiaddresses used for annoucning this node | -| `table` | Table of nodes present in the node's DHT | -| `codex` | Codex version information | - -### 3. Launch Node #2 - -We will need the signed peer record (SPR) from the first node that you got in the previous step. - -Replace `` in the following command with the SPR returned from the previous command, note that it should include the `spr:` at the beginning. - -Open a new terminal and run: -- Mac/Linux: - ```shell - codex \ - --data-dir="$(pwd)/Data2" \ - --api-port=8081 \ - --disc-port=8091 \ - --listen-addrs=/ip4/127.0.0.1/tcp/8071 \ - --bootstrap-node= - ``` -- Windows: - ``` - codex.exe ^ - --data-dir="Data2" ^ - --api-port=8081 ^ - --disc-port=8091 ^ - --listen-addrs=/ip4/127.0.0.1/tcp/8071 ^ - --bootstrap-node= - ``` - -Alternatively on Mac, Linux, or MSYS2 and a recent Codex binary you can run it in one command like: - -```shell -codex \ - --data-dir="$(pwd)/Data2" \ - --api-port=8081 \ - --disc-port=8091 \ - --listen-addrs=/ip4/127.0.0.1/tcp/8071 \ - --bootstrap-node=$(curl -H "Accept: text/plain" http://127.0.0.1:8080/api/codex/v1/spr) -``` - -Notice we're using a new data-dir, and we've increased each port number by one. This is needed so that the new node won't try to open ports already in use by the first node. - -We're now also including the `bootstrap-node` argument. This allows us to link the new node to another one, bootstrapping our own little peer-to-peer network. SPR strings always start with `spr:`. - -### 4. Connect The Two - -Normally the two nodes will automatically connect. If they do not automatically connect or you want to manually connect nodes you can use the peerId to connect nodes. - -You can get the first node's peer id by running the following command and finding the `"peerId"` in the results: - -```shell -curl -X GET \ - -H "Accept: text/plain" \ - http://127.0.0.1:8081/api/codex/v1/peerid -``` - -Next replace `` in the following command with the peerId returned from the previous command: - -```shell -curl -X GET \ - http://127.0.0.1:8080/api/codex/v1/connect/?addrs=/ip4/127.0.0.1/tcp/8071 -``` - -Alternatively on Mac, Linux, or MSYS2 and a recent Codex binary you can run it in one command like: - -```shell -curl -X GET \ - http://127.0.0.1:8080/api/codex/v1/connect/$(curl -X GET -H "Accept: text/plain" http://127.0.0.1:8081/api/codex/v1/peerid)\?addrs=/ip4/127.0.0.1/tcp/8071 -``` - -Notice that we are sending the "`peerId`" and the multiaddress of node 2 to the `/connect` endpoint of node 1. This provides node 1 all the information it needs to communicate with node 2. The response to this request should be `Successfully connected to peer`. - -### 5. Upload The File - -We're now ready to upload a file to the network. In this example we'll use node 1 for uploading and node 2 for downloading. But the reverse also works. - -Next replace `` with the path to the file you want to upload in the following command: - -```shell -curl -X POST \ - 127.0.0.1:8080/api/codex/v1/data \ - -H "Content-Type: application/octet-stream" \ - -H "Expect: 100-continue" \ - -T "" -``` -> [!TIP] -> If curl is reluctant to show you the response, add `-o ` to write the result to a file. - -Depending on the file size this may take a moment. Codex is processing the file by cutting it into blocks and generating erasure-recovery data. When the process is finished, the request will return the content-identifier (CID) of the uploaded file. It should look something like `zdj7WVxH8HHHenKtid8Vkgv5Z5eSUbCxxr8xguTUBMCBD8F2S`. - -### 6. Download The File - -Replace `` with the identifier returned in the previous step. Replace `` with the filename where you want to store the downloaded file: - -```bash -curl -X GET \ - 127.0.0.1:8081/api/codex/v1/data//network \ - -o -``` - -Notice we are connecting to the second node in order to download the file. The CID we provide contains the information needed to locate the file within the network. - -### 7. Verify The Results - -If your file is downloaded and identical to the file you uploaded, then this manual test has passed. Rejoice! If on the other hand that didn't happen or you were unable to complete any of these steps, please leave us a message detailing your troubles. - -## Notes - -When using the Ganache blockchain, there are some deviations from the expected behavior, mainly linked to how blocks are mined, which affects certain functionalities in the Sales module. -Therefore, if you are manually testing processes such as payout collection after a request is finished or proof submissions, you need to mine some blocks manually for it to work correctly. You can do this by using the following curl command: - -```shell -curl -X POST \ - 127.0.0.1:8545 \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"evm_mine","params":[],"id":67}' -``` - -## 알려진 문제점 - -요청이 완료된 후 지불금 수집이나 증명 제출과 같은 프로세스를 수동으로 테스트하는 경우, 제대로 작동하려면 수동으로 블록을 채굴해야 합니다. 다음 curl 명령을 사용하여 이 작업을 수행할 수 있습니다: - -```shell -curl -X POST \ - 127.0.0.1:8545 \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"evm_mine","params":[],"id":67}' -``` diff --git a/ko/learn/quick-start.md b/ko/learn/quick-start.md deleted file mode 100644 index 121ab2d..0000000 --- a/ko/learn/quick-start.md +++ /dev/null @@ -1,159 +0,0 @@ -# 빠른 시작 - -이 가이드를 통해 Codex를 실행하려면 다음 단계를 수행해야 합니다: - -- [면책 조항 검토](/codex/disclaimer) -- [Codex 바이너리 다운로드](#get-codex-binary) -- [Codex 실행하기](#run-codex) -- [Codex와 상호작용하기](#interact-with-codex) - -## Get Codex binary - -For quick a start we will use precompiled binaries from [GitHub release page](https://github.com/codex-storage/nim-codex/releases). If you prefer to compile from the sources, please check [Build Codex](/learn/build). - -Please follow the steps for your OS from the list: - -- [Linux/macOS](#linux-macos) -- [Windows](#windows) - -### Linux/macOS - -1. Install latest Codex release - - ```shell - curl -s https://get.codex.storage/install.sh | bash - ``` - -2. Install dependencies - - ```shell - # Debian-based Linux - sudo apt update && sudo apt install libgomp1 - ``` - -3. Check the result - ```shell - codex --version - ``` - -### Windows - -1. Install latest Codex release - - ```batch - curl -sO https://get.codex.storage/install.cmd && install.cmd - ``` - - > [!WARNING] - > Windows antivirus software and built-in firewalls may cause steps to fail. We will cover some possible errors here, but always consider checking your setup if requests fail - in particular, if temporarily disabling your antivirus fixes it, then it is likely to be the culprit. - - If you see an error like: - - ```batch - curl: (35) schannel: next InitializeSecurityContext failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012) - The revocation function was unable to check revocation for the certificate. - ``` - - You may need to add the `--ssl-no-revoke` option to your curl calls, i.e., modify the calls above so they look like this: - - ```batch - curl -LO --ssl-no-revoke https://... - ``` - -2. Update path using console output - - - Current session only - - ```batch - :: Default installation directory - set "PATH=%PATH%%LOCALAPPDATA%\Codex;" - ``` - - - Update PATH permanently - - Control Panel --> System --> Advanced System settings --> Environment Variables - - Alternatively, type `environment variables` into the Windows Search box - -3. Check the result - ```shell - codex --version - ``` - -## Run Codex - -We may [run Codex in different modes](/learn/run#run), and for a quick start we will run [Codex node](/learn/run#codex-node), to be able to share files in the network. - -1. Run Codex - - **Linux/macOS** - - ```shell - codex \ - --data-dir=datadir \ - --disc-port=8090 \ - --listen-addrs=/ip4/0.0.0.0/tcp/8070 \ - --nat=`curl -s https://ip.codex.storage` \ - --api-cors-origin="*" \ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P - ``` - - **Windows** - - > [!WARNING] - > Windows might at this stage prompt you to grant internet access to Codex. You must allow it for things to work. - > It also might be required to add incoming firewall rules for Codex and we can use `netsh` utility. - -
- add firewall rules using netsh - - ```batch - :: Add rules - netsh advfirewall firewall add rule name="Allow Codex (TCP-In)" protocol=TCP dir=in localport=8070 action=allow - netsh advfirewall firewall add rule name="Allow Codex (UDP-In)" protocol=UDP dir=in localport=8090 action=allow - - :: List rules - netsh advfirewall firewall show rule name=all | find /I "Codex" - - :: Delete rules - netsh advfirewall firewall delete rule name="Allow Codex (TCP-In)" - netsh advfirewall firewall delete rule name="Allow Codex (UDP-In)" - ``` - -
- - ```batch - :: Get Public IP - for /f "delims=" %a in ('curl -s --ssl-reqd ip.codex.storage') do set nat=%a - - :: Run Codex - codex ^ - --data-dir=datadir ^ - --disc-port=8090 ^ - --listen-addrs=/ip4/0.0.0.0/tcp/8070 ^ - --nat=%nat% ^ - --api-cors-origin="*" ^ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P - ``` - - > [!TIP] - > In the example above we use [Codex Testnet](/networks/testnet#bootstrap-nodes) bootstrap nodes and thus we join Testnet. If you would like to join a different network, please use [appropriate value](/networks/networks). - -2. Configure port-forwarding for the TCP/UDP ports on your Internet router - | Protocol | Service | Port | - | -------- | --------- | ------ | - | UDP | Discovery | `8090` | - | TCP | Transport | `8070` | - -If you would like to purchase or sell storage, please consider to run [Codex node with marketplace support](/learn/run#codex-node-with-marketplace-support) or [Codex storage node](/learn/run#codex-storage-node). - -## Interact with Codex - -When your Codex node is up and running you can interact with it using [Codex App UI](https://app.codex.storage) for files sharing. - -Also, you can interact with Codex using [Codex API](/developers/api) and for a walk-through of the API, consider following the [Using Codex](/learn/using) guide. - -## Stay in touch - -Want to stay up-date, or looking for further assistance? Try our [discord-server](https://discord.gg/codex-storage). - -Ready to explore Codex functionality? Please [Join Codex Testnet](/networks/testnet). - -If you want to run Codex locally without joining the Testnet, consider trying the [Codex Two-Client Test](/learn/local-two-client-test) or the [Running a Local Codex Network with Marketplace Support](/learn/local-marketplace). diff --git a/ko/learn/run.md b/ko/learn/run.md deleted file mode 100644 index 071d861..0000000 --- a/ko/learn/run.md +++ /dev/null @@ -1,563 +0,0 @@ ---- -outline: [2, 4] ---- -# Run Codex - -As for now, Codex is implemented only in [Nim](https://nim-lang.org) and can be found in [nim-codex](https://github.com/codex-storage/nim-codex) repository. - -It is a command-line application which may be run in a different ways: - - [Using binary](#using-binary) - - [Run as a service in Linux](#run-as-a-service-in-linux) - - [Run as a service in Windows](#run-as-a-service-in-windows) (not supported yet) - - [Using Docker](#using-docker) - - [Using Docker Compose](#using-docker-compose) - - [On Kubernetes](#on-kubernetes) - -During the run, it is required to pass [configuration](#configuration) option to the application, which can be done in a different ways. - -## Configuration - -It is possible to configure Codex node in several ways: - 1. [CLI options](#cli-options) - 2. [Environment variables](#environment-variables) - 3. [Configuration file](#configuration-file) - -The order of priority is the same as above: -[CLI options](#cli-options) --> [Environment variables](#environment-variables) --> [Configuration file](#configuration-file). - -### Common information - -#### Units - -For some configuration options, we can pass values in common units like following: -```shell ---cache-size=1m/1M/1mb/1MB ---storage-quota=2m/2M/2mb/2MB - ---block-mi=1s/1S/1m/1M/1h/1H/1d/1D/1w/1W ---block-ttl=2s/2S/2m/2M/2h/2H/2d/2D/2w/2W -``` - -#### Logging - -Codex uses [Chronicles](https://github.com/status-im/nim-chronicles) logging library, which allows great flexibility in working with logs. -Chronicles has the concept of topics, which categorize log entries into semantic groups. - -Using the `log-level` parameter, you can set the top-level log level like `--log-level="trace"`, but more importantly, -you can set log levels for specific topics like `--log-level="info; trace: marketplace,node; error: blockexchange"`, -which sets the top-level log level to `info` and then for topics `marketplace` and `node` sets the level to `trace` and so on. - -### CLI options - -```shell -codex --help - -Usage: - -codex [OPTIONS]... command - -The following options are available: - - --config-file Loads the configuration from a TOML file [=none]. - --log-level Sets the log level [=info]. - --metrics Enable the metrics server [=false]. - --metrics-address Listening address of the metrics server [=127.0.0.1]. - --metrics-port Listening HTTP port of the metrics server [=8008]. - -d, --data-dir The directory where codex will store configuration and data - [=/root/.cache/codex]. - -i, --listen-addrs Multi Addresses to listen on [=/ip4/0.0.0.0/tcp/0]. - -a, --nat NAT traversal method for determining the public address. - Options: any, none, upnp, pmp, extip: [any] - -u, --disc-port Discovery (UDP) port [=8090]. - --net-privkey Source of network (secp256k1) private key file path or name [=key]. - -b, --bootstrap-node Specifies one or more bootstrap nodes to use when connecting to the network. - --max-peers The maximum number of peers to connect to [=160]. - --num-threads Number of worker threads (\"0\" = use as many threads as there are CPU cores available). - --agent-string Node agent string which is used as identifier in network [=Codex]. - --api-bindaddr The REST API bind address [=127.0.0.1]. - -p, --api-port The REST Api port [=8080]. - --api-cors-origin The REST Api CORS allowed origin for downloading data. '*' will allow all - origins, '' will allow none. [=Disallow all cross origin requests to download - data]. - --repo-kind Backend for main repo store (fs, sqlite, leveldb) [=fs]. - -q, --storage-quota The size of the total storage quota dedicated to the node [=$DefaultQuotaBytes]. - -t, --block-ttl Default block timeout in seconds - 0 disables the ttl [=$DefaultBlockTtl]. - --block-mi Time interval in seconds - determines frequency of block maintenance cycle: how - often blocks are checked for expiration and cleanup - [=$DefaultBlockMaintenanceInterval]. - --block-mn Number of blocks to check every maintenance cycle [=1000]. - -c, --cache-size The size of the block cache, 0 disables the cache - might help on slow hardrives - [=0]. - -Available sub-commands: - -codex persistence [OPTIONS]... command - -The following options are available: - - --eth-provider The URL of the JSON-RPC API of the Ethereum node [=ws://localhost:8545]. - --eth-account The Ethereum account that is used for storage contracts. - --eth-private-key File containing Ethereum private key for storage contracts. - --marketplace-address Address of deployed Marketplace contract. - --validator Enables validator, requires an Ethereum node [=false]. - --validator-max-slots Maximum number of slots that the validator monitors [=1000]. - --reward-recipient Address to send payouts to (eg rewards and refunds). - --request-cache-size Maximum number of StorageRequests kept in memory. Reduces fetching of StorageRequest data from the contract. [=128]. - --max-priority-fee-per-gas Sets the default maximum priority fee per gas for Ethereum EIP-1559 transactions, in wei, when not provided by the network. - -Available sub-commands: - -codex persistence prover [OPTIONS]... - -The following options are available: - - -cd, --circuit-dir Directory where Codex will store proof circuit data - [=/root/.cache/codex/circuits]. - --circom-r1cs The r1cs file for the storage circuit - [=/root/.cache/codex/circuits/proof_main.r1cs]. - --circom-wasm The wasm file for the storage circuit - [=/root/.cache/codex/circuits/proof_main.wasm]. - --circom-zkey The zkey file for the storage circuit - [=/root/.cache/codex/circuits/proof_main.zkey]. - --circom-no-zkey Ignore the zkey file - use only for testing! [=false]. - --proof-samples Number of samples to prove [=5]. - --max-slot-depth The maximum depth of the slot tree [=32]. - --max-dataset-depth The maximum depth of the dataset tree [=8]. - --max-block-depth The maximum depth of the network block merkle tree [=5]. - --max-cell-elements The maximum number of elements in a cell [=67]. -``` - -### Environment variables - -In order to set a configuration option using environment variables, first find the desired [CLI option](#cli-options) -and then transform it in the following way: - - 1. prepend it with `CODEX_` - 2. make it uppercase - 3. replace `-` with `_` - -For example, to configure `--log-level`, use `CODEX_LOG_LEVEL` as the environment variable name. - -> [!WARNING] -> Some options can't be configured via environment variables for now [^multivalue-env-var] [^sub-commands]. - -### Configuration file - -A [TOML](https://toml.io/en/) configuration file can also be used to set configuration values. Configuration option names and corresponding values are placed in the file, separated by `=`. Configuration option names can be obtained from the [`codex --help`](#cli-options) command, and should not include the `--` prefix. For example, a node's log level (`--log-level`) can be configured using TOML as follows: - -```toml -log-level = "trace" -``` - -For option, like `bootstrap-node` and `listen-addrs` which accept multiple values we can specify data as an array -```toml -listen-addrs = [ - "/ip4/0.0.0.0/tcp/1234", - "/ip4/0.0.0.0/tcp/5678" -] -``` - -The Codex node can then read the configuration from this file using the `--config-file` CLI parameter, like: -```shell -codex --config-file=/path/to/your/config.toml -``` - -Please check [Run as a service in Linux](#run-as-a-service-in-linux) for a full example of configuration file. - -## Run - -### Using binary - -#### Codex node - -We can run Codex in a simple way like following: -```shell -codex -``` - -But, it will use a default `data-dir` value and we can pass a custom one: -```shell -codex --data-dir=datadir -``` - -This will run Codex as an isolated instance, and if we would like to join an existing network, it is required to pass a [bootstrap node](#codex-bootstrap-node). We can pass multiple nodes as well: -```shell -codex \ - --data-dir=datadir \ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P \ - --bootstrap-node=spr:CiUIAhIhAyUvcPkKoGE7-gh84RmKIPHJPdsX5Ugm_IHVJgF-Mmu_EgIDARo8CicAJQgCEiEDJS9w-QqgYTv6CHzhGYog8ck92xflSCb8gdUmAX4ya78QoemesAYaCwoJBES39Q2RAnVOKkYwRAIgLi3rouyaZFS_Uilx8k99ySdQCP1tsmLR21tDb9p8LcgCIG30o5YnEooQ1n6tgm9fCT7s53k6XlxyeSkD_uIO9mb3 -``` - -> [!IMPORTANT] -> Make sure you are using a proper value for the [network](/networks/networks) you would like to join. - -Also, to make your Codex node accessible for other network participants, it is required to specify a public IP address which can be used to access your node: -```shell -codex \ - --data-dir=datadir \ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P \ - --nat=any -``` - -> [!TIP] -> We can set public IP using curl and IP lookup service, like [ip.codex.storage](https://ip.codex.storage). -> In this case, you can override the IP by which your node annouces itself like this: `--nat=extip:1.2.3.4` - -After that, node will announce itself using your public IP, default UDP ([discovery](https://docs.libp2p.io/concepts/discovery-routing/overview/)) and dynamic TCP port ([data transfer](https://docs.libp2p.io/concepts/transports/overview/)), which can be adjusted in the following way: -```shell -codex \ - --data-dir=datadir \ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P \ - --nat=any \ - --disc-port=8090 \ - --listen-addrs=/ip4/0.0.0.0/tcp/8070 -``` - -In that way, node will announce itself using specified [multiaddress](https://docs.libp2p.io/concepts/fundamentals/addressing/) and we can check that via [API](https://api.codex.storage/#tag/Debug/operation/getDebugInfo) call: -```shell -curl -s localhost:8080/api/codex/v1/debug/info | jq -r '.announceAddresses' -``` -```json -[ - "/ip4//tcp/8070" -] -``` -Basically, for P2P communication we should specify and configure two ports: -| # | Protocol | Function | CLI option | Example | -| - | -------- | ------------------------------------------------------------------------ | ---------------- | -------------------------------------- | -| 1 | UDP | [Discovery](https://docs.libp2p.io/concepts/discovery-routing/overview/) | `--disc-port` | `--disc-port=8090` | -| 2 | TCP | [Transport](https://docs.libp2p.io/concepts/transports/overview/) | `--listen-addrs` | `--listen-addrs=/ip4/0.0.0.0/tcp/8070` | - -And, also it is required to setup [port-forwarding](#port-forwarding) on your Internet router, to make your node accessible for participants. - -So, a fully working basic configuration will looks like following: -```shell -codex \ - --data-dir=datadir \ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P \ - --nat=any \ - --disc-port=8090 \ - --listen-addrs=/ip4/0.0.0.0/tcp/8070 \ - --api-cors-origin="*" -``` - -After node is up and running and port-forwarding configurations was done, we should be able to [Upload a file](/learn/using#upload-a-file)/[Download a file](/learn/using#download-a-file) in the network using [API](/developers/api). - -You also can use [Codex App UI](https://app.codex.storage) for files upload/download. - -#### Codex bootstrap node - -If you need an SPR to bootstrap your own node, go to [network](/networks/networks) and select which network you'd like to join. - -Bootstrap nodes are used just to help peers with the initial nodes discovery and we need to run Codex with just some basic options: -```shell -codex \ - --data-dir=datadir \ - --nat=any \ - --disc-port=8090 -``` - -To get bootstrap node SPR from your local node, we can use [API](https://api.codex.storage/#tag/Debug/operation/getDebugInfo) call: -```shell -curl -s localhost:8080/api/codex/v1/debug/info | jq -r '.spr' -``` -```shell -spr:CiUIAhIhApd79-AxPqwRDmu7Pk-berTDtoIoMz0ovKjo85Tz8CUdEgIDARo8CicAJQgCEiECl3v34DE-rBEOa7s-T5t6tMO2gigzPSi8qOjzlPPwJR0Qjv_WtwYaCwoJBFxzjbKRAh-aKkYwRAIgCiTq5jBTaJJb6lUxN-0uNCj8lkV9AGY682D21kIAMiICIE1yxrjbDdiSCiARnS7I2zqJpXC2hOvjB4JoL9SAAk67 -``` - -That SPR record then can be used then by other peers for initial nodes discovery. - -We should keep in mind some important things about SPR record (see [ENR](https://eips.ethereum.org/EIPS/eip-778)): -- It uses nodes public IP, discovery port (`--disc-port`) and private key (`--net-privkey`) for record creation -- Specified data is signed on each run and will be changed but still contain specified node data when decoded -- You can decode it by passing to the Codex node at run and with `--log-level=trace` - -For bootstrap node, it is required to forward just discovery port on your Internet router. - -### Run as a service in Linux - -We can run Codex as a service via [systemd](https://systemd.io) using following steps - - 1. Create an user for Codex - ```shell - sudo useradd \ - --system \ - --home-dir /opt/codex \ - --shell /usr/sbin/nologin \ - codex - ``` - In case you would like to run commands using a created user, you could do it like following `sudo -u codex ls -la /opt/codex`. - - 2. Install Codex [using a script](https://github.com/codex-storage/get-codex) or [build from sources](/learn/build) - ```shell - # codex with cirdl - curl -s https://get.codex.storage/install.sh | INSTALL_DIR=/usr/local/bin CIRDL=true bash - ``` - - 3. Create directories - ```shell - sudo mkdir -p /opt/codex/data - sudo mkdir -p /opt/codex/logs - ``` - - 4. Create a configuration file - ```shell - sudo vi /opt/codex/codex.conf - ``` - ```toml - data-dir = "/opt/codex/data" - listen-addrs = ["/ip4/0.0.0.0/tcp/8070"] - nat = "extip:" - disc-port = 8090 - api-port = 8080 - bootstrap-node = [ - "spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P", - "spr:CiUIAhIhAyUvcPkKoGE7-gh84RmKIPHJPdsX5Ugm_IHVJgF-Mmu_EgIDARo8CicAJQgCEiEDJS9w-QqgYTv6CHzhGYog8ck92xflSCb8gdUmAX4ya78QoemesAYaCwoJBES39Q2RAnVOKkYwRAIgLi3rouyaZFS_Uilx8k99ySdQCP1tsmLR21tDb9p8LcgCIG30o5YnEooQ1n6tgm9fCT7s53k6XlxyeSkD_uIO9mb3", - "spr:CiUIAhIhA6_j28xa--PvvOUxH10wKEm9feXEKJIK3Z9JQ5xXgSD9EgIDARo8CicAJQgCEiEDr-PbzFr74--85TEfXTAoSb195cQokgrdn0lDnFeBIP0QzOGesAYaCwoJBK6Kf1-RAnVEKkcwRQIhAPUH5nQrqG4OW86JQWphdSdnPA98ErQ0hL9OZH9a4e5kAiBBZmUl9KnhSOiDgU3_hvjXrXZXoMxhGuZ92_rk30sNDA", - "spr:CiUIAhIhA7E4DEMer8nUOIUSaNPA4z6x0n9Xaknd28Cfw9S2-cCeEgIDARo8CicAJQgCEiEDsTgMQx6vydQ4hRJo08DjPrHSf1dqSd3bwJ_D1Lb5wJ4Qt_CesAYaCwoJBEDhWZORAnVYKkYwRAIgFNzhnftocLlVHJl1onuhbSUM7MysXPV6dawHAA0DZNsCIDRVu9gnPTH5UkcRXLtt7MLHCo4-DL-RCMyTcMxYBXL0", - "spr:CiUIAhIhAzZn3JmJab46BNjadVnLNQKbhnN3eYxwqpteKYY32SbOEgIDARo8CicAJQgCEiEDNmfcmYlpvjoE2Np1Wcs1ApuGc3d5jHCqm14phjfZJs4QrvWesAYaCwoJBKpA-TaRAnViKkcwRQIhANuMmZDD2c25xzTbKSirEpkZYoxbq-FU_lpI0K0e4mIVAiBfQX4yR47h1LCnHznXgDs6xx5DLO5q3lUcicqUeaqGeg", - "spr:CiUIAhIhAuN-P1D0HrJdwBmrRlZZzg6dqllRNNcQyMDUMuRtg3paEgIDARpJCicAJQgCEiEC434_UPQesl3AGatGVlnODp2qWVE01xDIwNQy5G2DeloQm_L2vQYaCwoJBI_0zSiRAnVsGgsKCQSP9M0okQJ1bCpHMEUCIQDgEVjUp1RJGb59eRPs7RPYMSGAI_fo1yv70iBtnTqefQIgVoXszc87EGFVO3aaqorEYZ21OGRko5ho_Pybdyqa6AI", - "spr:CiUIAhIhAsi_hgxFppWjHiKRwnYPX_qkB28dLtwK9c7apnlBanFuEgIDARpJCicAJQgCEiECyL-GDEWmlaMeIpHCdg9f-qQHbx0u3Ar1ztqmeUFqcW4Q2O32vQYaCwoJBNEmoCiRAnV2GgsKCQTRJqAokQJ1dipHMEUCIQDpC1isFfdRqNmZBfz9IGoEq7etlypB6N1-9Z5zhvmRMAIgIOsleOPr5Ra_Nk7BXmXGhe-YlLosH9jo83JtfWCy3-o" - ] - storage-quota = "8gb" - block-ttl = "24h" - log-level = "info" - ``` - - Make sure to use bootstrap nodes for the [network](/networks/networks) you would like to join, update `nat` variable with a node Public IP and adjust other settings by your needs. - - 5. Change folders ownership and permissions - ```shell - sudo chown -R codex:codex /opt/codex - ``` - - 6. Create systemd unit file - ```shell - sudo vi /lib/systemd/system/codex.service - ``` - ```shell - [Unit] - Description=Codex service - Documentation=https://docs.codex.storage - After=local-fs.target network-online.target - - [Service] - MemorySwapMax=0 - TimeoutStartSec=infinity - Type=exec - User=codex - Group=codex - StateDirectory=codex - ExecStart=/usr/local/bin/codex --config-file="/opt/codex/codex.conf" - Restart=always - RestartSec=3 - StandardOutput=append:/opt/codex/logs/codex.log - StandardError=append:/opt/codex/logs/codex.log - - [Install] - WantedBy=multi-user.target - ``` - Check `man systemd`, `man systemd.service` and `man systemd.directives` for additional details. - - 7. Enable and start Codex service - ```shell - sudo systemctl enable codex - sudo systemctl start codex - ``` - - 8. Check service status - ```shell - sudo systemctl status codex - ``` - - 9. Enable logs rotation using logrotate - ```shell - sudo vi /etc/logrotate.d/codex - ``` - ```logrotate - /opt/codex/logs/*.log { - daily - missingok - rotate 5 - copytruncate - nocreate - nomail - dateext - dateyesterday - } - ``` - - 1. Check the logs - ```shell - tail -f /opt/codex/logs/codex.log - ``` - -### Run as a service in Windows - -This functionality is not supported yet :construction: - -### Using Docker - -We also ship Codex in Docker containers, which can be run on `amd64` and `arm64` platforms. - -#### Docker entrypoint - -[Docker entrypoint](https://github.com/codex-storage/nim-codex/blob/master/docker/docker-entrypoint.sh), supports some additional options, which can be used for easier configuration: - -- `ENV_PATH` - path to the file, in form `env=value` which will be sourced and available for Codex at run. That is useful for Kubernetes Pods configuration. -- `NAT_IP_AUTO` - when set to `true`, will set `CODEX_NAT` variable with container internal IP address. It also is useful for Kubernetes Pods configuration, when we perform automated tests. -- `NAT_PUBLIC_IP_AUTO` - used to set `CODEX_NAT` to public IP address using lookup services, like [ip.codex.storage](https://ip.codex.storage). Can be used for Docker/Kubernetes to set public IP in auto mode. -- When we set `prover` sub-command, entrypoint will run `cirdl` tool to download ceremony files, required by [Codex storage node](#codex-storage-node). -- `BOOTSTRAP_NODE_URL` - Codex node API URL in form of `http://bootstrap:8080`, to be used to get it's SPR as a bootstrap node. That is useful for Docker and Kubernetes configuration. -- `NETWORK` - is a helper variable to simply a specific network join. It helps to automate `BOOTSTRAP_NODE_FROM_URL` variable. -- `BOOTSTRAP_NODE_FROM_URL` - can be used to pass SPR nodes from an URL like [spr.codex.storage/testnet](https://spr.codex.storage/testnet). - -#### Docker network - -When we are running Codex using Docker with default [bridge network](https://docs.docker.com/engine/network/drivers/bridge/), it will create a double NAT: - - One on the Docker side - - Second on your Internet router - -If your Internet router does not support [Full Cone NAT](https://learningnetwork.cisco.com/s/question/0D56e0000CWxJ9sCQF/lets-explain-in-details-full-cone-nat-restricted-cone-nat-and-symmetric-nat-terminologies-vs-cisco-nat-terminologies), you might have an issue and peer discovery and data transport will not work or might work unexpected. - -In that case, we should consider the following solutions: -- Use [host network](https://docs.docker.com/engine/network/drivers/host/) for Docker, which is supported only in Linux -- Run [Using binary](#using-binary) -- Use VM/VPS in the Cloud to run Docker with bridge or host network - -#### Run using Docker - -And we basically can use same options we [used for binary](#using-binary) and additionally it is required to mount volumes and map the ports. - -1. Run Codex: -```shell -docker run \ - --rm \ - -v $PWD/datadir:/datadir \ - -p 8070:8070 \ - -p 8080:8080 \ - -p 8090:8090/udp \ - codexstorage/nim-codex:latest \ - codex \ - --data-dir=/datadir \ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P \ - --nat=any \ - --disc-port=8090 \ - --listen-addrs=/ip4/0.0.0.0/tcp/8070 \ - --api-cors-origin="*" \ - --api-bindaddr=0.0.0.0 \ - --api-port=8080 -``` - -> [!NOTE] -> You would need to pass a bootstrap nodes based on the [network](/networks/networks) you would like to join. - -### Using Docker Compose - -For Docker Compose, it is more suitable to use [environment variables](#environment-variables) for Codex configuration and we can reuse commands from example above, for Docker. - -1. Create `docker-compose.yaml` file: - ```yaml - services: - codex: - image: codexstorage/nim-codex:latest - container_name: codex - command: - - codex - - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P - - --bootstrap-node=spr:CiUIAhIhAyUvcPkKoGE7-gh84RmKIPHJPdsX5Ugm_IHVJgF-Mmu_EgIDARo8CicAJQgCEiEDJS9w-QqgYTv6CHzhGYog8ck92xflSCb8gdUmAX4ya78QoemesAYaCwoJBES39Q2RAnVOKkYwRAIgLi3rouyaZFS_Uilx8k99ySdQCP1tsmLR21tDb9p8LcgCIG30o5YnEooQ1n6tgm9fCT7s53k6XlxyeSkD_uIO9mb3 - - --bootstrap-node=spr:CiUIAhIhA6_j28xa--PvvOUxH10wKEm9feXEKJIK3Z9JQ5xXgSD9EgIDARo8CicAJQgCEiEDr-PbzFr74--85TEfXTAoSb195cQokgrdn0lDnFeBIP0QzOGesAYaCwoJBK6Kf1-RAnVEKkcwRQIhAPUH5nQrqG4OW86JQWphdSdnPA98ErQ0hL9OZH9a4e5kAiBBZmUl9KnhSOiDgU3_hvjXrXZXoMxhGuZ92_rk30sNDA - - --bootstrap-node=spr:CiUIAhIhA7E4DEMer8nUOIUSaNPA4z6x0n9Xaknd28Cfw9S2-cCeEgIDARo8CicAJQgCEiEDsTgMQx6vydQ4hRJo08DjPrHSf1dqSd3bwJ_D1Lb5wJ4Qt_CesAYaCwoJBEDhWZORAnVYKkYwRAIgFNzhnftocLlVHJl1onuhbSUM7MysXPV6dawHAA0DZNsCIDRVu9gnPTH5UkcRXLtt7MLHCo4-DL-RCMyTcMxYBXL0 - - --bootstrap-node=spr:CiUIAhIhAzZn3JmJab46BNjadVnLNQKbhnN3eYxwqpteKYY32SbOEgIDARo8CicAJQgCEiEDNmfcmYlpvjoE2Np1Wcs1ApuGc3d5jHCqm14phjfZJs4QrvWesAYaCwoJBKpA-TaRAnViKkcwRQIhANuMmZDD2c25xzTbKSirEpkZYoxbq-FU_lpI0K0e4mIVAiBfQX4yR47h1LCnHznXgDs6xx5DLO5q3lUcicqUeaqGeg - - --bootstrap-node=spr:CiUIAhIhAuN-P1D0HrJdwBmrRlZZzg6dqllRNNcQyMDUMuRtg3paEgIDARpJCicAJQgCEiEC434_UPQesl3AGatGVlnODp2qWVE01xDIwNQy5G2DeloQm_L2vQYaCwoJBI_0zSiRAnVsGgsKCQSP9M0okQJ1bCpHMEUCIQDgEVjUp1RJGb59eRPs7RPYMSGAI_fo1yv70iBtnTqefQIgVoXszc87EGFVO3aaqorEYZ21OGRko5ho_Pybdyqa6AI - - --bootstrap-node=spr:CiUIAhIhAsi_hgxFppWjHiKRwnYPX_qkB28dLtwK9c7apnlBanFuEgIDARpJCicAJQgCEiECyL-GDEWmlaMeIpHCdg9f-qQHbx0u3Ar1ztqmeUFqcW4Q2O32vQYaCwoJBNEmoCiRAnV2GgsKCQTRJqAokQJ1dipHMEUCIQDpC1isFfdRqNmZBfz9IGoEq7etlypB6N1-9Z5zhvmRMAIgIOsleOPr5Ra_Nk7BXmXGhe-YlLosH9jo83JtfWCy3-o - environment: - - CODEX_DATA_DIR=/datadir - - NAT_PUBLIC_IP_AUTO=https://ip.codex.storage - - CODEX_DISC_PORT=8090 - - CODEX_LISTEN_ADDRS=/ip4/0.0.0.0/tcp/8070 - - CODEX_API_CORS_ORIGIN="*" - - CODEX_API_PORT=8080 - - CODEX_API_BINDADDR=0.0.0.0 - ports: - - 8080:8080/tcp # API - - 8090:8090/udp # Discovery - - 8070:8070/tcp # Transport - volumes: - - ./datadir:/datadir - logging: - driver: json-file - options: - max-size: 100m - max-file: 5 - ``` - -3. Run Codex: - ```shell - docker compose up - ``` - -> [!NOTE] -> You would need to pass a bootstrap nodes based on the [network](/networks/networks) you would like to join. - -### On Kubernetes - -Helm chart code is available in [helm-charts](https://github.com/codex-storage/helm-charts) repository, but chart was not published yet. - -## How-tos - -### NAT Configuration - -Use the `--nat` CLI flag to specify how your codex node should handle NAT traversal. Below are the available options: - -**any**(default): This option will automatically try to detect your public IP by checking the routing table or using UPnP/PMP NAT traversal techniques. If successful, it will use the detected public IP and port for the announce address. - -**upnp**: This option exclusively uses [UPnP](https://en.wikipedia.org/wiki/Universal_Plug_and_Play) to detect the public IP and create a port mapping entry, if your device supports UPnP. - -**pmp**: This option uses only [NAT-PMP](https://en.wikipedia.org/wiki/NAT_Port_Mapping_Protocol) to detect the public IP and create a port mapping entry, if your device supports NAT-PMP. - -**extIP:[Your Public IP]**:Use this option if you want to manually specify an external IP address and port for the announce address. When selecting this option, you'll need to configure **port forwarding** on your router to ensure that incoming traffic is directed to the correct internal IP and port. - -### Port Forwarding - -If you're running on a private network, you'll need to set up port forwarding to ensure seamless communication between the codex node and its peers. It's also recommended to configure appropriate firewall rules for TCP and UDP traffic. -While the specific steps required vary based on your router, they can be summarised as follows: -1. Find your public IP address by either visiting [ip-codex](https://ip.codex.storage/) or running `curl ip.codex.storage` -2. Identify your [private](#determine-your-private-ip) IP address -3. Access your router's settings by entering its IP address (typically [http://192.168.1.1](http://192.168.1.1/)) in your web browser -4. Sign in with administrator credentials and locate the port forwarding settings -5. Set up the discovery port forwarding rule with these settings: - - External Port: 8090 - - Internal Port: 8090 - - Protocol: UDP - - IP Address: Your device's private IP address -6. Set up the libp2p port forwarding rule with these settings: - - External Port: 8070 - - Internal Port: 8070 - - Protocol: TCP - - IP Address: Your device's private IP address - -#### Determine your private IP - -To determine your private IP address, run the appropriate command for your OS: - -**Linux**: -```shell -ip addr show | grep "inet " | grep -v 127.0.0.1 -``` - -**Windows**: -```shell -ipconfig | findstr /i "IPv4 Address" -``` - -**MacOs**: -```shell -ifconfig | grep "inet " | grep -v 127.0.0.1 -``` - -## Known issues - -[^multivalue-env-var]: Environment variables like `CODEX_BOOTSTRAP_NODE` and `CODEX_LISTEN_ADDRS` does not support multiple values. Please check [[Feature request] Support multiple SPR records via environment variable #525](https://github.com/codex-storage/nim-codex/issues/525), for more information. -[^sub-commands]: Sub-commands `persistence` and `persistence prover` can't be set via environment variables. -[^eth-account]: Please ignore `--eth-account` CLI option - [Drop support for --eth-account #727](https://github.com/codex-storage/nim-codex/issues/727). diff --git a/ko/learn/tokenomics-litepaper.md b/ko/learn/tokenomics-litepaper.md deleted file mode 100644 index 1c6973a..0000000 --- a/ko/learn/tokenomics-litepaper.md +++ /dev/null @@ -1,276 +0,0 @@ ---- -outline: [1, 3] ---- -# Codex Tokenomics Litepaper - Testnet Version - -**Codex: A Decentralized Storage Protocol for Durable Information** - -# Legal Notices - -*The information contained in this document is intended to be made available for informational purposes only and does not constitute a prospectus, nor an offer to buy, a solicitation or an invitation to buy, or a recommendation for any token or any security. Neither this document nor any of its content should be considered as creating any expectations or forming the basis of any contract, commitment or binding obligation. No information herein should be considered to contain or be relied upon as a promise, representation, warranty or guarantee, whether express or implied and whether as to the past, present or the future in relation to the projects and matters described herein. The information presented is a summary and does not purport to be accurate, reliable or complete. This document is under continuous legal review and may be amended or supplemented at any time without prior notice.  No responsibility will be borne for the accuracy, reliability or completeness of information contained herein. Because of the high degree of risk and uncertainty described above, undue reliance should not be placed by anyone on any matters described in this document. Any tokens referenced in this document have not been registered under any securities laws and may not be offered or sold in any jurisdiction where such offer or sale would be prohibited.* - -*This document may contain forward-looking statements that are based only on current expectations, estimates, forecasts, assumptions and projections about the technology, industry and markets in general. The forward looking statements, projects, content and any other matters described in this document are subject to a high degree of risk and uncertainty. The roadmap, results, project descriptions, technical details, functionalities, and other features are subject to change based on, among other things, market conditions, technical developments, and regulatory environment. The actual development and results, including the order and the timeline, might differ materially from those anticipated in these forward-looking statements.* - -*The information contained in this document does not constitute financial, legal, tax, investment, professional or other advice and should not be treated as such.* - -# Overview - -## Scope - -This document describes the Codex Tokenomics with elements that reflect the Testnet deployment of the Codex Protocol. - -## What Codex Does - -Codex is a state-of-the-art decentralized storage platform that offers a novel solution that enhances data durability guarantees for storing vast amounts of data while eliminating any reliance on centralized institutions that could lead to a single point of failure. - -While centralized storage systems such as Google Cloud tout eleven nines of durability, durable file storage in distributed systems that provide censorship resistance and privacy are a vital prerequisite to use cases such as preserving factual records of history in network states. - -While no system can guarantee absolute protection against data loss, through its technical architecture, economic incentives, and algorithmic encoding, Codex is designed to provide highly decentralized data storage with high durability, resiliency to cloud failures, and resistance to censorship. - -## How Codex Works - -Codex operates as a network of storage nodes, referred to herein as **Storage Providers** (SP), that store user data for the duration of a contract entered into by SPs and storage users, referred to herein simply as **Clients**. - -Storage contracts are initiated by a **Client** requesting to store a specified amount of data, for a specified amount of time, and at a specific price per the full contract. **Storage Providers** commit to slots to store redundant fragments of this data. - -The fact that **SPs** must post collateral (stake) in order to fill a slot helps protect against Sybil attacks, promoting diversity in storage nodes fulfilling each contract. Additionally, this collateral acts as an economic incentive to ensure that **SPs** fulfill their obligations to periodically prove that they are still in possession of the data in question. - -This is achieved by periodic challenges to **SPs** to provide cryptographic proofs that demonstrate the data they have contracted to store can be retrieved. Codex incorporates Zero Knowledge (ZK) and Data Availability Sampling (DAS) to achieve low-cost, highly efficient, and reliable data loss detection. - -**SPs** are required to respond to these challenges, sending their proofs to **Validators,** who verify the validity of the proofs and posts to the blockchain only the absence of a proof. This reduces costs of validating proofs, while not affecting the **Protocol**’s security. - -Should SPs fail to prove a fixed number of times they still have the data in question, or send an invalid proof, their collateral is partially slashed. The slash penalty is a fixed percentage of the total collateral. This slashing continues until a certain number of slashings is reached, at which point the entire collateral is slashed. At this moment, the SP slot is considered “abandoned”. The slashed collateral is used as an incentive for a new **SP** to take over the failed slot through the “slot recovery mechanism” (discussed further later). This ensures the collateral provides an economic incentive to ensure the durability of the data. - -Codex is thus designed such that rational behavior for **SPs** consists of storing the data in the most space-efficient manner to minimize excess storage costs, while balancing the need for enough redundancy to recover from the possibility of data loss/corruption by the penalty of forfeiture of their collateral (slashing). - -While Codex’s tech maximizes recoverability and durability in the event of partial data loss, Codex’s economic incentives coordinate rational actors to provide a stable and predictable environment for data storage users. At the heart of these economic incentives is the Codex utility token (CDX), which serves as the collateral to protect file durability and facilitate slot repair, and the means of payment to coordinate successful storage contracts. - -# Contract Lifecycle - -The marketplace coordinates matching **Clients** who want to pay for storing files with **Storage Providers** who are offering storage space and posting collateral in order to earn payments for the contract. - -## Contract Request Initiation - -As a design principle, **Clients** should post the deal terms they are looking for, and Storage Providers prioritize which deals meet their criteria and pose the best deals to take. - -When the contract request is created, the **Client** deposits the full price of the length of the contract at that time. This deposit acts as a spam prevention mechanism and ensures that **SP** time and resources are not wasted filling slots for deals that a **Client** does not complete payment for. - -## Storage Providers Fill Requests - -Ahead of matching with storage contracts, **Storage Providers** specify their aggregate availabilities for new contracts. - -Based on each **SPs’** availabilities, a queue is created for each **SP**, ranking the open **Client** request for contract deals with the most favorable deals at the top. Over time, this queue resolves by pairing **SPs** with contracts that are compatible with their availabilities, starting with the highest ranked deals first. - -At launch, **SPs** will not be able to customize the queue creation algorithm, which means **SPs** with the same availabilities will have identical queues (other than differences due to a randomness function that increases **SP** diversity per each contract). In the future, **SPs** are expected to be able to customize their queue ranking algorithm. - -If a **SP** matches with a storage contract and they're eligible to reserve a slot in the contract, they reserve an open slot, download the slot data from the **Client** or existing **SPs** whose data can be used to reconstruct the slot’s contents, create an initial storage proof, and submit this proof, along with collateral, to the **Protocol**. - -Note that a slot is not considered confirmed as filled until after an **SP** both posts associated collateral and produces a proof for the slot. - -## Contract Expires Before Beginning - -If there are still empty slots when the timeout/expiry for the contract request expires, the deal is terminated. - -The **Storage Providers** who did fill slots, if any, are compensated for the amount of time which they did store the slot data, at the contract requests specified price per TB per Month. The remainder of the **Client**’s deposit is returned. - -As there is a high probability of having at least a few slots occupied, there should be no need for further penalties on the **Client** to prevent spam requests and incentivise **Clients** to submit attractive deals. - -## Contract Begins - -The contract begins if *all* slots are occupied, that is, **SPs** have downloaded the data, posted collateral, and posted proofs before the timeout/expiry for the contract request is reached. - -At this moment, a *protocol fee* is applied on the user’s deposit. The proceedings are burned. - -The remaining of the client’s deposit is held by the protocol and will be used to pay **SPs** at the end of the contract. - -## Contract is Running - -**Storage Providers** must submit proofs to **Validators** according to the storage request’s proof frequency, a parameter set by the Client in the request. - -### Missing Proofs - -If an **SP** fails to submit proofs within the rolling last periods, they are partially slashed. The penalty is a fixed percentage of the collateral. Upon provision of a proof after being partially slashed, the SP should top up the missing collateral. - -Should the SP be slashed enough times, their entire collateral will be slashed and confiscated, and the SP is considered to have abandoned its slot. The provision of a correct proof at this moment will not revert the start of the slot recovery mechanism. - -## A Slot in the Contract is Abandoned - -When an **SP** fails to submit enough proofs such that they are slashed enough times, their slot is considered abandoned. In order to incentivize a new **SP** to come in and takeover the abandoned slot (slot recovery), 50% of the collateral confiscated from the **SP** which has abandoned the slot is used as an incentive to the new **SP**. The remaining confiscated collateral is burned. - -This helps align the economic incentive for **SPs** to take over abandoned slots before filling new deals, since they can effectively earn forfeited collateral for taking over and fulfilling abandoned slots. - -## Contract Defaults - -If, at any time during the life of the storage contract, the number of slots currently in an abandoned state (not yet recovered), meets or exceeds the maximum number of storage slots that can be lost before the data is unrecoverable, then the entire storage deal is considered to be in a *failed* state. - -Each **Storage Providers** posted collateral is burned. This incentivizes **SPs** not to let storage deals to be at risk of defaulting. **SPs** are incentivized to *proactively* avoid this by diversifying their infrastructure and the storage contracts they enter, and *reactively* by backing up their own slot data, or even backing up data from other slots so they can better assist slot recovery, as the deal approaches a failed state. - -Clients also receive back any leftover from their original payment. - -## Contract Ends Its Full Duration - -When a started contract reaches its pre-specified duration without having previously defaulted, the contract completes. - -All collateral is returned to **SPs t**hat currently fill the slots (note due to slot recovery these are not necessarily the same **SPs** that filled the slots at contract inception), and all remaining payment is returned to the client. - -Deals can not be automatically rolled forward or extended. If a **Client** desires to continue a deal, they must create a new storage contract request. Otherwise, Clients can retrieve their data. - -# CDX Testnet Tokenomics - -The CDX token does not exist in the Testnet Phase. The description below refers to the mechanics of a Testnet token and not CDX itself and will be referred to as *CDX (Testnet token)* for this purpose. - -For the avoidance of doubt, the *CDX (Testnet token)* are virtual items with no value of any kind and they are not convertible to any other currency, token, or any other form of property. They are solely intended to be utilised for the purposes of enabling the tokenomics and facilitating the different roles in this Testnet Phase. - -## Roles - -The Codex protocol has two primary roles fulfilled by network participants. - -- **Clients**: pay Storage Providers in *CDX (Testnet token)* to securely store their data on the Codex network for an agreed upon amount of time. -- **Storage Providers**: post *CDX (Testnet token)* collateral to enter into storage contracts with Clients in exchange for a *CDX (Testnet token)* denominated payment. -- **Validators**: post *CDX (Testnet token)* collateral to validate storage proofs in exchange for a *CDX (Testnet token)* denominated payment. - -## Token Utility - -The *CDX (Testnet token)* is used as both a form of posted collateral and a means of payment in order to secure the network and access its services. - -Collateral is primarily used as a spam and sybil-attack prevention mechanism, liability insurance (e.g. compensating Clients in case of catastrophic loss of data), and to enforce rational behavior. - -Payments are made by Clients to Providers for services rendered, such as for storing data for a certain amount of time or retrieving data. This is implemented through the Marketplace contract, which serves as an escrow. Data in a storage contract is distributed into slots where each is, ideally, hosted by a different Storage Provider. - -### **For Clients** - -- Pay storage costs and fees in *CDX (Testnet token)* for storing files. - -### **For Storage Providers** - -- Post collateral in *CDX (Testnet token)* when committing to new storage contracts. This collateral is slashed if they do not fulfill their agreed upon services. -- Earn *CDX (Testnet token)* from the collateral of slashed Storage Providers by participating in the slot recovery mechanism. -- Earn *CDX (Testnet token)* from Clients when successfully completing the storage service. - -### For Validators - -- Post collateral in *CDX (Testnet token)* to operate the validation service. This collateral is slashed if they do not mark a proof as missing within a predetermined period. -- Earn *CDX (Testnet token)* from the collateral of slashed Storage Providers by marking proofs as missed - -Figure below depicts the flow of the *CDX (Testnet token)* token within the system. - -![Flow of the *CDX token within the system](/learn/tokenomics-token-flow.png) - -## Value Capture and Accrual Mechanisms - -Codex creates *value* to participants: - -- Clients can benefit from storing data with strong durability guarantees; -- Storage Providers can earn yield from their spare resources or capital by providing a service. -- Validators earn payouts for marking proofs as missing. - -Clients need *CDX (Testnet token)* tokens to request storage deals. *CDX (Testnet token)* captures the value created to Clients by being a *Value Transfer Token* to them. - -Storage Providers and Validators are rewarded in *CDX (Testnet token)* token and also need it as a proof of commitment to the Protocol. They risk being slashed in exchange for rewards. *CDX (Testnet token)* captures the value created to Providers by being a *Work Token* to them. - -The following mechanisms describe how the value accrues to the *CDX (Testnet token)* token. - -### Protocol Fee over Contracts - -If the contract is canceled before it starts, Client's deposited amount is charged a small penalty and returned, aiding to prevent low quality spam deal requests. - -If the contract successfully initiates, the protocol collects a fee for facilitating the transaction. The remaining amount is made available for payments to Storage Providers. - -The collected fees are burned in both cases. This creates a small but constant deflationary force on the token supply, which is proportional to the product demand. - -## Behavior & Motivations - -### Clients - -Clients have the following rational behavior: - -- Requesting storage from the network with a fee at fair market rates -- Providing data to storage nodes that meet their criteria - -They may also exhibit the following adversarial behavior, whether for profit driven, malicious, or censorship motivations: - -- Requesting storage from the network but never making the data available for any or all slots -- Requesting storage from the network but not releasing the data within required time period to begin the contract successfully -- Requesting storage from the network but not releasing the data to specific Providers -- Attacking SPs that host their data to attempt to relieve their payment obligations at the end of the contract. - -### **Storage Providers** - -Storage Providers have the following rational behavior: - -- Committing to slots of storage contracts to earn a fee. -- Providing proofs of storage for their committed slots to avoid collateral slashing penalties. -- Releasing the data to anyone who requests it. -- Committing to failed slots of storage contracts to maintain the integrity of the data - -They may also exhibit the following adversarial behavior, whether for profit driven, malicious, or censorship motivations: - -- Reserving a contract slot but never filling it (attempt to prevent contract from starting) -- Ceasing to provide proofs mid the lifespan of a contract -- Producing proofs, but not making data available for other nodes to retrieve - -### Validators - -Validators have the following rational behavior: - -- Marking a proof as missing to earn a fee -- Tracking the history of missed proofs of a **SP** -- Triggering the Slot Recovery Mechanism when an **SP** reaches the maximum allowed number of missed proofs - -They may also exhibit the following adversarial behavior, whether for profit driven, malicious, or censorship motivations: - -- Colluding with SPs to ignore missed proofs -- Observing a missed proof but do not post it onchain - -## Incentive Mechanisms - -The following mechanisms help incentivize the expected behavior of each role and mitigate the detrimental ones. - -### Clients Provide Full Payment Upfront - -Clients must deposit the full amount in *CDX (Testnet token)* that covers the entirety of the storage contract duration upfront. This indicates their pledge to pay a certain amount for the storage contract, though the contract only begins when and if all data slots are filled by Storage Providers. - -### Delayed Payment to Storage Providers - -Storage Providers only receive payment related to the provision of services at the end of the contract duration. - -### Collateral Requirement - -In order to fill a data slot, Storage Providers first stake and commit the required collateral in the form of the *CDX (Testnet token)* for that slot which is then subject to slashing if they do not post a proof to confirm the slot. - -Validators also need to post collateral to participate in the validation service. - -### Proof of Storage - -Contracts only start when all data slots are filled. Slots are only considered filled after a Storage Provider has posted collateral and the associated proof for its slot. - -Once the contract begins, Storage Providers regularly provide proof of storage. - -### **Slashing for Missed Proofs of Storage** - -At any point during the duration of the storage contract, the storage provider is slashed if it fails to provide a certain number of proof of storage in a row. Should the SP resume providing proof of storage, it needs to top up the slashed collateral. The penalty is a fixed percentage of the total collateral. - -### Slot Recovery Mechanism - -If a Storage Provider does not submit the required storage proofs when required, after a number of slashings their entire collateral will be seized. A portion of the confiscated collateral is used as an incentive for the new Storage Provider who recovers and starts serving the abandoned slot. The remainder of the confiscated collateral in *CDX (Testnet token)* is burned. - -### Slashing Defaulted Contract - -If, at any point during the duration of the storage contract, the number of data slots currently abandoned (and not yet recovered) reaches or surpasses the maximum allowable lost slots (meaning the data becomes irretrievable), then the entire storage contract is deemed to be *failed*. - -At this stage, collaterals of all Storage Providers serving data slots in the contract are entirely slashed. - -### Client Reimbursement - -If at any point during the contract, sufficient slots are abandoned such that the data is not fully recoverable, Clients receive back any leftover from their original payment. - -## Token Lifecycle - -### Burning - -*CDX (Testnet token)* tokens are burned in these instances: - -- When a storage deal contract fails to initiate, a small portion of the Client's payment for the storage deal is burned. This serves primarily as a mechanism to deter spam and ensure that deal requests are submitted at market-appropriate prices for storage. -- When a storage deal contract successfully initiates, the protocol applies a fee for facilitating the transaction. -- Whenever a Storage Provider misses a certain number of storage proofs, a portion of the collateral is slashed and burned. -- Once the slot recovery mechanism resolves, the remaining of the abandoning Storage Provider’s collateral is burned. diff --git a/ko/learn/troubleshoot.md b/ko/learn/troubleshoot.md deleted file mode 100644 index 8a273f5..0000000 --- a/ko/learn/troubleshoot.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -outline: [2, 3] ---- -# 문제 해결 - -테스트넷에 Codex 노드를 연결하는 데 문제가 있으신가요? 여기 일반적인 Codex 연결 문제와 이를 진단하고 해결하는 단계들을 모아놨습니다. 여기서 해결되지 않는 문제가 있다면, Github의 미해결 이슈를 확인하거나 Discord 서버를 통해 연락해 주세요. - -## 기본 사항 - -You've probably already considered these. But just in case: - -1. Are you using a VPN? Make sure it's configured correctly to forward the right ports, and make sure you announce your node by the public IP address where you can be reached. -1. Are you using a firewall or other security software? Make sure it's configured to allow incoming connections to Codex's discovery and peer-to-peer ports. - -## Check your announce address - -Your node announces your public address to the network, so other nodes can connect to you. A common issue is connection failure due to incorrect announce addresses. Follow these steps to check your announce address. - -1. Go to a whats-my-ip site, or `ip.codex.storage` and note the IP address. -1. Go into your router/modem WAN settings and find the public IP address. -1. These two addresses should match. -1. If they do not, it's possible that A) you're behind a VPN. In this case, it's up to you to disable the VPN or make sure all forwarding is configured correctly. or B) Your internet-service-provider has placed your uplink behind a secondary NAT. ISPs do this to save public IP addresses. The address assigned to your router/moderm is not a 'true' public internet address. Usually this issue can be solved by your ISP. Contact customer support and ask them to give you a public address (sometimes also called Dynamic IP address). -1. Call Codex's debug/info endpoint. See the [Using Codex](/learn/using) for the details. -1. In the JSON response, you'll find "announceAddresses". -1. The IP address listed there should match your public IP. -1. If the announce address in the JSON is incorrect, you can adjust it manually by changing Codex's CLI argument `--nat` or setting the environment variable `CODEX_NAT`. After you've changed your announce address and restarted your node, please allow some time (20-30mins) for the network to disseminate the updated address. - -If you've performed these steps and haven't found any issues, your announce address is probably not the problem. - - diff --git a/ko/learn/using.md b/ko/learn/using.md deleted file mode 100644 index e6cb548..0000000 --- a/ko/learn/using.md +++ /dev/null @@ -1,275 +0,0 @@ ---- -outline: [2, 3] ---- -# Codex 사용하기 - -[REST API](/developers/api)를 사용하여 Codex와 상호작용할 수 있습니다. 이 문서에서는 몇 가지 유용한 예제를 보여드리겠습니다. - -또한 [Codex App UI](https://app.codex.storage)를 확인할 수 있습니다. - -[Linux/macOS](#linux-macos)와 [Windows](#windows)의 명령줄 인터프리터는 약간 다르게 작동하므로 사용 중인 OS에 맞는 단계를 사용하세요. - -## Linux/macOS - -### Overview -1. [Debug](#debug) -2. [Upload a file](#upload-a-file) -3. [Download a file](#download-a-file) -4. [Local data](#local-data) -5. [Create storage availability](#create-storage-availability) -6. [Purchase storage](#purchase-storage) -7. [View purchase status](#view-purchase-status) - -### Debug -An easy way to check that your node is up and running is: - -```shell -curl http://localhost:8080/api/codex/v1/debug/info \ - -w '\n' -``` - -This will return a JSON structure with plenty of information about your local node. It contains peer information that may be useful when troubleshooting connection issues. - -### Upload a file -> [!Warning] -> Once you upload a file to Codex, other nodes in the network can download it. Please do not upload anything you don't want others to access, or, properly encrypt your data *first*. - -```shell -curl -X POST \ - http://localhost:8080/api/codex/v1/data \ - -H 'Content-Type: application/octet-stream' \ - -w '\n' \ - -T -``` - -On successful upload, you'll receive a CID. This can be used to download the file from any node in the network. - -> [!TIP] -> Are you on the [Codex Discord server](https://discord.gg/codex-storage)? Post your CID in the [# :wireless: | share-cids](https://discord.com/channels/895609329053474826/1278383098102284369) channel, see if others are able to download it. Codex does not (yet?) provide file metadata, so if you want others to be able to open your file, tell them which extension to give it. - -### Download a file -When you have a CID of data you want to download, you can use the following commands: - -```shell -# paste your CID from the previous step here between the quotes -CID="..." -``` - -```shell -curl "http://localhost:8080/api/codex/v1/data/${CID}/network/stream" \ - -o "${CID}.png" -``` - -Please use the correct extension for the downloaded file, because Codex does not store yet content-type or extension information. - -### Local data -You can view which datasets are currently being stored by your node: - -```shell -curl http://localhost:8080/api/codex/v1/data \ - -w '\n' -``` - -### Create storage availability -> [!WARNING] -> This step requires that Codex was started with the [`prover`](/learn/run#codex-storage-node) option. - -In order to start selling storage space to the network, you must configure your node with the following command. Once configured, the node will monitor on-chain requests-for-storage and will automatically enter into contracts that meet these specifications. In order to enter and maintain storage contracts, your node is required to submit zero-knowledge storage proofs. The calculation of these proofs will increase the CPU and RAM usage of Codex. - -```shell -curl -X POST \ - http://localhost:8080/api/codex/v1/sales/availability \ - -H 'Content-Type: application/json' \ - -w '\n' \ - -d '{ - "totalSize": "8000000", - "duration": "7200", - "minPrice": "10", - "maxCollateral": "10" - }' -``` - -For descriptions of each parameter, please view the [spec](https://api.codex.storage/#tag/Marketplace/operation/offerStorage). - -### Purchase storage -To purchase storage space from the network, first you must upload your data. Once you have the CID, use the following to create a request-for-storage. - -Set your CID: - -```shell -# paste your CID from the previous step here between the quotes -CID="..." -echo "CID: ${CID}" -``` - -Next you can run: - -```shell -curl -X POST \ - "http://localhost:8080/api/codex/v1/storage/request/${CID}" \ - -w '\n' \ - -d '{ - "duration": "3600", - "reward": "1", - "proofProbability": "5", - "expiry": "1200", - "nodes": 5, - "tolerance": 2, - "collateral": "1" - }' -``` - -For descriptions of each parameter, please view the [spec](https://api.codex.storage/#tag/Marketplace/operation/createStorageRequest). - -When successful, this request will return a Purchase-ID. - -### View purchase status -Using a Purchase-ID, you can check the status of your request-for-storage contract: - -```shell -# paste your PURCHASE_ID from the previous step here between the quotes -PURCHASE_ID="..." -``` - -Then: - -```shell -curl "http://localhost:8080/api/codex/v1/storage/purchases/${PURCHASE_ID}" \ - -w '\n' -``` - -This will display state and error information for your purchase. -| State | Description | -|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Pending | Request is waiting for chain confirmation. | -| Submitted | Request is on-chain. Hosts may now attempt to download the data. | -| Started | Hosts have downloaded the data and provided proof-of-storage. | -| Failed | The request was started, but (too many) hosts failed to provide proof-of-storage on time. While the data may still be available in the network, for the purpose of the purchase it is considered lost. | -| Finished | The request was started successfully and the duration has elapsed. | -| Expired | (Not enough) hosts have submitted proof-of-storage before the request's expiry elapsed. | -| Errored | An unfortunate state of affairs. The 'error' field should tell you more. | - -## Windows - -### Overview {#overview-windows} -1. [Debug](#debug-windows) -2. [Upload a file](#upload-a-file-windows) -3. [Download a file](#download-a-file-windows) -4. [Local data](#local-data-windows) -5. [Create storage availability](#create-storage-availability-windows) -6. [Purchase storage](#purchase-storage-windows) -7. [View purchase status](#view-purchase-status-windows) - -### Debug {#debug-windows} -An easy way to check that your node is up and running is: - -```batch -curl http://localhost:8080/api/codex/v1/debug/info -``` - -This will return a JSON structure with plenty of information about your local node. It contains peer information that may be useful when troubleshooting connection issues. - -### Upload a file {#upload-a-file-windows} -> [!Warning] -> Once you upload a file to Codex, other nodes in the network can download it. Please do not upload anything you don't want others to access, or, properly encrypt your data *first*. - -```batch -curl -X POST ^ - http://localhost:8080/api/codex/v1/data ^ - -H "Content-Type: application/octet-stream" ^ - -T -``` - -On successful upload, you'll receive a CID. This can be used to download the file from any node in the network. - -> [!TIP] -> Are you on the [Codex Discord server](https://discord.gg/codex-storage)? Post your CID in the [# :wireless: | share-cids](https://discord.com/channels/895609329053474826/1278383098102284369) channel, see if others are able to download it. Codex does not (yet?) provide file metadata, so if you want others to be able to open your file, tell them which extension to give it. - -### Download a file {#download-a-file-windows} -When you have a CID of data you want to download, you can use the following commands: - -```batch -:: paste your CID from the previous step here between the quotes -set CID="..." -``` - -```batch -curl "http://localhost:8080/api/codex/v1/data/%CID%/network/stream" ^ - -o "%CID%.png" -``` - -Please use the correct extension for the downloaded file, because Codex does not store yet content-type or extension information. - -### Local data {#local-data-windows} -You can view which datasets are currently being stored by your node: - -```batch -curl http://localhost:8080/api/codex/v1/data -``` - -### Create storage availability {#create-storage-availability-windows} -> [!WARNING] -> This step requires that Codex was started with the [`prover`](/learn/run#codex-storage-node) option. - -In order to start selling storage space to the network, you must configure your node with the following command. Once configured, the node will monitor on-chain requests-for-storage and will automatically enter into contracts that meet these specifications. In order to enter and maintain storage contracts, your node is required to submit zero-knowledge storage proofs. The calculation of these proofs will increase the CPU and RAM usage of Codex. - -```batch -curl -X POST ^ - http://localhost:8080/api/codex/v1/sales/availability ^ - -H "Content-Type: application/json" ^ - -d "{""totalSize"": ""8000000"", ""duration"": ""7200"", ""minPrice"": ""10"", ""maxCollateral"": ""10""}" -``` - -For descriptions of each parameter, please view the [spec](https://api.codex.storage/#tag/Marketplace/operation/offerStorage). - -### Purchase storage {#purchase-storage-windows} -To purchase storage space from the network, first you must upload your data. Once you have the CID, use the following to create a request-for-storage. - -Set your CID: - -```batch -:: paste your CID from the previous step here between the quotes -set CID="..." -echo CID: %CID% -``` - -Next you can run: - -```batch -curl -X POST ^ - "http://localhost:8080/api/codex/v1/storage/request/%CID%" ^ - -H "Content-Type: application/json" ^ - -d "{""duration"": ""3600"",""reward"": ""1"", ""proofProbability"": ""5"", ""expiry"": ""1200"", ""nodes"": 5, ""tolerance"": 2, ""collateral"": ""1""}" -``` - -For descriptions of each parameter, please view the [spec](https://api.codex.storage/#tag/Marketplace/operation/createStorageRequest). - -When successful, this request will return a Purchase-ID. - -### View purchase status {#view-purchase-status-windows} -Using a Purchase-ID, you can check the status of your request-for-storage contract: - -```batch -:: paste your PURCHASE_ID from the previous step here between the quotes -set PURCHASE_ID="..." -``` - -Then: - -```batch -curl "http://localhost:8080/api/codex/v1/storage/purchases/%PURCHASE_ID%" -``` - -This will display state and error information for your purchase. -| State | Description | -|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Pending | Request is waiting for chain confirmation. | -| Submitted | Request is on-chain. Hosts may now attempt to download the data. | -| Started | Hosts have downloaded the data and provided proof-of-storage. | -| Failed | The request was started, but (too many) hosts failed to provide proof-of-storage on time. While the data may still be available in the network, for the purpose of the purchase it is considered lost. | -| Finished | The request was started successfully and the duration has elapsed. | -| Expired | (Not enough) hosts have submitted proof-of-storage before the request's expiry elapsed. | -| Errored | An unfortunate state of affairs. The 'error' field should tell you more. | - -## Known issues -1. We add a new line to the API calls to get more readable output, please check [[rest] Add line ending on responses #771](https://github.com/codex-storage/nim-codex/issues/771) for more details. diff --git a/ko/learn/what-is-codex.md b/ko/learn/what-is-codex.md deleted file mode 100644 index a86d84c..0000000 --- a/ko/learn/what-is-codex.md +++ /dev/null @@ -1,39 +0,0 @@ -# Codex란 무엇인가? - -Codex는 탈중앙 데이터 저장 프로토콜입니다. 주요 특징으로는 강력한 검열 저항성과 내구성 보장이 있습니다. 동일한 이름의 참조 구현이 있으며, nim 언어로 작성되었습니다. [Logos](https://logos.co/) 기술 스택의 저장 계층 역할을 합니다. 무신뢰 합의 계층인 [Nomos](http://nomos.tech)와 통신 계층인 [Waku](http://waku.org)와 함께 Logos Collective의 기반 프로젝트 중 하나입니다. - -
- -

- -### 동기 - -원격 저장소 환경은 점점 더 Google, Microsoft, Amazon과 같은 소수의 인터넷 강자들에 의해 지배되고 있습니다. 이러한 서비스들은 사용자 경험과 편의성 측면에서 높은 점수를 받지만, 중앙화된 클라우드 데이터 저장소는 다음과 같은 단점을 가지고 있습니다: - -- 검열 - -- 데이터 소유권 부재 - -- 보안 침해 및 서비스 중단 - -- 높은 비용 - -중앙화된 클라우드 저장소 제공자들은 데이터를 검열한 히스토리를 갖고 있으며, 해당 데이터의 사실상 소유자로서 자신들의 기준에 따라 그렇게 할 수 있는 권한을 가지고 있습니다. 또한, 중앙화된 플랫폼들은 수많은 경우에 주요 데이터 유출 및 서비스 중단의 피해자가 되었습니다. - -이러한 이슈들은 탈중앙화되고 검열에 저항하는 대안을 위한 시장의 틈새를 만들었습니다. 기존의 P2P 저장소 및 파일 공유 네트워크는 네트워크 중단에 대한 견고성과 검열에 대한 바람직한 저항성과 같은 일부 문제를 해결합니다. 그러나 적절한 인센티브와 강력한 데이터 내구성 보장 없이는 진정으로 멈출 수 없는 애플리케이션을 구축하기 위한 적합한 기반이 되지 못합니다. - -기존의 분산 저장소 솔루션들은 eDonkey 및 Gnutella와 같은 초기 P2P 파일 공유 플랫폼을 개선한다고 주장합니다. 그러나, 시장에는 여전히 저장소와 대역폭 사용 측면에서 효율적이면서도 기존 업체들과 비교할 만한 성능과 내구성 보장을 제공하는 분산 저장소 솔루션이 부족합니다. - -### 데이터 저장소 분산화 - -Codex는 2021년에 web3 기술 스택을 위한 내구성 있는 분산 저장 계층의 필요성을 해결하기 위해 시작되었습니다. - -"Codex"라는 이름은 고대 책의 형태를 지칭하는 것으로, 데이터 저장 엔진의 매우 강력한 99.99% 내구성을 제공합니다. - -Codex는 2023년 6월에 핵심 Logos Collective 프로토콜로 발표되었습니다. - -### 테스트넷 - -Codex는 현재 테스트넷 단계에 있습니다. 클라이언트 구현은 무료이며 오픈 소프트웨어입니다. 관심이 있으시다면, Codex를 시도하고, 테스트넷에 연결하여 기능을 실험해보시기를 권장합니다. - -[여기서 테스트넷을 시작하세요](/ko/learn/quick-start) diff --git a/ko/learn/whitepaper.md b/ko/learn/whitepaper.md deleted file mode 100644 index b6ca040..0000000 --- a/ko/learn/whitepaper.md +++ /dev/null @@ -1,28 +0,0 @@ -
- -**초록** -
- -
-
- -인터넷은 점점 더 중앙집중화되고 있습니다. 기업과 개인이 중앙집중형 클라우드 제공업체에 저장을 의존함에 따라, 프라이버시, 검열, 사용자 통제권에 대한 우려는 물론, 경제적 권력이 소수에게 집중된다는 문제도 점점 더 심각해지고 있습니다. - -이러한 문제를 해결하기 위한 다양한 시도들이 있었지만, 현대의 탈중앙 스토리지 네트워크(DSN)는 높은 내구성 보장, 운영 효율성, 확장 가능한 저장 증명 제공 등 기본적인 측면에서 종종 부족한 모습을 보입니다. - -이로 인해 다음과 같은 한계가 발생합니다. - -i) 데이터를 잃을 수 있어 실용적이지 않음 -ii) 특수하거나 고가의 하드웨어를 요구하여 탈중앙화에 적합하지 않음 -iii) 저장 장비 외의 과도한 비용 부담으로 경제성이 떨어짐 - -본 논문에서는 이러한 문제를 해결하기 위한 새로운 방식의 탈중앙 스토리지 네트워크인 Codex를 소개합니다. Codex는 이레이저 코딩(erasure coding)을 중복성과 저장 증명의 핵심 구성 요소로 활용하며, 제로 지식 증명(zero-knowledge proof) 및 지연 복구(lazy repair) 기술과 결합하여, 하드웨어 및 에너지 요구 사항은 낮추면서도 조절 가능한 내구성 보장을 달성합니다. - -Codex의 핵심은 탈중앙 내구성 엔진(Decentralized Durability Engine, DDE)이라는 개념으로, 우리는 이를 정식화하여 분산 스토리지 시스템에서 데이터 중복성, 원격 감사, 복구, 인센티브, 데이터 분산 처리 등을 체계적으로 다루는 프레임워크로 제안합니다. - -우리는 Codex의 아키텍처와 작동 메커니즘, 마켓플레이스와 증명 시스템 등을 설명하고, 연속 시간 마르코프 체인(CTMC) 모델을 활용한 초기 신뢰성 분석을 통해 내구성 보장을 평가합니다. Codex는 더 넓은 탈중앙화 생태계에서 핵심적인 역할을 할 수 있는 탈중앙의, 복원력 있는, 경제적으로 실현 가능한 저장 계층을 구축하기 위한 중요한 발걸음이라 할 수 있습니다. - -[영문으로 전문 읽기](/learn/whitepaper) - -
-
diff --git a/ko/networks/networks.md b/ko/networks/networks.md deleted file mode 100644 index f89f5d2..0000000 --- a/ko/networks/networks.md +++ /dev/null @@ -1,20 +0,0 @@ -# Codex 네트워크 - -Codex에서는 다양한 목적으로 사용되는 여러 네트워크를 출시하고 있습니다. - -| 네트워크 | 상태 | 블록체인 | 목적 | -| ------------------ | ---------------------- | ---------------------------------------------------------------------- | --------------------------------------------------------------------- | -| Devnet | :building_construction:| [Geth PoA](https://geth.ethereum.org/docs/fundamentals/private-network) | 개발 목적 전용이며 최신 `master` 빌드를 따름 | -| [Testnet](testnet) | :white_check_mark: | [Geth PoA](https://geth.ethereum.org/docs/fundamentals/private-network) | 테스트 목적의 공개 네트워크로 최신 릴리스를 따름 | -| Mainnet | :construction: | :construction: | 메인 공개 네트워크 | - -네트워크 간의 주요 차이점은 다음과 같습니다: -- 네트워크 목적 -- 부트스트랩 노드 -- 저장소 노드 수 -- 사용 가능한 저장 용량 -- 블록체인 네트워크 -- 마켓플레이스 계약 버전 -- 증명 검증에 사용되는 회로 파일 세트 - -Codex를 시작하는 가장 쉬운 방법은 [테스트넷에 참여](testnet)하는 것입니다. diff --git a/ko/networks/testnet.md b/ko/networks/testnet.md deleted file mode 100644 index 4bac94a..0000000 --- a/ko/networks/testnet.md +++ /dev/null @@ -1,225 +0,0 @@ ---- -outline: [2, 4] ---- -# Codex 테스트넷 - -Codex 테스트넷이 출시되어 테스트에 사용할 준비가 되었습니다. - -Your participation in the Codex Testnet is subject to the [Codex Testnet Terms and Conditions](https://github.com/codex-storage/codex-testnet-starter/blob/master/Codex%20Testnet%20Terms%20and%20Conditions.pdf) and [Codex Testnet Privacy Policy](https://github.com/codex-storage/codex-testnet-starter/blob/master/Codex%20Testnet%20Privacy%20Policy.pdf). - -**Guides.** We have basic guides covering how to set up a Storage Client which can be used to upload and persist files by buying storage in the Codex network. We recommend that you start with those. - -Running a Storage Provider is more involved and is covered as a separate guide which demonstrates the storage sales side, as well as how to run Codex with its own local Ethereum execution client. - -Guides are available either on Discord, as step-by-step, interactive guides, or here as simple instructions that you can follow: - -- **Basic: running a storage client.** [[Discord](#sc-guide-discord) | [web](#sc-guide-web)] -- **Advanced: Running a storage provider.** [[web](#sp-guide-web)] - -The guides were tested on the following operating systems: - - - Linux: Ubuntu 24.04, Debian 12, Fedora 40 - - macOS: 15 - - Windows: 11, Server 2022 - -## 테스트넷 정보 - -| 항목 | 값 | -| --- | --- | -| 체인 ID | 2430 | -| 통화 기호 | ETH | -| 블록 시간 | 5초 | -| 합의 | Clique PoA | -| 네트워크 ID | 2430 | -| 네트워크 이름 | Codex Testnet | -| RPC URL | https://rpc.testnet.codex.storage | - -## Running a Storage Client (Discord Version) {#sc-guide-discord} - -You can join [Codex Discord server](https://discord.gg/codex-storage) and jump into the [#:tv:|join-testnet](https://discord.com/channels/895609329053474826/1289923125928001702) channel. - -It is mostly the same as a [Web guide](#sc-guide-web), but uses Discord capabilities so you can have an interactive, step-by-step guide, and you also can get a support in the [#:sos:|node-help](https://discord.com/channels/895609329053474826/1286205545837105224) channel. - -## Running a Storage Client (Web Version) {#sc-guide-web} - -**Prerequisites** - - - Access to your Internet router so you can [configure port forwarding](#basic-common) - -Steps for [Linux/macOS](#basic-linux-macos) and [Windows](#basic-windows) are slightly different, so please use ones for your OS. - -
- -### Linux/macOS {#basic-linux-macos} - -1. Download the master tarball from the Codex testnet starter repository, and untar its contents: - ```shell - curl -LO https://github.com/codex-storage/codex-testnet-starter/archive/master.tar.gz - tar xzvf master.tar.gz - rm master.tar.gz - ``` - -2. Navigate to the scripts folder: - ```shell - cd codex-testnet-starter-master/scripts - ``` - -3. Install dependencies when required: - ```shell - # Debian-based Linux - sudo apt update && sudo apt install libgomp1 - ``` - -4. Download Codex binaries from GitHub releases: - ```shell - ./download_online.sh - ``` - -5. Generate an ethereum keypair: - ```shell - ./generate.sh - ``` - Your private key will be saved to `eth.key` and address to `eth.address` file. - -6. Fill-up your address shown on the screen with the tokens: - - Use the web faucets to mint some [ETH](https://faucet-eth.testnet.codex.storage) and [TST](https://faucet-tst.testnet.codex.storage) tokens. - - We can also do this using Discord [# bot](https://discord.com/channels/895609329053474826/1230785221553819669) channel - - Use `/set ethaddress` command to enter your generated address - - Use `/mint` command to receive ETH and TST tokens - - Use `/balance` command to check if you have received test tokens successfully - -7. Run Codex node: - ```shell - ./run_client.sh - ``` - -8. Configure [port forwarding](#basic-common) and we are ready go to. - -### Windows {#basic-windows} - -1. Download the master tarball from the Codex testnet starter repository, and untar its contents: - > [!WARNING] - > Windows antivirus software and built-in firewalls may cause steps to fail. We will cover some possible errors here, but always consider checking your setup if requests fail - in particular, if temporarily disabling your antivirus fixes it, then it is likely to be the culprit. - - ```batch - curl -LO https://github.com/codex-storage/codex-testnet-starter/archive/master.tar.gz - ``` - - If you see an error like: - - ```batch - curl: (35) schannel: next InitializeSecurityContext failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012) - The revocation function was unable to check revocation for the certificate. - ``` - - You may need to add the `--ssl-no-revoke` option to your curl call, e.g.: - - ```batch - curl -LO --ssl-no-revoke https://github.com/codex-storage/codex-testnet-starter/archive/master.tar.gz - ``` - -1. Extract the contents of the tar file, and then delete it: - ```batch - tar xzvf master.tar.gz - del master.tar.gz - ``` - -2. Navigate to the scripts folder: - ```batch - cd codex-testnet-starter-master\scripts\windows - ``` - -3. Download Codex binaries from GitHub releases: - ```batch - download-online.bat - ``` - -4. Generate an ethereum keypair: - ```batch - generate.bat - ``` - Your private key will be saved to `eth.key` and address to `eth.address` file. - -5. Fill-up your address shown on the screen with the tokens: - - Use the web faucets to mint some [ETH](https://faucet-eth.testnet.codex.storage) and [TST](https://faucet-tst.testnet.codex.storage) tokens. - - We can also do this using Discord [# bot](https://discord.com/channels/895609329053474826/1230785221553819669) channel - - Use `/set ethaddress` command to enter your generated address - - Use `/mint` command to receive ETH and TST tokens - - Use `/balance` command to check if you have received test tokens successfully - -6. Run Codex node: - ```batch - run-client.bat - ``` - - 7. Configure [port forwarding](#basic-common) and we are ready go to. - -### All OS {#basic-common} - -Configure [port forwarding](https://en.wikipedia.org/wiki/Port_forwarding) on your Internet router -| # | Protocol | Port | Description | -| - | -------- | ------ | ----------------- | -| 1 | `UDP` | `8090` | `Codex Discovery` | -| 2 | `TCP` | `8070` | `Codex Transport` | - -After your node is up and running, you can use the [Codex API](/developers/api) to be able to interact with your Codex node, please check our [API walk-through](/learn/using) for more details. - -You also can use [Codex App UI](https://app.codex.storage) to interact with your local Codex node. - -Need help? Reach out to us in [#:sos:|node-help](https://discord.com/channels/895609329053474826/1286205545837105224) channel or check [troubleshooting guide](/learn/troubleshoot.md). - -## Running a Storage Provider (Web Version) {#sp-guide-web} - -Work in progress :construction: - -## Testnet Data - -### Bootstrap Nodes -**Codex** -```shell -spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P -spr:CiUIAhIhAyUvcPkKoGE7-gh84RmKIPHJPdsX5Ugm_IHVJgF-Mmu_EgIDARo8CicAJQgCEiEDJS9w-QqgYTv6CHzhGYog8ck92xflSCb8gdUmAX4ya78QoemesAYaCwoJBES39Q2RAnVOKkYwRAIgLi3rouyaZFS_Uilx8k99ySdQCP1tsmLR21tDb9p8LcgCIG30o5YnEooQ1n6tgm9fCT7s53k6XlxyeSkD_uIO9mb3 -spr:CiUIAhIhA6_j28xa--PvvOUxH10wKEm9feXEKJIK3Z9JQ5xXgSD9EgIDARo8CicAJQgCEiEDr-PbzFr74--85TEfXTAoSb195cQokgrdn0lDnFeBIP0QzOGesAYaCwoJBK6Kf1-RAnVEKkcwRQIhAPUH5nQrqG4OW86JQWphdSdnPA98ErQ0hL9OZH9a4e5kAiBBZmUl9KnhSOiDgU3_hvjXrXZXoMxhGuZ92_rk30sNDA -spr:CiUIAhIhA7E4DEMer8nUOIUSaNPA4z6x0n9Xaknd28Cfw9S2-cCeEgIDARo8CicAJQgCEiEDsTgMQx6vydQ4hRJo08DjPrHSf1dqSd3bwJ_D1Lb5wJ4Qt_CesAYaCwoJBEDhWZORAnVYKkYwRAIgFNzhnftocLlVHJl1onuhbSUM7MysXPV6dawHAA0DZNsCIDRVu9gnPTH5UkcRXLtt7MLHCo4-DL-RCMyTcMxYBXL0 -spr:CiUIAhIhAzZn3JmJab46BNjadVnLNQKbhnN3eYxwqpteKYY32SbOEgIDARo8CicAJQgCEiEDNmfcmYlpvjoE2Np1Wcs1ApuGc3d5jHCqm14phjfZJs4QrvWesAYaCwoJBKpA-TaRAnViKkcwRQIhANuMmZDD2c25xzTbKSirEpkZYoxbq-FU_lpI0K0e4mIVAiBfQX4yR47h1LCnHznXgDs6xx5DLO5q3lUcicqUeaqGeg -spr:CiUIAhIhAgybmRwboqDdUJjeZrzh43sn5mp8jt6ENIb08tLn4x01EgIDARo8CicAJQgCEiECDJuZHBuioN1QmN5mvOHjeyfmanyO3oQ0hvTy0ufjHTUQh4ifsAYaCwoJBI_0zSiRAnVsKkcwRQIhAJCb_z0E3RsnQrEePdJzMSQrmn_ooHv6mbw1DOh5IbVNAiBbBJrWR8eBV6ftzMd6ofa5khNA2h88OBhMqHCIzSjCeA -spr:CiUIAhIhAntGLadpfuBCD9XXfiN_43-V3L5VWgFCXxg4a8uhDdnYEgIDARo8CicAJQgCEiECe0Ytp2l-4EIP1dd-I3_jf5XcvlVaAUJfGDhry6EN2dgQsIufsAYaCwoJBNEmoCiRAnV2KkYwRAIgXO3bzd5VF8jLZG8r7dcLJ_FnQBYp1BcxrOvovEa40acCIDhQ14eJRoPwJ6GKgqOkXdaFAsoszl-HIRzYcXKeb7D9 -``` - -**Geth** -```shell -enode://cff0c44c62ecd6e00d72131f336bb4e4968f2c1c1abeca7d4be2d35f818608b6d8688b6b65a18f1d57796eaca32fd9d08f15908a88afe18c1748997235ea6fe7@159.223.243.50:40010 -enode://ea331eaa8c5150a45b793b3d7c17db138b09f7c9dd7d881a1e2e17a053e0d2600e0a8419899188a87e6b91928d14267949a7e6ec18bfe972f3a14c5c2fe9aecb@68.183.245.13:40030 -enode://4a7303b8a72db91c7c80c8fb69df0ffb06370d7f5fe951bcdc19107a686ba61432dc5397d073571433e8fc1f8295127cabbcbfd9d8464b242b7ad0dcd35e67fc@174.138.127.95:40020 -enode://36f25e91385206300d04b95a2f8df7d7a792db0a76bd68f897ec7749241b5fdb549a4eecfab4a03c36955d1242b0316b47548b87ad8291794ab6d3fecda3e85b@64.225.89.147:40040 -enode://2e14e4a8092b67db76c90b0a02d97d88fc2bb9df0e85df1e0a96472cdfa06b83d970ea503a9bc569c4112c4c447dbd1e1f03cf68471668ba31920ac1d05f85e3@170.64.249.54:40050 -enode://6eeb3b3af8bef5634b47b573a17477ea2c4129ab3964210afe3b93774ce57da832eb110f90fbfcfa5f7adf18e55faaf2393d2e94710882d09d0204a9d7bc6dd2@143.244.205.40:40060 -enode://6ba0e8b5d968ca8eb2650dd984cdcf50acc01e4ea182350e990191aadd79897801b79455a1186060aa3818a6bc4496af07f0912f7af53995a5ddb1e53d6f31b5@209.38.160.40:40070 -``` - -### Smart contracts - -| Contract | Address | -| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| Token | [`0x34a22f3911De437307c6f4485931779670f78764`](https://explorer.testnet.codex.storage/address/0x34a22f3911De437307c6f4485931779670f78764) | -| Verifier | [`0x1f60B2329775545AaeF743dbC3571e699405263e`](https://explorer.testnet.codex.storage/address/0x1f60B2329775545AaeF743dbC3571e699405263e) | -| Marketplace | [`0xd53a4181862f42641ccA02Fb4CED7D7f19C6920B`](https://explorer.testnet.codex.storage/address/0xd53a4181862f42641ccA02Fb4CED7D7f19C6920B) | - -### Endpoints - -| # | Service | URL | -| - | --------------- | ---------------------------------------------------------------------------- | -| 1 | Geth Public RPC | [rpc.testnet.codex.storage](https://rpc.testnet.codex.storage) | -| 2 | Block explorer | [explorer.testnet.codex.storage](https://explorer.testnet.codex.storage) | -| 3 | Faucet ETH | [faucet-eth.testnet.codex.storage](https://faucet-eth.testnet.codex.storage) | -| 4 | Faucet TST | [faucet-tst.testnet.codex.storage](https://faucet-tst.testnet.codex.storage) | -| 5 | Status page | [status.testnet.codex.storage](https://status.testnet.codex.storage) | - -## 유용한 링크 - -| # | 서비스 | URL | -| - | --------------- | ---------------------------------------------------------------------------- | -| 1 | Geth 공개 RPC | [rpc.testnet.codex.storage](https://rpc.testnet.codex.storage) | -| 2 | 블록 탐색기 | [explorer.testnet.codex.storage](https://explorer.testnet.codex.storage) | -| 3 | ETH 수도꼭지 | [faucet-eth.testnet.codex.storage](https://faucet-eth.testnet.codex.storage) | -| 4 | TST 수도꼭지 | [faucet-tst.testnet.codex.storage](https://faucet-tst.testnet.codex.storage) | -| 5 | 상태 페이지 | [status.testnet.codex.storage](https://status.testnet.codex.storage) | diff --git a/learn/local-marketplace.md b/learn/local-marketplace.md deleted file mode 100644 index 352f665..0000000 --- a/learn/local-marketplace.md +++ /dev/null @@ -1,670 +0,0 @@ ---- -outline: [2, 3] ---- -# Running a Local Codex Network with Marketplace Support - -This tutorial will teach you how to run a small Codex network with the -_storage marketplace_ enabled; i.e., the functionality in Codex which -allows participants to offer and buy storage in a market, ensuring that -storage providers honor their part of the deal by means of cryptographic proofs. - -In this tutorial, you will: - -1. [Set Up a Geth PoA network](#_1-set-up-a-geth-poa-network); -2. [Set up The Marketplace](#_2-set-up-the-marketplace); -3. [Run Codex](#_3-run-codex); -4. [Buy and Sell Storage in the Marketplace](#_4-buy-and-sell-storage-on-the-marketplace). - -## Prerequisites - -To complete this tutorial, you will need: - -* the [geth](https://github.com/ethereum/go-ethereum) Ethereum client; - You need version `1.13.x` of geth as newer versions no longer support - Proof of Authority (PoA). This tutorial was tested using geth version `1.13.15`. -* a Codex binary, which [you can compile from source](https://github.com/codex-storage/nim-codex?tab=readme-ov-file#build-and-run). - -We will also be using [bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell)) -syntax throughout. If you use a different shell, you may need to adapt -things to your platform. - -To get started, create a new folder where we will keep the tutorial-related -files so that we can keep them separate from the codex repository. -We assume the name of the folder to be `marketplace-tutorial`. - -## 1. Set Up a Geth PoA Network - -For this tutorial, we will use a simple -[Proof-of-Authority](https://github.com/ethereum/EIPs/issues/225) network -with geth. The first step is creating a _signer account_: an account which -will be used by geth to sign the blocks in the network. -Any block signed by a signer is accepted as valid. - -### 1.1. Create a Signer Account - -To create a signer account, from the `marketplace-tutorial` directory run: - -```bash -geth account new --datadir geth-data -``` - -The account generator will ask you to input a password, which you can -leave blank. It will then print some information, -including the account's public address: - -```bash -INFO [09-29|16:49:24.244] Maximum peer count ETH=50 total=50 -Your new account is locked with a password. Please give a password. Do not forget this password. -Password: -Repeat password: - -Your new key was generated - -Public address of the key: 0x33A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB -Path of the secret key file: geth-data/keystore/UTC--2024-09-29T14-49-31.655272000Z--33a904ad57d0e2cb8ffe347d3c0e83c2e875e7db - -- You can share your public address with anyone. Others need it to interact with you. -- You must NEVER share the secret key with anyone! The key controls access to your funds! -- You must BACKUP your key file! Without the key, it's impossible to access account funds! -- You must REMEMBER your password! Without the password, it's impossible to decrypt the key! -``` - -In this example, the public address of the signer account is -`0x33A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB`. -Yours will print a different address. Save it for later usage. - -Next set an environment variable for later usage: - -```bash -export GETH_SIGNER_ADDR="0x0000000000000000000000000000000000000000" -echo ${GETH_SIGNER_ADDR} > geth_signer_address.txt -``` - -> Here make sure you replace `0x0000000000000000000000000000000000000000` -> with your public address of the signer account -> (`0x33A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB` in our example). - -### 1.2. Configure The Network and Create the Genesis Block - -The next step is telling geth what kind of network you want to run. -We will be running a [pre-merge](https://ethereum.org/en/roadmap/merge/) -network with Proof-of-Authority consensus. -To get that working, create a `network.json` file. - -If you set the `GETH_SIGNER_ADDR` variable above you can run the following -command to create the `network.json` file: - -```bash -echo "{\"config\": { \"chainId\": 12345, \"homesteadBlock\": 0, \"eip150Block\": 0, \"eip155Block\": 0, \"eip158Block\": 0, \"byzantiumBlock\": 0, \"constantinopleBlock\": 0, \"petersburgBlock\": 0, \"istanbulBlock\": 0, \"berlinBlock\": 0, \"londonBlock\": 0, \"arrowGlacierBlock\": 0, \"grayGlacierBlock\": 0, \"clique\": { \"period\": 1, \"epoch\": 30000 } }, \"difficulty\": \"1\", \"gasLimit\": \"8000000\", \"extradata\": \"0x0000000000000000000000000000000000000000000000000000000000000000${GETH_SIGNER_ADDR:2}0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\", \"alloc\": { \"${GETH_SIGNER_ADDR}\": { \"balance\": \"10000000000000000000000\"}}}" > network.json -``` - -You can also manually create the file remembering update it with your -signer public address: - -```json -{ - "config": { - "chainId": 12345, - "homesteadBlock": 0, - "eip150Block": 0, - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "berlinBlock": 0, - "londonBlock": 0, - "arrowGlacierBlock": 0, - "grayGlacierBlock": 0, - "clique": { - "period": 1, - "epoch": 30000 - } - }, - "difficulty": "1", - "gasLimit": "8000000", - "extradata": "0x000000000000000000000000000000000000000000000000000000000000000033A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "alloc": { - "0x33A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB": { - "balance": "10000000000000000000000" - } - } -} -``` - -Note that the signer account address is embedded in two different places: -* inside of the `"extradata"` string, surrounded by zeroes and stripped of - its `0x` prefix; -* as an entry key in the `alloc` session. - Make sure to replace that ID with the account ID that you wrote down in - [Step 1.1](#_1-1-create-a-signer-account). - -Once `network.json` is created, you can initialize the network with: - -```bash -geth init --datadir geth-data network.json -``` - -The output of the above command you may include some warnings, like: - -```bash -WARN [08-21|14:48:12.305] Unknown config environment variable envvar=GETH_SIGNER_ADDR -``` - -or even errors when running the command for the first time: - -```bash -ERROR[08-21|14:48:12.399] Head block is not reachable -``` - -The important part is that at the end you should see something similar to: - -```bash -INFO [08-21|14:48:12.639] Successfully wrote genesis state database=lightchaindata hash=768bf1..42d06a -``` - -### 1.3. Start your PoA Node - -We are now ready to start our $1$-node, private blockchain. -To launch the signer node, open a separate terminal in the same working -directory and make sure you have the `GETH_SIGNER_ADDR` set. -For convenience use the `geth_signer_address.txt`: - -```bash -export GETH_SIGNER_ADDR=$(cat geth_signer_address.txt) -``` - -Having the `GETH_SIGNER_ADDR` variable set, run: - -```bash -geth\ - --datadir geth-data\ - --networkid 12345\ - --unlock ${GETH_SIGNER_ADDR}\ - --nat extip:127.0.0.1\ - --netrestrict 127.0.0.0/24\ - --mine\ - --miner.etherbase ${GETH_SIGNER_ADDR}\ - --http\ - --allow-insecure-unlock -``` - -Note that, once again, the signer account created in -[Step 1.1](#_1-1-create-a-signer-account) appears both in -`--unlock` and `--allow-insecure-unlock`. - -Geth will prompt you to insert the account's password as it starts up. -Once you do that, it should be able to start up and begin "mining" blocks. - -Also here, you may encounter errors like: - -```bash -ERROR[08-21|15:00:27.625] Bootstrap node filtered by netrestrict id=c845e51a5e470e44 ip=18.138.108.67 -ERROR[08-21|15:00:27.625] Bootstrap node filtered by netrestrict id=f23ac6da7c02f84a ip=3.209.45.79 -ERROR[08-21|15:00:27.625] Bootstrap node filtered by netrestrict id=ef2d7ab886910dc8 ip=65.108.70.101 -ERROR[08-21|15:00:27.625] Bootstrap node filtered by netrestrict id=6b36f791352f15eb ip=157.90.35.166 -``` - -You can safely ignore them. - -If the command above fails with: - -```bash -Fatal: Failed to register the Ethereum service: only PoS networks are supported, please transition old ones with Geth v1.13.x -``` - -make sure, you are running the correct Geth version -(see Section [Prerequisites](#prerequisites)) - -## 2. Set Up The Marketplace - -You will need to open new terminal for this section and geth needs to be -running already. Setting up the Codex marketplace entails: - -1. Deploying the Codex Marketplace contracts to our private blockchain -2. Setup Ethereum accounts we will use to buy and sell storage in - the Codex marketplace -3. Provisioning those accounts with the required token balances - -### 2.1. Deploy the Codex Marketplace Contracts - -Make sure you leave the `marketplace-tutorial` directory, and clone -the `codex-storage/nim-codex.git`: - -```bash -git clone https://github.com/codex-storage/nim-codex.git -``` - -> If you just want to clone the repo to run the tutorial, you can -> skip the history and just download the head of the master branch by using -> `--depth 1` option: `git clone --depth 1 https://github.com/codex-storage/nim-codex.git` - -Thus, our directory structure for the purpose of this tutorial looks like this: - -```bash -| -|-- nim-codex -└-- marketplace-tutorial -``` - -> You could clone the `codex-storage/nim-codex.git` to some other location. -> Just to keeps things nicely separated it is best to make sure that -> `nim-codex` is not under `marketplace-tutorial` directory. - -Now, from the `nim-codex` folder run: - -```bash -make update && make -``` - -> This may take a moment as it will also build the `nim` compiler. Be patient. - -Now, in order to start a local Ethereum network run: - -```bash -cd vendor/codex-contracts-eth -npm install -``` - -> While writing the document we used `node` version `v20.17.0` and -> `npm` version `11.0.0`. - -Before continuing you now must **wait until $256$ blocks are mined** -**in your PoAnetwork**, or deploy will fail. This should take about -$4$ minutes and $30$ seconds. You can check which block height you are -currently at by running the following command -**from the `marketplace-tutorial` folder**: - -```bash -geth attach --exec web3.eth.blockNumber ./geth-data/geth.ipc -``` - -once that gets past $256$, you are ready to go. - -To deploy contracts, from the `codex-contracts-eth` directory run: - -```bash -export DISTTEST_NETWORK_URL=http://localhost:8545 -npx hardhat --network codexdisttestnetwork deploy -``` - -If the command completes successfully, you will see the output similar -to this one: - -```bash -Deployed Marketplace with Groth16 Verifier at: -0xCf0df6C52B02201F78E8490B6D6fFf5A82fC7BCd -``` -> of course your address will be different. - -You are now ready to prepare the accounts. - -### 2.2. Generate the Required Accounts - -We will run $2$ Codex nodes: a **storage provider**, which will sell storage -on the network, and a **client**, which will buy and use such storage; -we therefore need two valid Ethereum accounts. We could create random -accounts by using one of the many tools available to that end but, since -this is a tutorial running on a local private network, we will simply -provide you with two pre-made accounts along with their private keys, -which you can copy and paste instead: - -First make sure you're back in the `marketplace-tutorial` folder and -not the `codex-contracts-eth` subfolder. Then set these variables: - -**Storage:** -```bash -export ETH_STORAGE_ADDR=0x45BC5ca0fbdD9F920Edd12B90908448C30F32a37 -export ETH_STORAGE_PK=0x06c7ac11d4ee1d0ccb53811b71802fa92d40a5a174afad9f2cb44f93498322c3 -echo $ETH_STORAGE_PK > storage.pkey && chmod 0600 storage.pkey -``` - -**Client:** -```bash -export ETH_CLIENT_ADDR=0x9F0C62Fe60b22301751d6cDe1175526b9280b965 -export ETH_CLIENT_PK=0x5538ec03c956cb9d0bee02a25b600b0225f1347da4071d0fd70c521fdc63c2fc -echo $ETH_CLIENT_PK > client.pkey && chmod 0600 client.pkey -``` - -### 2.3. Provision Accounts with Tokens - -We now need to transfer some ETH to each of the accounts, as well as provide -them with some Codex tokens for the storage node to use as collateral and -for the client node to buy actual storage. - -Although the process is not particularly complicated, I suggest you use -[the script we prepared](https://github.com/gmega/local-codex-bare/blob/main/scripts/mint-tokens.js) -for that. This script, essentially: - -1. reads the Marketplace contract address and its ABI from the deployment data; -2. transfers $1$ ETH from the signer account to a target account if the target - account has no ETH balance; -3. mints $n$ Codex tokens and adds it into the target account's balance. - -To use the script, just download it into a local file named `mint-tokens.js`, -for instance using `curl` (make sure you are in -the `marketplace-tutorial` directory): - -```bash -# download script -curl https://raw.githubusercontent.com/gmega/codex-local-bare/main/scripts/mint-tokens.js -o mint-tokens.js -``` - -Then run: - -```bash -# set the contract file location (we assume you are in the marketplace-tutorial directory) -export CONTRACT_DEPLOY_FULL="../nim-codex/vendor/codex-contracts-eth/deployments/codexdisttestnetwork" -export GETH_SIGNER_ADDR=$(cat geth_signer_address.txt) -# Installs Web3-js -npm install web3 -# Provides tokens to the storage account. -node ./mint-tokens.js $CONTRACT_DEPLOY_FULL/TestToken.json $GETH_SIGNER_ADDR 0x45BC5ca0fbdD9F920Edd12B90908448C30F32a37 1000000000000000000 -# Provides tokens to the client account. -node ./mint-tokens.js $CONTRACT_DEPLOY_FULL/TestToken.json $GETH_SIGNER_ADDR 0x9F0C62Fe60b22301751d6cDe1175526b9280b965 1000000000000000000 -``` - -If you get a message like - -```bash -Usage: mint-tokens.js -``` - -then you need to ensure you provided all the required arguments. -In particular you need to ensure that the `GETH_SIGNER_ADDR` env variable -holds the signer address (we used -`export GETH_SIGNER_ADDR=$(cat geth_signer_address.txt)` above to -make sure it is set). - -## 3. Run Codex - -With accounts and geth in place, we can now start the Codex nodes. - -### 3.1. Storage Node - -The storage node will be the one storing data and submitting the proofs of -storage to the chain. To do that, it needs access to: - -1. the address of the Marketplace contract that has been deployed to - the local geth node in [Step 2.1](#_2-1-deploy-the-codex-marketplace-contracts); -2. the sample ceremony files which are shipped in the Codex contracts repo - (`nim-codex/vendor/codex-contracts-eth`). - -**Address of the Marketplace Contract.** The contract address can be found -inside of the file `nim-codex/vendor/codex-contracts-eth/deployments/codexdisttestnetwork/Marketplace.json`. -We captured that location above in `CONTRACT_DEPLOY_FULL` variable, thus, from -the `marketplace-tutorial` folder just run: - -```bash -grep '"address":' ${CONTRACT_DEPLOY_FULL}/Marketplace.json -``` - -which should print something like: -```bash -"address": "0xCf0df6C52B02201F78E8490B6D6fFf5A82fC7BCd", -``` - -> This address should match the address we got earlier when deploying -> the Marketplace contract above. - -Then run the following with the correct market place address: -```bash -export MARKETPLACE_ADDRESS="0x0000000000000000000000000000000000000000" -echo ${MARKETPLACE_ADDRESS} > marketplace_address.txt -``` - -where you replace `0x0000000000000000000000000000000000000000` with -the address of the Marketplace contract. - -**Prover ceremony files.** The ceremony files are under the -`nim-codex/vendor/codex-contracts-eth/verifier/networks/codexdisttestnetwork` -subdirectory. There are three of them: `proof_main.r1cs`, `proof_main.zkey`, -and `prooof_main.wasm`. We will need all of them to start the Codex storage node. - -**Starting the storage node.** Let: - -* `PROVER_ASSETS` contain the directory where the prover ceremony files are - located. **This must be an absolute path**; -* `CODEX_BINARY` contain the location of your Codex binary; -* `MARKETPLACE_ADDRESS` contain the address of the Marketplace contract - (we have already set it above). - -Set these paths into environment variables (make sure you are in -the `marketplace-tutorial` directory): - -```bash -export CONTRACT_DEPLOY_FULL=$(realpath "../nim-codex/vendor/codex-contracts-eth/deployments/codexdisttestnetwork") -export PROVER_ASSETS=$(realpath "../nim-codex/vendor/codex-contracts-eth/verifier/networks/codexdisttestnetwork/") -export CODEX_BINARY=$(realpath "../nim-codex/build/codex") -export MARKETPLACE_ADDRESS=$(cat marketplace_address.txt) -``` -> you may notice, that we have already set the `CONTRACT_DEPLOY_FULL` variable -> above. Here, we make sure it is an absolute path. - -To launch the storage node, run: - -```bash -${CODEX_BINARY}\ - --data-dir=./codex-storage\ - --listen-addrs=/ip4/0.0.0.0/tcp/8080\ - --api-port=8000\ - --disc-port=8090\ - persistence\ - --eth-provider=http://localhost:8545\ - --eth-private-key=./storage.pkey\ - --marketplace-address=${MARKETPLACE_ADDRESS}\ - --validator\ - --validator-max-slots=1000\ - prover\ - --circom-r1cs=${PROVER_ASSETS}/proof_main.r1cs\ - --circom-wasm=${PROVER_ASSETS}/proof_main.wasm\ - --circom-zkey=${PROVER_ASSETS}/proof_main.zkey -``` - -**Starting the client node.** - -The client node is started similarly except that: - -* we need to pass the SPR of the storage node so it can form a network with it; -* since it does not run any proofs, it does not require any ceremony files. - -We get the Signed Peer Record (SPR) of the storage node so we can bootstrap -the client node with it. To get the SPR, issue the following call: - -```bash -curl -H 'Accept: text/plain' 'http://localhost:8000/api/codex/v1/spr' --write-out '\n' -``` - -You should get the SPR back starting with `spr:`. - -Before you proceed, open new terminal, and enter `marketplace-tutorial` directory. - -Next set these paths into environment variables: - -```bash -# set the SPR for the storage node -export STORAGE_NODE_SPR=$(curl -H 'Accept: text/plain' 'http://localhost:8000/api/codex/v1/spr') -# basic vars -export CONTRACT_DEPLOY_FULL=$(realpath "../nim-codex/vendor/codex-contracts-eth/deployments/codexdisttestnetwork") -export CODEX_BINARY=$(realpath "../nim-codex/build/codex") -export MARKETPLACE_ADDRESS=$(cat marketplace_address.txt) -``` -and then run: - -```bash -${CODEX_BINARY}\ - --data-dir=./codex-client\ - --listen-addrs=/ip4/0.0.0.0/tcp/8081\ - --api-port=8001\ - --disc-port=8091\ - --bootstrap-node=${STORAGE_NODE_SPR}\ - persistence\ - --eth-provider=http://localhost:8545\ - --eth-private-key=./client.pkey\ - --marketplace-address=${MARKETPLACE_ADDRESS} -``` - -## 4. Buy and Sell Storage on the Marketplace - -Any storage negotiation has two sides: a buyer and a seller. -Therefore, before we can actually request storage, we must first offer -some of it for sale. - -### 4.1 Sell Storage - -The following request will cause the storage node to put out $5\text{MB}$ -of storage for sale for $1$ hour, at a minimum price of $1000$ Codex token -per byte per second, while expressing that maximum penalty (a collateral) -the storage provider is willing to risk for not fulfilling its part of the -contract is limited to $50000000$ tokens (wei) for this specific availability.[^1] -This total collateral will be distributed across all storage requests matching -this availability. - -```bash -curl 'http://localhost:8000/api/codex/v1/sales/availability' \ - --header 'Content-Type: application/json' \ - --data '{ - "totalSize": "5000000", - "duration": "3600", - "minPricePerBytePerSecond": "1000", - "totalCollateral": "50000000" -}' -``` - -This should return a JSON response containing an `id` (e.g. -`"id": "0xb55b3bc7aac2563d5bf08ce8a177a38b5a40254bfa7ee8f9c52debbb176d44b0"`) -which identifies this storage offer. - -> To make JSON responses more readable, you can try -> [jq](https://jqlang.github.io/jq/) JSON formatting utility -> by just adding `| jq` after the command. -> On macOS you can install with `brew install jq`. - -To check the current storage offers for this node, you can issue: - -```bash -curl 'http://localhost:8000/api/codex/v1/sales/availability' -``` - -or with `jq`: - -```bash -curl 'http://localhost:8000/api/codex/v1/sales/availability' | jq -``` - -This should print a list of offers, with the one you just created figuring -among them (for our tutorial, there will be only one offer returned -at this time). - -### 4.2. Buy Storage - -Before we can buy storage, we must have some actual data to request -storage for. Start by uploading a small file to your client node. -On Linux (or macOS) you could, for instance, use `dd` to generate a $1M$ file: - -```bash -dd if=/dev/urandom of=./data.bin bs=1M count=1 -``` - -Assuming your file is named `data.bin`, you can upload it with: - -```bash -curl --request POST http://localhost:8001/api/codex/v1/data --header 'Content-Type: application/octet-stream' --write-out '\n' -T ./data.bin -``` - -Once the upload completes, you should see a _Content Identifier_, -or _CID_ (e.g. `zDvZRwzm2mK7tvDzKScRLapqGdgNTLyyEBvx1TQY37J2CdWdS6Sj`) -for the uploaded file printed to the terminal. -Use that CID in the purchase request: - -```bash -# make sure to replace the CID before with the CID you got in the previous step -export CID=zDvZRwzm2mK7tvDzKScRLapqGdgNTLyyEBvx1TQY37J2CdWdS6Sj -``` - -```bash -curl "http://localhost:8001/api/codex/v1/storage/request/${CID}" \ - --header 'Content-Type: application/octet-stream' \ - --data "{ - \"duration\": \"600\", - \"pricePerBytePerSecond\": \"2000\", - \"proofProbability\": \"3\", - \"expiry\": \"500\", - \"nodes\": 3, - \"tolerance\": 1, - \"collateralPerByte\": \"1\" - }" \ - --write-out '\n' -``` - -The parameters under `--data` say that: - -1. we want to purchase storage for our file for $5$ minutes (`"duration": "600"`); -2. we are willing to pay up to $2000$ tokens (wei) per slot per second - (`"pricePerBytePerSecond": "2000"`). It is then twice as much as - `minPricePerBytePerSecond`, which we set to $1000$ when creating the availability - above. -3. our file will be split into three pieces (`"nodes": 3`). - Because we set `"tolerance": 1` we only need two (`nodes - tolerance`) - pieces to rebuild the file; i.e., we can tolerate that at most one node - stops storing our data; either due to failure or other reasons; -4. we demand `1` token in collateral from storage providers per byte of storage - per second for each piece of data (called _slots_). Because we provide some redundancy to - the stored data, the actual size of the stored dataset will be bigger than original - content (the bigger the `tolerance` the bigger the resulting dataset). -5. finally, the `expiry` puts a time limit for filling all the slots by - the storage provider(s). If slots are not filled by the `expire` interval, - the request will timeout and fail. - -### 4.3. Track your Storage Requests - -POSTing a storage request will make it available in the storage market, -and a storage node will eventually pick it up. - -You can poll the status of your request by means of: -```bash -export STORAGE_PURCHASE_ID="6b6e2445f33ed624891f0543fe9dbf4bd0a6971febccaae2431375a5b9a2840d" -curl "http://localhost:8001/api/codex/v1/storage/purchases/${STORAGE_PURCHASE_ID}" -``` - -This returns a result like: - -```json -{ - "requestId": "0x6b6e2445f33ed624891f0543fe9dbf4bd0a6971febccaae2431375a5b9a2840d", - "request": { - "client": "0x9f0c62fe60b22301751d6cde1175526b9280b965", - "ask": { - "proofProbability": "3", - "pricePerBytePerSecond": "2000", - "collateralPerByte": "1", - "slots": 3, - "slotSize": 524288, - "duration": 600, - "maxSlotLoss": 1 - }, - "content": { - "cid": "zDvZRwzm18zqvTRMHhjDmwybKZaomW8bDFtdSyaQ4XM6MmER5fzy" - }, - "expiry": 500, - "nonce": "0x5267b832fe9a978fb0dd3912b42fece7c5ac074a9cc3c74bf578b6cee9e43543", - "id": "0x6b6e2445f33ed624891f0543fe9dbf4bd0a6971febccaae2431375a5b9a2840d" - }, - "state": "submitted", - "error": null -} -``` - -Shows that a request has been submitted but has not yet been filled. -Your request will be successful once `"state"` shows `"started"`. -Anything other than that means the request has not been completely -processed yet, and an `"error"` state other than `null` means it failed. - -Well, it was quite a journey, wasn't it? You can congratulate yourself for -successfully finishing the codex marketplace tutorial! - -[^1]: Codex files get partitioned into pieces called "slots" and distributed -to various storage providers. The collateral refers to one such slot, -and will be slowly eaten away as the storage provider fails to deliver -timely proofs. diff --git a/package-lock.json b/package-lock.json index fb06e8e..cdacfe9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,38 +13,54 @@ "vitepress-plugin-mermaid": "^2.0.17" } }, - "node_modules/@algolia/autocomplete-core": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz", - "integrity": "sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==", + "node_modules/@algolia/abtesting": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@algolia/abtesting/-/abtesting-1.3.0.tgz", + "integrity": "sha512-KqPVLdVNfoJzX5BKNGM9bsW8saHeyax8kmPFXul5gejrSPN3qss7PgsFH5mMem7oR8tvjvNkia97ljEYPYCN8Q==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/autocomplete-plugin-algolia-insights": "1.9.3", - "@algolia/autocomplete-shared": "1.9.3" + "@algolia/client-common": "5.37.0", + "@algolia/requester-browser-xhr": "5.37.0", + "@algolia/requester-fetch": "5.37.0", + "@algolia/requester-node-http": "5.37.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/autocomplete-core": { + "version": "1.17.9", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.17.9.tgz", + "integrity": "sha512-O7BxrpLDPJWWHv/DLA9DRFWs+iY1uOJZkqUwjS5HSZAGcl0hIVCQ97LTLewiZmZ402JYUrun+8NqFP+hCknlbQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/autocomplete-plugin-algolia-insights": "1.17.9", + "@algolia/autocomplete-shared": "1.17.9" } }, "node_modules/@algolia/autocomplete-plugin-algolia-insights": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.3.tgz", - "integrity": "sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==", + "version": "1.17.9", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.17.9.tgz", + "integrity": "sha512-u1fEHkCbWF92DBeB/KHeMacsjsoI0wFhjZtlCq2ddZbAehshbZST6Hs0Avkc0s+4UyBGbMDnSuXHLuvRWK5iDQ==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/autocomplete-shared": "1.9.3" + "@algolia/autocomplete-shared": "1.17.9" }, "peerDependencies": { "search-insights": ">= 1 < 3" } }, "node_modules/@algolia/autocomplete-preset-algolia": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.9.3.tgz", - "integrity": "sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==", + "version": "1.17.9", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.17.9.tgz", + "integrity": "sha512-Na1OuceSJeg8j7ZWn5ssMu/Ax3amtOwk76u4h5J4eK2Nx2KB5qt0Z4cOapCsxot9VcEN11ADV5aUSlQF4RhGjQ==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/autocomplete-shared": "1.9.3" + "@algolia/autocomplete-shared": "1.17.9" }, "peerDependencies": { "@algolia/client-search": ">= 4.9.1 < 6", @@ -52,9 +68,9 @@ } }, "node_modules/@algolia/autocomplete-shared": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.3.tgz", - "integrity": "sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==", + "version": "1.17.9", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.17.9.tgz", + "integrity": "sha512-iDf05JDQ7I0b7JEA/9IektxN/80a2MZ1ToohfmNS3rfeuQnIKI3IJlIafD0xu4StbtQTghx9T3Maa97ytkXenQ==", "dev": true, "license": "MIT", "peerDependencies": { @@ -62,167 +78,197 @@ "algoliasearch": ">= 4.9.1 < 6" } }, - "node_modules/@algolia/cache-browser-local-storage": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.24.0.tgz", - "integrity": "sha512-t63W9BnoXVrGy9iYHBgObNXqYXM3tYXCjDSHeNwnsc324r4o5UiVKUiAB4THQ5z9U5hTj6qUvwg/Ez43ZD85ww==", + "node_modules/@algolia/client-abtesting": { + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.37.0.tgz", + "integrity": "sha512-Dp2Zq+x9qQFnuiQhVe91EeaaPxWBhzwQ6QnznZQnH9C1/ei3dvtmAFfFeaTxM6FzfJXDLvVnaQagTYFTQz3R5g==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/cache-common": "4.24.0" - } - }, - "node_modules/@algolia/cache-common": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.24.0.tgz", - "integrity": "sha512-emi+v+DmVLpMGhp0V9q9h5CdkURsNmFC+cOS6uK9ndeJm9J4TiqSvPYVu+THUP8P/S08rxf5x2P+p3CfID0Y4g==", - "dev": true, - "license": "MIT" - }, - "node_modules/@algolia/cache-in-memory": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.24.0.tgz", - "integrity": "sha512-gDrt2so19jW26jY3/MkFg5mEypFIPbPoXsQGQWAi6TrCPsNOSEYepBMPlucqWigsmEy/prp5ug2jy/N3PVG/8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/cache-common": "4.24.0" - } - }, - "node_modules/@algolia/client-account": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.24.0.tgz", - "integrity": "sha512-adcvyJ3KjPZFDybxlqnf+5KgxJtBjwTPTeyG2aOyoJvx0Y8dUQAEOEVOJ/GBxX0WWNbmaSrhDURMhc+QeevDsA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/client-common": "4.24.0", - "@algolia/client-search": "4.24.0", - "@algolia/transporter": "4.24.0" + "@algolia/client-common": "5.37.0", + "@algolia/requester-browser-xhr": "5.37.0", + "@algolia/requester-fetch": "5.37.0", + "@algolia/requester-node-http": "5.37.0" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/client-analytics": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.24.0.tgz", - "integrity": "sha512-y8jOZt1OjwWU4N2qr8G4AxXAzaa8DBvyHTWlHzX/7Me1LX8OayfgHexqrsL4vSBcoMmVw2XnVW9MhL+Y2ZDJXg==", + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.37.0.tgz", + "integrity": "sha512-wyXODDOluKogTuZxRII6mtqhAq4+qUR3zIUJEKTiHLe8HMZFxfUEI4NO2qSu04noXZHbv/sRVdQQqzKh12SZuQ==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/client-common": "4.24.0", - "@algolia/client-search": "4.24.0", - "@algolia/requester-common": "4.24.0", - "@algolia/transporter": "4.24.0" + "@algolia/client-common": "5.37.0", + "@algolia/requester-browser-xhr": "5.37.0", + "@algolia/requester-fetch": "5.37.0", + "@algolia/requester-node-http": "5.37.0" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/client-common": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz", - "integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==", + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.37.0.tgz", + "integrity": "sha512-GylIFlPvLy9OMgFG8JkonIagv3zF+Dx3H401Uo2KpmfMVBBJiGfAb9oYfXtplpRMZnZPxF5FnkWaI/NpVJMC+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-insights": { + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.37.0.tgz", + "integrity": "sha512-T63afO2O69XHKw2+F7mfRoIbmXWGzgpZxgOFAdP3fR4laid7pWBt20P4eJ+Zn23wXS5kC9P2K7Bo3+rVjqnYiw==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/requester-common": "4.24.0", - "@algolia/transporter": "4.24.0" + "@algolia/client-common": "5.37.0", + "@algolia/requester-browser-xhr": "5.37.0", + "@algolia/requester-fetch": "5.37.0", + "@algolia/requester-node-http": "5.37.0" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/client-personalization": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.24.0.tgz", - "integrity": "sha512-l5FRFm/yngztweU0HdUzz1rC4yoWCFo3IF+dVIVTfEPg906eZg5BOd1k0K6rZx5JzyyoP4LdmOikfkfGsKVE9w==", + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.37.0.tgz", + "integrity": "sha512-1zOIXM98O9zD8bYDCJiUJRC/qNUydGHK/zRK+WbLXrW1SqLFRXECsKZa5KoG166+o5q5upk96qguOtE8FTXDWQ==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/client-common": "4.24.0", - "@algolia/requester-common": "4.24.0", - "@algolia/transporter": "4.24.0" + "@algolia/client-common": "5.37.0", + "@algolia/requester-browser-xhr": "5.37.0", + "@algolia/requester-fetch": "5.37.0", + "@algolia/requester-node-http": "5.37.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-query-suggestions": { + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.37.0.tgz", + "integrity": "sha512-31Nr2xOLBCYVal+OMZn1rp1H4lPs1914Tfr3a34wU/nsWJ+TB3vWjfkUUuuYhWoWBEArwuRzt3YNLn0F/KRVkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.37.0", + "@algolia/requester-browser-xhr": "5.37.0", + "@algolia/requester-fetch": "5.37.0", + "@algolia/requester-node-http": "5.37.0" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/client-search": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz", - "integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==", + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.37.0.tgz", + "integrity": "sha512-DAFVUvEg+u7jUs6BZiVz9zdaUebYULPiQ4LM2R4n8Nujzyj7BZzGr2DCd85ip4p/cx7nAZWKM8pLcGtkTRTdsg==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/client-common": "4.24.0", - "@algolia/requester-common": "4.24.0", - "@algolia/transporter": "4.24.0" + "@algolia/client-common": "5.37.0", + "@algolia/requester-browser-xhr": "5.37.0", + "@algolia/requester-fetch": "5.37.0", + "@algolia/requester-node-http": "5.37.0" + }, + "engines": { + "node": ">= 14.0.0" } }, - "node_modules/@algolia/logger-common": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.24.0.tgz", - "integrity": "sha512-LLUNjkahj9KtKYrQhFKCzMx0BY3RnNP4FEtO+sBybCjJ73E8jNdaKJ/Dd8A/VA4imVHP5tADZ8pn5B8Ga/wTMA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@algolia/logger-console": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.24.0.tgz", - "integrity": "sha512-X4C8IoHgHfiUROfoRCV+lzSy+LHMgkoEEU1BbKcsfnV0i0S20zyy0NLww9dwVHUWNfPPxdMU+/wKmLGYf96yTg==", + "node_modules/@algolia/ingestion": { + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.37.0.tgz", + "integrity": "sha512-pkCepBRRdcdd7dTLbFddnu886NyyxmhgqiRcHHaDunvX03Ij4WzvouWrQq7B7iYBjkMQrLS8wQqSP0REfA4W8g==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/logger-common": "4.24.0" + "@algolia/client-common": "5.37.0", + "@algolia/requester-browser-xhr": "5.37.0", + "@algolia/requester-fetch": "5.37.0", + "@algolia/requester-node-http": "5.37.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/monitoring": { + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.37.0.tgz", + "integrity": "sha512-fNw7pVdyZAAQQCJf1cc/ih4fwrRdQSgKwgor4gchsI/Q/ss9inmC6bl/69jvoRSzgZS9BX4elwHKdo0EfTli3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.37.0", + "@algolia/requester-browser-xhr": "5.37.0", + "@algolia/requester-fetch": "5.37.0", + "@algolia/requester-node-http": "5.37.0" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/recommend": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-4.24.0.tgz", - "integrity": "sha512-P9kcgerfVBpfYHDfVZDvvdJv0lEoCvzNlOy2nykyt5bK8TyieYyiD0lguIJdRZZYGre03WIAFf14pgE+V+IBlw==", + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.37.0.tgz", + "integrity": "sha512-U+FL5gzN2ldx3TYfQO5OAta2TBuIdabEdFwD5UVfWPsZE5nvOKkc/6BBqP54Z/adW/34c5ZrvvZhlhNTZujJXQ==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/cache-browser-local-storage": "4.24.0", - "@algolia/cache-common": "4.24.0", - "@algolia/cache-in-memory": "4.24.0", - "@algolia/client-common": "4.24.0", - "@algolia/client-search": "4.24.0", - "@algolia/logger-common": "4.24.0", - "@algolia/logger-console": "4.24.0", - "@algolia/requester-browser-xhr": "4.24.0", - "@algolia/requester-common": "4.24.0", - "@algolia/requester-node-http": "4.24.0", - "@algolia/transporter": "4.24.0" + "@algolia/client-common": "5.37.0", + "@algolia/requester-browser-xhr": "5.37.0", + "@algolia/requester-fetch": "5.37.0", + "@algolia/requester-node-http": "5.37.0" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/requester-browser-xhr": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.24.0.tgz", - "integrity": "sha512-Z2NxZMb6+nVXSjF13YpjYTdvV3032YTBSGm2vnYvYPA6mMxzM3v5rsCiSspndn9rzIW4Qp1lPHBvuoKJV6jnAA==", + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.37.0.tgz", + "integrity": "sha512-Ao8GZo8WgWFABrU7iq+JAftXV0t+UcOtCDL4mzHHZ+rQeTTf1TZssr4d0vIuoqkVNnKt9iyZ7T4lQff4ydcTrw==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/requester-common": "4.24.0" + "@algolia/client-common": "5.37.0" + }, + "engines": { + "node": ">= 14.0.0" } }, - "node_modules/@algolia/requester-common": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.24.0.tgz", - "integrity": "sha512-k3CXJ2OVnvgE3HMwcojpvY6d9kgKMPRxs/kVohrwF5WMr2fnqojnycZkxPoEg+bXm8fi5BBfFmOqgYztRtHsQA==", + "node_modules/@algolia/requester-fetch": { + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.37.0.tgz", + "integrity": "sha512-H7OJOXrFg5dLcGJ22uxx8eiFId0aB9b0UBhoOi4SMSuDBe6vjJJ/LeZyY25zPaSvkXNBN3vAM+ad6M0h6ha3AA==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.37.0" + }, + "engines": { + "node": ">= 14.0.0" + } }, "node_modules/@algolia/requester-node-http": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.24.0.tgz", - "integrity": "sha512-JF18yTjNOVYvU/L3UosRcvbPMGT9B+/GQWNWnenIImglzNVGpyzChkXLnrSf6uxwVNO6ESGu6oN8MqcGQcjQJw==", + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.37.0.tgz", + "integrity": "sha512-npZ9aeag4SGTx677eqPL3rkSPlQrnzx/8wNrl1P7GpWq9w/eTmRbOq+wKrJ2r78idlY0MMgmY/mld2tq6dc44g==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/requester-common": "4.24.0" - } - }, - "node_modules/@algolia/transporter": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.24.0.tgz", - "integrity": "sha512-86nI7w6NzWxd1Zp9q3413dRshDqAzSbsQjhcDhPIatEFiZrL1/TjnHL8S7jVKFePlIMzDsZWXAXwXzcok9c5oA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/cache-common": "4.24.0", - "@algolia/logger-common": "4.24.0", - "@algolia/requester-common": "4.24.0" + "@algolia/client-common": "5.37.0" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@antfu/install-pkg": { @@ -250,9 +296,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", - "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "dev": true, "license": "MIT", "engines": { @@ -260,9 +306,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "dev": true, "license": "MIT", "engines": { @@ -270,13 +316,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.25.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.3.tgz", - "integrity": "sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", + "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.25.2" + "@babel/types": "^7.28.4" }, "bin": { "parser": "bin/babel-parser.js" @@ -286,15 +332,14 @@ } }, "node_modules/@babel/types": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.2.tgz", - "integrity": "sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", + "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.24.8", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -352,39 +397,39 @@ "license": "Apache-2.0" }, "node_modules/@docsearch/css": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.6.1.tgz", - "integrity": "sha512-VtVb5DS+0hRIprU2CO6ZQjK2Zg4QU5HrDM1+ix6rT0umsYvFvatMAnf97NHZlVWDaaLlx7GRfR/7FikANiM2Fg==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.9.0.tgz", + "integrity": "sha512-cQbnVbq0rrBwNAKegIac/t6a8nWoUAn8frnkLFW6YARaRmAQr5/Eoe6Ln2fqkUCZ40KpdrKbpSAmgrkviOxuWA==", "dev": true, "license": "MIT" }, "node_modules/@docsearch/js": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-3.6.1.tgz", - "integrity": "sha512-erI3RRZurDr1xES5hvYJ3Imp7jtrXj6f1xYIzDzxiS7nNBufYWPbJwrmMqWC5g9y165PmxEmN9pklGCdLi0Iqg==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-3.9.0.tgz", + "integrity": "sha512-4bKHcye6EkLgRE8ze0vcdshmEqxeiJM77M0JXjef7lrYZfSlMunrDOCqyLjiZyo1+c0BhUqA2QpFartIjuHIjw==", "dev": true, "license": "MIT", "dependencies": { - "@docsearch/react": "3.6.1", + "@docsearch/react": "3.9.0", "preact": "^10.0.0" } }, "node_modules/@docsearch/react": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.6.1.tgz", - "integrity": "sha512-qXZkEPvybVhSXj0K7U3bXc233tk5e8PfhoZ6MhPOiik/qUQxYC+Dn9DnoS7CxHQQhHfCvTiN0eY9M12oRghEXw==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.9.0.tgz", + "integrity": "sha512-mb5FOZYZIkRQ6s/NWnM98k879vu5pscWqTLubLFBO87igYYT4VzVazh4h5o/zCvTIZgEt3PvsCOMOswOUo9yHQ==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/autocomplete-core": "1.9.3", - "@algolia/autocomplete-preset-algolia": "1.9.3", - "@docsearch/css": "3.6.1", - "algoliasearch": "^4.19.1" + "@algolia/autocomplete-core": "1.17.9", + "@algolia/autocomplete-preset-algolia": "1.17.9", + "@docsearch/css": "3.9.0", + "algoliasearch": "^5.14.2" }, "peerDependencies": { - "@types/react": ">= 16.8.0 < 19.0.0", - "react": ">= 16.8.0 < 19.0.0", - "react-dom": ">= 16.8.0 < 19.0.0", + "@types/react": ">= 16.8.0 < 20.0.0", + "react": ">= 16.8.0 < 20.0.0", + "react-dom": ">= 16.8.0 < 20.0.0", "search-insights": ">= 1 < 3" }, "peerDependenciesMeta": { @@ -402,380 +447,6 @@ } } }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", - "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", - "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", - "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", - "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", - "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", - "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", - "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", - "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", - "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", - "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", - "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", - "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", - "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", - "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", - "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", - "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", - "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", - "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", - "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", - "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", - "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@esbuild/win32-x64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", @@ -793,6 +464,16 @@ "node": ">=12" } }, + "node_modules/@iconify-json/simple-icons": { + "version": "1.2.52", + "resolved": "https://registry.npmjs.org/@iconify-json/simple-icons/-/simple-icons-1.2.52.tgz", + "integrity": "sha512-c41YOMzBhl3hp58WJLxT+Qq3UhBd8GZAMkbS8ddlCuIGLW0COGe2YSfOA2+poA8/bxLhUQODRNjAy3KhiAOtzA==", + "dev": true, + "license": "CC0-1.0", + "dependencies": { + "@iconify/types": "*" + } + }, "node_modules/@iconify/types": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz", @@ -817,9 +498,9 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true, "license": "MIT" }, @@ -858,216 +539,6 @@ "langium": "3.0.0" } }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.20.0.tgz", - "integrity": "sha512-TSpWzflCc4VGAUJZlPpgAJE1+V60MePDQnBd7PPkpuEmOy8i87aL6tinFGKBFKuEDikYpig72QzdT3QPYIi+oA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.20.0.tgz", - "integrity": "sha512-u00Ro/nok7oGzVuh/FMYfNoGqxU5CPWz1mxV85S2w9LxHR8OoMQBuSk+3BKVIDYgkpeOET5yXkx90OYFc+ytpQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.20.0.tgz", - "integrity": "sha512-uFVfvzvsdGtlSLuL0ZlvPJvl6ZmrH4CBwLGEFPe7hUmf7htGAN+aXo43R/V6LATyxlKVC/m6UsLb7jbG+LG39Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.20.0.tgz", - "integrity": "sha512-xbrMDdlev53vNXexEa6l0LffojxhqDTBeL+VUxuuIXys4x6xyvbKq5XqTXBCEUA8ty8iEJblHvFaWRJTk/icAQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.20.0.tgz", - "integrity": "sha512-jMYvxZwGmoHFBTbr12Xc6wOdc2xA5tF5F2q6t7Rcfab68TT0n+r7dgawD4qhPEvasDsVpQi+MgDzj2faOLsZjA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.20.0.tgz", - "integrity": "sha512-1asSTl4HKuIHIB1GcdFHNNZhxAYEdqML/MW4QmPS4G0ivbEcBr1JKlFLKsIRqjSwOBkdItn3/ZDlyvZ/N6KPlw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.20.0.tgz", - "integrity": "sha512-COBb8Bkx56KldOYJfMf6wKeYJrtJ9vEgBRAOkfw6Ens0tnmzPqvlpjZiLgkhg6cA3DGzCmLmmd319pmHvKWWlQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.20.0.tgz", - "integrity": "sha512-+it+mBSyMslVQa8wSPvBx53fYuZK/oLTu5RJoXogjk6x7Q7sz1GNRsXWjn6SwyJm8E/oMjNVwPhmNdIjwP135Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.20.0.tgz", - "integrity": "sha512-yAMvqhPfGKsAxHN8I4+jE0CpLWD8cv4z7CK7BMmhjDuz606Q2tFKkWRY8bHR9JQXYcoLfopo5TTqzxgPUjUMfw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.20.0.tgz", - "integrity": "sha512-qmuxFpfmi/2SUkAw95TtNq/w/I7Gpjurx609OOOV7U4vhvUhBcftcmXwl3rqAek+ADBwSjIC4IVNLiszoj3dPA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.20.0.tgz", - "integrity": "sha512-I0BtGXddHSHjV1mqTNkgUZLnS3WtsqebAXv11D5BZE/gfw5KoyXSAXVqyJximQXNvNzUo4GKlCK/dIwXlz+jlg==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.20.0.tgz", - "integrity": "sha512-y+eoL2I3iphUg9tN9GB6ku1FA8kOfmF4oUEWhztDJ4KXJy1agk/9+pejOuZkNFhRwHAOxMsBPLbXPd6mJiCwew==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.20.0.tgz", - "integrity": "sha512-hM3nhW40kBNYUkZb/r9k2FKK+/MnKglX7UYd4ZUy5DJs8/sMsIbqWK2piZtVGE3kcXVNj3B2IrUYROJMMCikNg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.20.0.tgz", - "integrity": "sha512-psegMvP+Ik/Bg7QRJbv8w8PAytPA7Uo8fpFjXyCRHWm6Nt42L+JtoqH8eDQ5hRP7/XW2UiIriy1Z46jf0Oa1kA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.20.0.tgz", - "integrity": "sha512-GabekH3w4lgAJpVxkk7hUzUf2hICSQO0a/BLFA11/RMxQT92MabKAqyubzDZmMOC/hcJNlc+rrypzNzYl4Dx7A==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, "node_modules/@rollup/rollup-win32-x64-msvc": { "version": "4.20.0", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.20.0.tgz", @@ -1083,25 +554,92 @@ ] }, "node_modules/@shikijs/core": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.12.1.tgz", - "integrity": "sha512-biCz/mnkMktImI6hMfMX3H9kOeqsInxWEyCHbSlL8C/2TR1FqfmGxTLRNwYCKsyCyxWLbB8rEqXRVZuyxuLFmA==", + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.29.2.tgz", + "integrity": "sha512-vju0lY9r27jJfOY4Z7+Rt/nIOjzJpZ3y+nYpqtUZInVoXQ/TJZcfGnNOGnKjFdVZb8qexiCuSlZRKcGfhhTTZQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/hast": "^3.0.4" + "@shikijs/engine-javascript": "1.29.2", + "@shikijs/engine-oniguruma": "1.29.2", + "@shikijs/types": "1.29.2", + "@shikijs/vscode-textmate": "^10.0.1", + "@types/hast": "^3.0.4", + "hast-util-to-html": "^9.0.4" + } + }, + "node_modules/@shikijs/engine-javascript": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.29.2.tgz", + "integrity": "sha512-iNEZv4IrLYPv64Q6k7EPpOCE/nuvGiKl7zxdq0WFuRPF5PAE9PRo2JGq/d8crLusM59BRemJ4eOqrFrC4wiQ+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "1.29.2", + "@shikijs/vscode-textmate": "^10.0.1", + "oniguruma-to-es": "^2.2.0" + } + }, + "node_modules/@shikijs/engine-oniguruma": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.29.2.tgz", + "integrity": "sha512-7iiOx3SG8+g1MnlzZVDYiaeHe7Ez2Kf2HrJzdmGwkRisT7r4rak0e655AcM/tF9JG/kg5fMNYlLLKglbN7gBqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "1.29.2", + "@shikijs/vscode-textmate": "^10.0.1" + } + }, + "node_modules/@shikijs/langs": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-1.29.2.tgz", + "integrity": "sha512-FIBA7N3LZ+223U7cJDUYd5shmciFQlYkFXlkKVaHsCPgfVLiO+e12FmQE6Tf9vuyEsFe3dIl8qGWKXgEHL9wmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "1.29.2" + } + }, + "node_modules/@shikijs/themes": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-1.29.2.tgz", + "integrity": "sha512-i9TNZlsq4uoyqSbluIcZkmPL9Bfi3djVxRnofUHwvx/h6SRW3cwgBC5SML7vsDcWyukY0eCzVN980rqP6qNl9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "1.29.2" } }, "node_modules/@shikijs/transformers": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-1.12.1.tgz", - "integrity": "sha512-zOpj/S2thBvnJV4Ty3EE8aRs/VqCbV+lgtEYeBRkPxTW22uLADEIZq0qjt5W2Rfy2KSu29e73nRyzp4PefjUTg==", + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-1.29.2.tgz", + "integrity": "sha512-NHQuA+gM7zGuxGWP9/Ub4vpbwrYCrho9nQCLcCPfOe3Yc7LOYwmSuhElI688oiqIXk9dlZwDiyAG9vPBTuPJMA==", "dev": true, "license": "MIT", "dependencies": { - "shiki": "1.12.1" + "@shikijs/core": "1.29.2", + "@shikijs/types": "1.29.2" } }, + "node_modules/@shikijs/types": { + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.29.2.tgz", + "integrity": "sha512-VJjK0eIijTZf0QSTODEXCqinjBn0joAHQ+aPSBzrv4O2d/QSbsMw+ZeSRx03kV34Hy7NzUvV/7NqfYGRLrASmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/vscode-textmate": "^10.0.1", + "@types/hast": "^3.0.4" + } + }, + "node_modules/@shikijs/vscode-textmate": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", + "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -1137,6 +675,16 @@ "@types/mdurl": "^2" } }, + "node_modules/@types/mdast": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", + "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/mdurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", @@ -1145,9 +693,9 @@ "license": "MIT" }, "node_modules/@types/unist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", - "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", "dev": true, "license": "MIT" }, @@ -1158,104 +706,111 @@ "dev": true, "license": "MIT" }, + "node_modules/@ungap/structured-clone": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "dev": true, + "license": "ISC" + }, "node_modules/@vitejs/plugin-vue": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.1.2.tgz", - "integrity": "sha512-nY9IwH12qeiJqumTCLJLE7IiNx7HZ39cbHaysEUd+Myvbz9KAqd2yq+U01Kab1R/H1BmiyM2ShTYlNH32Fzo3A==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.2.4.tgz", + "integrity": "sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA==", "dev": true, "license": "MIT", "engines": { "node": "^18.0.0 || >=20.0.0" }, "peerDependencies": { - "vite": "^5.0.0", + "vite": "^5.0.0 || ^6.0.0", "vue": "^3.2.25" } }, "node_modules/@vue/compiler-core": { - "version": "3.4.37", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.37.tgz", - "integrity": "sha512-ZDDT/KiLKuCRXyzWecNzC5vTcubGz4LECAtfGPENpo0nrmqJHwuWtRLxk/Sb9RAKtR9iFflFycbkjkY+W/PZUQ==", + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.21.tgz", + "integrity": "sha512-8i+LZ0vf6ZgII5Z9XmUvrCyEzocvWT+TeR2VBUVlzIH6Tyv57E20mPZ1bCS+tbejgUgmjrEh7q/0F0bibskAmw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.24.7", - "@vue/shared": "3.4.37", - "entities": "^5.0.0", + "@babel/parser": "^7.28.3", + "@vue/shared": "3.5.21", + "entities": "^4.5.0", "estree-walker": "^2.0.2", - "source-map-js": "^1.2.0" + "source-map-js": "^1.2.1" } }, "node_modules/@vue/compiler-dom": { - "version": "3.4.37", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.37.tgz", - "integrity": "sha512-rIiSmL3YrntvgYV84rekAtU/xfogMUJIclUMeIKEtVBFngOL3IeZHhsH3UaFEgB5iFGpj6IW+8YuM/2Up+vVag==", + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.21.tgz", + "integrity": "sha512-jNtbu/u97wiyEBJlJ9kmdw7tAr5Vy0Aj5CgQmo+6pxWNQhXZDPsRr1UWPN4v3Zf82s2H3kF51IbzZ4jMWAgPlQ==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-core": "3.4.37", - "@vue/shared": "3.4.37" + "@vue/compiler-core": "3.5.21", + "@vue/shared": "3.5.21" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.4.37", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.37.tgz", - "integrity": "sha512-vCfetdas40Wk9aK/WWf8XcVESffsbNkBQwS5t13Y/PcfqKfIwJX2gF+82th6dOpnpbptNMlMjAny80li7TaCIg==", + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.21.tgz", + "integrity": "sha512-SXlyk6I5eUGBd2v8Ie7tF6ADHE9kCR6mBEuPyH1nUZ0h6Xx6nZI29i12sJKQmzbDyr2tUHMhhTt51Z6blbkTTQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.24.7", - "@vue/compiler-core": "3.4.37", - "@vue/compiler-dom": "3.4.37", - "@vue/compiler-ssr": "3.4.37", - "@vue/shared": "3.4.37", + "@babel/parser": "^7.28.3", + "@vue/compiler-core": "3.5.21", + "@vue/compiler-dom": "3.5.21", + "@vue/compiler-ssr": "3.5.21", + "@vue/shared": "3.5.21", "estree-walker": "^2.0.2", - "magic-string": "^0.30.10", - "postcss": "^8.4.40", - "source-map-js": "^1.2.0" + "magic-string": "^0.30.18", + "postcss": "^8.5.6", + "source-map-js": "^1.2.1" } }, "node_modules/@vue/compiler-ssr": { - "version": "3.4.37", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.37.tgz", - "integrity": "sha512-TyAgYBWrHlFrt4qpdACh8e9Ms6C/AZQ6A6xLJaWrCL8GCX5DxMzxyeFAEMfU/VFr4tylHm+a2NpfJpcd7+20XA==", + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.21.tgz", + "integrity": "sha512-vKQ5olH5edFZdf5ZrlEgSO1j1DMA4u23TVK5XR1uMhvwnYvVdDF0nHXJUblL/GvzlShQbjhZZ2uvYmDlAbgo9w==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-dom": "3.4.37", - "@vue/shared": "3.4.37" + "@vue/compiler-dom": "3.5.21", + "@vue/shared": "3.5.21" } }, "node_modules/@vue/devtools-api": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.3.8.tgz", - "integrity": "sha512-NURFwmxz4WukFU54IHgyGI2KSejdgHG5JC4xTcWmTWEBIc8aelj9fBy4qsboObGHFp3JIdRxxANO9s2wZA/pVQ==", + "version": "7.7.7", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.7.7.tgz", + "integrity": "sha512-lwOnNBH2e7x1fIIbVT7yF5D+YWhqELm55/4ZKf45R9T8r9dE2AIOy8HKjfqzGsoTHFbWbr337O4E0A0QADnjBg==", "dev": true, "license": "MIT", "dependencies": { - "@vue/devtools-kit": "^7.3.8" + "@vue/devtools-kit": "^7.7.7" } }, "node_modules/@vue/devtools-kit": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.3.8.tgz", - "integrity": "sha512-HYy3MQP1nZ6GbE4vrgJ/UB+MvZnhYmEwCa/UafrEpdpwa+jNCkz1ZdUrC5I7LpkH1ShREEV2/pZlAQdBj+ncLQ==", + "version": "7.7.7", + "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.7.7.tgz", + "integrity": "sha512-wgoZtxcTta65cnZ1Q6MbAfePVFxfM+gq0saaeytoph7nEa7yMXoi6sCPy4ufO111B9msnw0VOWjPEFCXuAKRHA==", "dev": true, "license": "MIT", "dependencies": { - "@vue/devtools-shared": "^7.3.8", - "birpc": "^0.2.17", + "@vue/devtools-shared": "^7.7.7", + "birpc": "^2.3.0", "hookable": "^5.5.3", "mitt": "^3.0.1", "perfect-debounce": "^1.0.0", "speakingurl": "^14.0.1", - "superjson": "^2.2.1" + "superjson": "^2.2.2" } }, "node_modules/@vue/devtools-shared": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.3.8.tgz", - "integrity": "sha512-1NiJbn7Yp47nPDWhFZyEKpB2+5/+7JYv8IQnU0ccMrgslPR2dL7u1DIyI7mLqy4HN1ll36gQy0k8GqBYSFgZJw==", + "version": "7.7.7", + "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.7.7.tgz", + "integrity": "sha512-+udSj47aRl5aKb0memBvcUG9koarqnxNM5yjuREvqwK6T3ap4mn3Zqqc17QrBFTqSMjr3HK1cvStEZpMDpfdyw==", "dev": true, "license": "MIT", "dependencies": { @@ -1263,71 +818,71 @@ } }, "node_modules/@vue/reactivity": { - "version": "3.4.37", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.37.tgz", - "integrity": "sha512-UmdKXGx0BZ5kkxPqQr3PK3tElz6adTey4307NzZ3whZu19i5VavYal7u2FfOmAzlcDVgE8+X0HZ2LxLb/jgbYw==", + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.21.tgz", + "integrity": "sha512-3ah7sa+Cwr9iiYEERt9JfZKPw4A2UlbY8RbbnH2mGCE8NwHkhmlZt2VsH0oDA3P08X3jJd29ohBDtX+TbD9AsA==", "dev": true, "license": "MIT", "dependencies": { - "@vue/shared": "3.4.37" + "@vue/shared": "3.5.21" } }, "node_modules/@vue/runtime-core": { - "version": "3.4.37", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.37.tgz", - "integrity": "sha512-MNjrVoLV/sirHZoD7QAilU1Ifs7m/KJv4/84QVbE6nyAZGQNVOa1HGxaOzp9YqCG+GpLt1hNDC4RbH+KtanV7w==", + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.21.tgz", + "integrity": "sha512-+DplQlRS4MXfIf9gfD1BOJpk5RSyGgGXD/R+cumhe8jdjUcq/qlxDawQlSI8hCKupBlvM+3eS1se5xW+SuNAwA==", "dev": true, "license": "MIT", "dependencies": { - "@vue/reactivity": "3.4.37", - "@vue/shared": "3.4.37" + "@vue/reactivity": "3.5.21", + "@vue/shared": "3.5.21" } }, "node_modules/@vue/runtime-dom": { - "version": "3.4.37", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.37.tgz", - "integrity": "sha512-Mg2EwgGZqtwKrqdL/FKMF2NEaOHuH+Ks9TQn3DHKyX//hQTYOun+7Tqp1eo0P4Ds+SjltZshOSRq6VsU0baaNg==", + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.21.tgz", + "integrity": "sha512-3M2DZsOFwM5qI15wrMmNF5RJe1+ARijt2HM3TbzBbPSuBHOQpoidE+Pa+XEaVN+czbHf81ETRoG1ltztP2em8w==", "dev": true, "license": "MIT", "dependencies": { - "@vue/reactivity": "3.4.37", - "@vue/runtime-core": "3.4.37", - "@vue/shared": "3.4.37", + "@vue/reactivity": "3.5.21", + "@vue/runtime-core": "3.5.21", + "@vue/shared": "3.5.21", "csstype": "^3.1.3" } }, "node_modules/@vue/server-renderer": { - "version": "3.4.37", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.37.tgz", - "integrity": "sha512-jZ5FAHDR2KBq2FsRUJW6GKDOAG9lUTX8aBEGq4Vf6B/35I9fPce66BornuwmqmKgfiSlecwuOb6oeoamYMohkg==", + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.21.tgz", + "integrity": "sha512-qr8AqgD3DJPJcGvLcJKQo2tAc8OnXRcfxhOJCPF+fcfn5bBGz7VCcO7t+qETOPxpWK1mgysXvVT/j+xWaHeMWA==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-ssr": "3.4.37", - "@vue/shared": "3.4.37" + "@vue/compiler-ssr": "3.5.21", + "@vue/shared": "3.5.21" }, "peerDependencies": { - "vue": "3.4.37" + "vue": "3.5.21" } }, "node_modules/@vue/shared": { - "version": "3.4.37", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.37.tgz", - "integrity": "sha512-nIh8P2fc3DflG8+5Uw8PT/1i17ccFn0xxN/5oE9RfV5SVnd7G0XEFRwakrnNFE/jlS95fpGXDVG5zDETS26nmg==", + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.21.tgz", + "integrity": "sha512-+2k1EQpnYuVuu3N7atWyG3/xoFWIVJZq4Mz8XNOdScFI0etES75fbny/oU4lKWk/577P1zmg0ioYvpGEDZ3DLw==", "dev": true, "license": "MIT" }, "node_modules/@vueuse/core": { - "version": "10.11.1", - "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.11.1.tgz", - "integrity": "sha512-guoy26JQktXPcz+0n3GukWIy/JDNKti9v6VEMu6kV2sYBsWuGiTU8OWdg+ADfUbHg3/3DlqySDe7JmdHrktiww==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-11.3.0.tgz", + "integrity": "sha512-7OC4Rl1f9G8IT6rUfi9JrKiXy4bfmHhZ5x2Ceojy0jnd3mHNEvV4JaRygH362ror6/NZ+Nl+n13LPzGiPN8cKA==", "dev": true, "license": "MIT", "dependencies": { "@types/web-bluetooth": "^0.0.20", - "@vueuse/metadata": "10.11.1", - "@vueuse/shared": "10.11.1", - "vue-demi": ">=0.14.8" + "@vueuse/metadata": "11.3.0", + "@vueuse/shared": "11.3.0", + "vue-demi": ">=0.14.10" }, "funding": { "url": "https://github.com/sponsors/antfu" @@ -1361,15 +916,15 @@ } }, "node_modules/@vueuse/integrations": { - "version": "10.11.1", - "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-10.11.1.tgz", - "integrity": "sha512-Y5hCGBguN+vuVYTZmdd/IMXLOdfS60zAmDmFYc4BKBcMUPZH1n4tdyDECCPjXm0bNT3ZRUy1xzTLGaUje8Xyaw==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-11.3.0.tgz", + "integrity": "sha512-5fzRl0apQWrDezmobchoiGTkGw238VWESxZHazfhP3RM7pDSiyXy18QbfYkILoYNTd23HPAfQTJpkUc5QbkwTw==", "dev": true, "license": "MIT", "dependencies": { - "@vueuse/core": "10.11.1", - "@vueuse/shared": "10.11.1", - "vue-demi": ">=0.14.8" + "@vueuse/core": "11.3.0", + "@vueuse/shared": "11.3.0", + "vue-demi": ">=0.14.10" }, "funding": { "url": "https://github.com/sponsors/antfu" @@ -1377,16 +932,16 @@ "peerDependencies": { "async-validator": "^4", "axios": "^1", - "change-case": "^4", - "drauu": "^0.3", + "change-case": "^5", + "drauu": "^0.4", "focus-trap": "^7", - "fuse.js": "^6", + "fuse.js": "^7", "idb-keyval": "^6", - "jwt-decode": "^3", + "jwt-decode": "^4", "nprogress": "^0.2", "qrcode": "^1.5", "sortablejs": "^1", - "universal-cookie": "^6" + "universal-cookie": "^7" }, "peerDependenciesMeta": { "async-validator": { @@ -1455,9 +1010,9 @@ } }, "node_modules/@vueuse/metadata": { - "version": "10.11.1", - "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.11.1.tgz", - "integrity": "sha512-IGa5FXd003Ug1qAZmyE8wF3sJ81xGLSqTqtQ6jaVfkeZ4i5kS2mwQF61yhVqojRnenVew5PldLyRgvdl4YYuSw==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-11.3.0.tgz", + "integrity": "sha512-pwDnDspTqtTo2HwfLw4Rp6yywuuBdYnPYDq+mO38ZYKGebCUQC/nVj/PXSiK9HX5otxLz8Fn7ECPbjiRz2CC3g==", "dev": true, "license": "MIT", "funding": { @@ -1465,13 +1020,13 @@ } }, "node_modules/@vueuse/shared": { - "version": "10.11.1", - "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.11.1.tgz", - "integrity": "sha512-LHpC8711VFZlDaYUXEBbFBCQ7GS3dVU9mjOhhMhXP6txTV4EhYQg/KGnQuvt/sPAtoUKq7VVUnL6mVtFoL42sA==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-11.3.0.tgz", + "integrity": "sha512-P8gSSWQeucH5821ek2mn/ciCk+MS/zoRKqdQIM3bHq6p7GXDAJLmnRRKmF5F65sAVJIfzQlwR3aDzwCn10s8hA==", "dev": true, "license": "MIT", "dependencies": { - "vue-demi": ">=0.14.8" + "vue-demi": ">=0.14.10" }, "funding": { "url": "https://github.com/sponsors/antfu" @@ -1518,27 +1073,29 @@ } }, "node_modules/algoliasearch": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.24.0.tgz", - "integrity": "sha512-bf0QV/9jVejssFBmz2HQLxUadxk574t4iwjCKp5E7NBzwKkrDEhKPISIIjAU/p6K5qDx3qoeh4+26zWN1jmw3g==", + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.37.0.tgz", + "integrity": "sha512-y7gau/ZOQDqoInTQp0IwTOjkrHc4Aq4R8JgpmCleFwiLl+PbN2DMWoDUWZnrK8AhNJwT++dn28Bt4NZYNLAmuA==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/cache-browser-local-storage": "4.24.0", - "@algolia/cache-common": "4.24.0", - "@algolia/cache-in-memory": "4.24.0", - "@algolia/client-account": "4.24.0", - "@algolia/client-analytics": "4.24.0", - "@algolia/client-common": "4.24.0", - "@algolia/client-personalization": "4.24.0", - "@algolia/client-search": "4.24.0", - "@algolia/logger-common": "4.24.0", - "@algolia/logger-console": "4.24.0", - "@algolia/recommend": "4.24.0", - "@algolia/requester-browser-xhr": "4.24.0", - "@algolia/requester-common": "4.24.0", - "@algolia/requester-node-http": "4.24.0", - "@algolia/transporter": "4.24.0" + "@algolia/abtesting": "1.3.0", + "@algolia/client-abtesting": "5.37.0", + "@algolia/client-analytics": "5.37.0", + "@algolia/client-common": "5.37.0", + "@algolia/client-insights": "5.37.0", + "@algolia/client-personalization": "5.37.0", + "@algolia/client-query-suggestions": "5.37.0", + "@algolia/client-search": "5.37.0", + "@algolia/ingestion": "1.37.0", + "@algolia/monitoring": "1.37.0", + "@algolia/recommend": "5.37.0", + "@algolia/requester-browser-xhr": "5.37.0", + "@algolia/requester-fetch": "5.37.0", + "@algolia/requester-node-http": "5.37.0" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/ansi-colors": { @@ -1552,9 +1109,9 @@ } }, "node_modules/birpc": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/birpc/-/birpc-0.2.17.tgz", - "integrity": "sha512-+hkTxhot+dWsLpp3gia5AkVHIsKlZybNT5gIYiDlNzJrmYPcTM9k5/w2uaj3IPpd7LlEYpmCj4Jj1nC41VhDFg==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/birpc/-/birpc-2.5.0.tgz", + "integrity": "sha512-VSWO/W6nNQdyP520F1mhf+Lc2f8pjGQOtoHHm7Ze8Go1kX7akpVIrtTa0fn+HB0QJEDVacl6aO08YE0PgXfdnQ==", "dev": true, "license": "MIT", "funding": { @@ -1568,6 +1125,39 @@ "dev": true, "license": "ISC" }, + "node_modules/ccount": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-html4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/cheerio": { "version": "1.0.0-rc.10", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz", @@ -1635,6 +1225,17 @@ "chevrotain": "^11.0.0" } }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/commander": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", @@ -2301,6 +1902,30 @@ "robust-predicates": "^3.0.2" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "dequal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/dom-serializer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", @@ -2377,10 +2002,17 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, + "node_modules/emoji-regex-xs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex-xs/-/emoji-regex-xs-1.0.0.tgz", + "integrity": "sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==", + "dev": true, + "license": "MIT" + }, "node_modules/entities": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-5.0.0.tgz", - "integrity": "sha512-BeJFvFRJddxobhvEdm5GqHzRV/X+ACeuw0/BuuxsCh1EUZcAIz8+kYmBp/LrQuloy6K1f3a0M7+IhmZ7QnkISA==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -2460,30 +2092,15 @@ "license": "MIT" }, "node_modules/focus-trap": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.5.4.tgz", - "integrity": "sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==", + "version": "7.6.5", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.6.5.tgz", + "integrity": "sha512-7Ke1jyybbbPZyZXFxEftUtxFGLMpE2n6A+z//m4CRDlj0hW+o3iYSmh8nFlYMurOiJVDmJRilUQtJr08KfIxlg==", "dev": true, "license": "MIT", "dependencies": { "tabbable": "^6.2.0" } }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/hachure-fill": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/hachure-fill/-/hachure-fill-0.5.2.tgz", @@ -2491,6 +2108,44 @@ "dev": true, "license": "MIT" }, + "node_modules/hast-util-to-html": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.5.tgz", + "integrity": "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-whitespace": "^3.0.0", + "html-void-elements": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "property-information": "^7.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-whitespace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", + "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/hookable": { "version": "5.5.3", "resolved": "https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz", @@ -2498,6 +2153,17 @@ "dev": true, "license": "MIT" }, + "node_modules/html-void-elements": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", + "integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/htmlparser2": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", @@ -2680,13 +2346,13 @@ "license": "MIT" }, "node_modules/magic-string": { - "version": "0.30.11", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", - "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", + "version": "0.30.19", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.19.tgz", + "integrity": "sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0" + "@jridgewell/sourcemap-codec": "^1.5.5" } }, "node_modules/mark.js": { @@ -2740,6 +2406,28 @@ "speech-rule-engine": "^4.0.6" } }, + "node_modules/mdast-util-to-hast": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz", + "integrity": "sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@ungap/structured-clone": "^1.0.0", + "devlop": "^1.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "trim-lines": "^3.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mensch": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/mensch/-/mensch-0.3.4.tgz", @@ -2782,6 +2470,100 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/micromark-util-character": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-encode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", + "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-sanitize-uri": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", + "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-symbol": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-types": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz", + "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, "node_modules/mime": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", @@ -2837,9 +2619,9 @@ "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", "dev": true, "funding": [ { @@ -2897,6 +2679,18 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, + "node_modules/oniguruma-to-es": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-2.3.0.tgz", + "integrity": "sha512-bwALDxriqfKGfUufKGGepCzu9x7nJQuoRoAFp4AnwehhC2crqrDIAP/uN2qdlsAvSMpeRC3+Yzhqc7hLmle5+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex-xs": "^1.0.0", + "regex": "^5.1.1", + "regex-recursion": "^5.1.1" + } + }, "node_modules/package-manager-detector": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.0.tgz", @@ -2943,9 +2737,9 @@ "license": "MIT" }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true, "license": "ISC" }, @@ -2980,9 +2774,9 @@ } }, "node_modules/postcss": { - "version": "8.4.41", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz", - "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==", + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", "dev": true, "funding": [ { @@ -3000,18 +2794,18 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.1", - "source-map-js": "^1.2.0" + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" } }, "node_modules/preact": { - "version": "10.23.2", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.23.2.tgz", - "integrity": "sha512-kKYfePf9rzKnxOAKDpsWhg/ysrHPqT+yQ7UW4JjdnqjFIeNUnNcEJvhuA8fDenxAGWzUqtd51DfVg7xp/8T9NA==", + "version": "10.27.2", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.27.2.tgz", + "integrity": "sha512-5SYSgFKSyhCbk6SrXyMpqjb5+MQBgfvEKE/OC+PujcY34sOpqtr+0AZQtPYx5IA6VxynQ7rUPCtKzyovpj9Bpg==", "dev": true, "license": "MIT", "funding": { @@ -3019,6 +2813,45 @@ "url": "https://opencollective.com/preact" } }, + "node_modules/property-information": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.1.0.tgz", + "integrity": "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/regex": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/regex/-/regex-5.1.1.tgz", + "integrity": "sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "regex-utilities": "^2.3.0" + } + }, + "node_modules/regex-recursion": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/regex-recursion/-/regex-recursion-5.1.1.tgz", + "integrity": "sha512-ae7SBCbzVNrIjgSbh7wMznPcQel1DNlDtzensnFxpiNpXt1U2ju/bHugH422r+4LAVS1FpW1YCwilmnNsjum9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "regex": "^5.1.1", + "regex-utilities": "^2.3.0" + } + }, + "node_modules/regex-utilities": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/regex-utilities/-/regex-utilities-2.3.0.tgz", + "integrity": "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==", + "dev": true, + "license": "MIT" + }, "node_modules/rfdc": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", @@ -3097,21 +2930,27 @@ "license": "MIT" }, "node_modules/search-insights": { - "version": "2.16.2", - "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.16.2.tgz", - "integrity": "sha512-+KrS5rnYlyWgzoCNJGsNPw7Vv+47Y7Ze7KZ+/9Xls+5BUugEbU2yv1n9JsQOqv+MLKYfg3bxI5K6tYJxXZY8FA==", + "version": "2.17.3", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.17.3.tgz", + "integrity": "sha512-RQPdCYTa8A68uM2jwxoY842xDhvx3E5LFL1LxvxCNMev4o5mLuokczhzjAgGwUZBAmOKZknArSxLKmXtIi2AxQ==", "dev": true, "license": "MIT", "peer": true }, "node_modules/shiki": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.12.1.tgz", - "integrity": "sha512-nwmjbHKnOYYAe1aaQyEBHvQymJgfm86ZSS7fT8OaPRr4sbAcBNz7PbfAikMEFSDQ6se2j2zobkXvVKcBOm0ysg==", + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.29.2.tgz", + "integrity": "sha512-njXuliz/cP+67jU2hukkxCNuH1yUi4QfdZZY+sMr5PPrIyXSu5iTb/qYC4BiWWB0vZ+7TbdvYUCeL23zpwCfbg==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/core": "1.12.1", + "@shikijs/core": "1.29.2", + "@shikijs/engine-javascript": "1.29.2", + "@shikijs/engine-oniguruma": "1.29.2", + "@shikijs/langs": "1.29.2", + "@shikijs/themes": "1.29.2", + "@shikijs/types": "1.29.2", + "@shikijs/vscode-textmate": "^10.0.1", "@types/hast": "^3.0.4" } }, @@ -3126,15 +2965,26 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, + "node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/speakingurl": { "version": "14.0.1", "resolved": "https://registry.npmjs.org/speakingurl/-/speakingurl-14.0.1.tgz", @@ -3170,6 +3020,21 @@ "node": "^12.20.0 || >=14" } }, + "node_modules/stringify-entities": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", + "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==", + "dev": true, + "license": "MIT", + "dependencies": { + "character-entities-html4": "^2.0.0", + "character-entities-legacy": "^3.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/stylis": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.4.tgz", @@ -3178,9 +3043,9 @@ "license": "MIT" }, "node_modules/superjson": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.1.tgz", - "integrity": "sha512-8iGv75BYOa0xRJHK5vRLEjE2H/i4lulTjzpUXic3Eg8akftYjkmQDa8JARQ42rlczXyFR3IeRoeFCc7RxHsYZA==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.2.tgz", + "integrity": "sha512-5JRxVqC8I8NuOUjzBbvVJAKNM8qoVuH0O77h4WInc/qC2q5IreqKxYwgkga3PfA22OayK2ikceb/B26dztPl+Q==", "dev": true, "license": "MIT", "dependencies": { @@ -3204,16 +3069,6 @@ "dev": true, "license": "MIT" }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -3221,6 +3076,17 @@ "dev": true, "license": "MIT" }, + "node_modules/trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/ts-dedent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz", @@ -3245,6 +3111,79 @@ "dev": true, "license": "MIT" }, + "node_modules/unist-util-is": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", + "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", + "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", + "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz", + "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", @@ -3269,16 +3208,46 @@ "node": ">=10" } }, + "node_modules/vfile": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.3.tgz", + "integrity": "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/vite": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.0.tgz", - "integrity": "sha512-5xokfMX0PIiwCMCMb9ZJcMyh5wbBun0zUzKib+L65vAZ8GY9ePZMXxFrHbr/Kyll2+LSCY7xtERPpxkBDKngwg==", + "version": "5.4.20", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.20.tgz", + "integrity": "sha512-j3lYzGC3P+B5Yfy/pfKNgVEg4+UtcIJcVRt2cDjIOmhLourAqPqf8P7acgxeiSgUB7E3p2P8/3gNIgDLpwzs4g==", "dev": true, "license": "MIT", "dependencies": { "esbuild": "^0.21.3", - "postcss": "^8.4.40", - "rollup": "^4.13.0" + "postcss": "^8.4.43", + "rollup": "^4.20.0" }, "bin": { "vite": "bin/vite.js" @@ -3330,28 +3299,30 @@ } }, "node_modules/vitepress": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.3.2.tgz", - "integrity": "sha512-6gvecsCuR6b1Cid4w19KQiQ02qkpgzFRqiG0v1ZBekGkrZCzsxdDD5y4WH82HRXAOhU4iZIpzA1CsWqs719rqA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.5.0.tgz", + "integrity": "sha512-q4Q/G2zjvynvizdB3/bupdYkCJe2umSAMv9Ju4d92E6/NXJ59z70xB0q5p/4lpRyAwflDsbwy1mLV9Q5+nlB+g==", "dev": true, "license": "MIT", "dependencies": { - "@docsearch/css": "^3.6.0", - "@docsearch/js": "^3.6.0", - "@shikijs/core": "^1.10.3", - "@shikijs/transformers": "^1.10.3", - "@types/markdown-it": "^14.1.1", - "@vitejs/plugin-vue": "^5.0.5", - "@vue/devtools-api": "^7.3.5", - "@vue/shared": "^3.4.31", - "@vueuse/core": "^10.11.0", - "@vueuse/integrations": "^10.11.0", - "focus-trap": "^7.5.4", + "@docsearch/css": "^3.6.2", + "@docsearch/js": "^3.6.2", + "@iconify-json/simple-icons": "^1.2.10", + "@shikijs/core": "^1.22.2", + "@shikijs/transformers": "^1.22.2", + "@shikijs/types": "^1.22.2", + "@types/markdown-it": "^14.1.2", + "@vitejs/plugin-vue": "^5.1.4", + "@vue/devtools-api": "^7.5.4", + "@vue/shared": "^3.5.12", + "@vueuse/core": "^11.1.0", + "@vueuse/integrations": "^11.1.0", + "focus-trap": "^7.6.0", "mark.js": "8.11.1", - "minisearch": "^7.0.0", - "shiki": "^1.10.3", - "vite": "^5.3.3", - "vue": "^3.4.31" + "minisearch": "^7.1.0", + "shiki": "^1.22.2", + "vite": "^5.4.10", + "vue": "^3.5.12" }, "bin": { "vitepress": "bin/vitepress.js" @@ -3439,17 +3410,17 @@ "license": "MIT" }, "node_modules/vue": { - "version": "3.4.37", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.37.tgz", - "integrity": "sha512-3vXvNfkKTBsSJ7JP+LyR7GBuwQuckbWvuwAid3xbqK9ppsKt/DUvfqgZ48fgOLEfpy1IacL5f8QhUVl77RaI7A==", + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.21.tgz", + "integrity": "sha512-xxf9rum9KtOdwdRkiApWL+9hZEMWE90FHh8yS1+KJAiWYh+iGWV1FquPjoO9VUHQ+VIhsCXNNyZ5Sf4++RVZBA==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-dom": "3.4.37", - "@vue/compiler-sfc": "3.4.37", - "@vue/runtime-dom": "3.4.37", - "@vue/server-renderer": "3.4.37", - "@vue/shared": "3.4.37" + "@vue/compiler-dom": "3.5.21", + "@vue/compiler-sfc": "3.5.21", + "@vue/runtime-dom": "3.5.21", + "@vue/server-renderer": "3.5.21", + "@vue/shared": "3.5.21" }, "peerDependencies": { "typescript": "*" @@ -3554,6 +3525,17 @@ "engines": { "node": ">=0.1" } + }, + "node_modules/zwitch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } } } } diff --git a/ru/codex/about.md b/ru/codex/about.md deleted file mode 100644 index ada456d..0000000 --- a/ru/codex/about.md +++ /dev/null @@ -1,3 +0,0 @@ -# О Codex - - В процессе разработки :construction: diff --git a/ru/codex/disclaimer.md b/ru/codex/disclaimer.md deleted file mode 100644 index 0aa6354..0000000 --- a/ru/codex/disclaimer.md +++ /dev/null @@ -1,5 +0,0 @@ -# Отказ от ответственности - -Код и инструкции, предоставленные в этом репозитории и связанных репозиториях, предоставляются "как есть", без каких-либо гарантий, явных или подразумеваемых, включая, но не ограничиваясь, безопасностью, корректностью или производительностью предоставленного кода или инструкций. Мы не гарантируем, что код будет работать как задумано, и пользователи могут столкнуться с задержками, сбоями, ошибками, пропусками или потерей передаваемой информации при использовании или запуске Codex. - -Запуск Codex осуществляется на ваш собственный риск. Таким образом, мы не несем ответственности и не обязаны возмещать любой ущерб, который может быть нанесен вашему оборудованию, программному обеспечению, данным или сети, или за любые потери, претензии, ущерб любого характера или другие обязательства, возникающие в связи с использованием предоставленного кода и инструкций. diff --git a/ru/codex/privacy-policy.md b/ru/codex/privacy-policy.md deleted file mode 100644 index 5cad07d..0000000 --- a/ru/codex/privacy-policy.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -lastUpdated: false ---- -# Политика конфиденциальности - -Последнее обновление: 9 февраля 2024 года - -Настоящая Политика конфиденциальности предназначена для информирования пользователей о нашем подходе к конфиденциальности в отношении данного веб-сайта (**"Веб-сайт"**). В этом отношении, если вы посещаете наш Веб-сайт, настоящая Политика конфиденциальности применяется к вам. - -### 1) Кто мы - -Для целей настоящей Политики конфиденциальности и сбора и обработки персональных данных в качестве контролера соответствующей организацией является Logos Collective Association, которая имеет зарегистрированный офис в Цуге и юридический адрес: - -``` -Logos Collective Association -c/o PST Consulting GmbH -Baarerstrasse 10 -6300 Zug -Switzerland -``` - -Всякий раз, когда мы ссылаемся на "Logos", "мы" или другие подобные ссылки, мы имеем в виду Logos Collective Association. - -### 2) Мы ограничиваем сбор и обработку персональных данных при использовании вами Веб-сайта - -Мы стремимся ограничить сбор и обработку персональных данных от пользователей Веб-сайта. Мы собираем и обрабатываем только определенные персональные данные для конкретных целей и только в тех случаях, когда у нас есть правовое основание для этого в соответствии с применимым законодательством о конфиденциальности. Мы не будем собирать или обрабатывать какие-либо персональные данные, которые нам не нужны, и там, где мы храним какие-либо персональные данные, мы будем хранить их только в течение минимального времени, необходимого для указанной цели. - -В этом отношении мы собираем и обрабатываем следующие персональные данные при использовании вами Веб-сайта: - -* **IP-адрес**: В рамках такого использования Веб-сайта мы кратковременно обрабатываем ваш IP-адрес, но у нас нет возможности идентифицировать вас. Однако у нас есть законный интерес в обработке таких IP-адресов для обеспечения технической функциональности и усиления мер безопасности Веб-сайта. Этот IP-адрес не хранится нами с течением времени. - -### 3) Обработка персональных данных третьими сторонами - -В дополнение к нашему ограниченному сбору персональных данных, третьи стороны могут собирать или обрабатывать персональные данные в результате использования Веб-сайтом определенных функций или для предоставления определенного контента. В той степени, в которой вы взаимодействуете с таким контентом или функциями третьих сторон, будут применяться их соответствующие политики конфиденциальности. - -### 4) Меры безопасности, которые мы принимаем в отношении Веб-сайта - -В качестве общего подхода мы серьезно относимся к безопасности данных и внедрили различные меры безопасности на Веб-сайте для поддержания безопасности ваших персональных данных, когда вы отправляете такую информацию нам. - -### 5) Экспорт данных за пределы Европейского Союза и Швейцарии - -Мы обязаны защищать конфиденциальность персональных данных, которые вы могли предоставить в маловероятном случае, если мы экспортируем ваши персональные данные в места за пределами Европейского Союза или Швейцарии. Это означает, что персональные данные будут обрабатываться только в странах или сторонами, которые обеспечивают адекватный уровень защиты, признанный Швейцарией или Европейской комиссией. В противном случае мы будем использовать другие формы защиты, такие как специальные формы договорных положений, чтобы обеспечить таким персональным данным такую же защиту, как требуется в Швейцарии или Европе. В любом случае передача персональных данных за пределы Европейского Союза и Швейцарии всегда будет происходить в соответствии с применимым законодательством о конфиденциальности. - -### 6) Ваши выбор и права - -Как объяснено в настоящей Политике конфиденциальности, мы ограничиваем сбор и обработку ваших персональных данных везде, где это возможно. Тем не менее, у вас все еще есть определенные выбор и права в отношении персональных данных, которые мы собираем и обрабатываем. Как изложено в соответствующем законодательстве о конфиденциальности, вы имеете право: - -* Попросить нас исправить или обновить ваши персональные данные (где это разумно возможно); - -* Попросить нас удалить ваши персональные данные из наших систем; - -* Попросить нас предоставить копию ваших персональных данных, которая также может быть передана другому контролеру данных по вашему запросу; - -* Отозвать свое согласие на обработку ваших персональных данных (только если согласие было запрошено для деятельности по обработке), что влияет только на действия по обработке, основанные на вашем согласии, и не влияет на действительность таких действий по обработке до того, как вы отозвали свое согласие; - -* Возражать против обработки ваших персональных данных; и - -* Подать жалобу в Федерального комиссара по защите данных и информации (FDPIC), если вы считаете, что ваши персональные данные были обработаны незаконно. - -### 7) Ссылки на сторонние сайты - -На этом Веб-сайте вы можете встретить ссылки на сторонние веб-сайты. У этих сторонних сайтов есть отдельные и независимые политики конфиденциальности. Поэтому мы не несем ответственности за содержание и деятельность этих сторонних веб-сайтов. - -### 8) Настоящая Политика конфиденциальности может измениться - -Мы можем изменить или заменить любую часть настоящей Политики конфиденциальности в любое время и без уведомления. Пожалуйста, периодически проверяйте Веб-сайт на наличие изменений. Новая Политика конфиденциальности вступает в силу немедленно после ее размещения на нашем Веб-сайте. - -### 9) Контактная информация - -Если у вас есть какие-либо вопросы о Политике конфиденциальности, пожалуйста, свяжитесь с нами по адресу legal@free.technology. - -Этот документ лицензирован под CC-BY-SA. diff --git a/ru/codex/security.md b/ru/codex/security.md deleted file mode 100644 index b00ff03..0000000 --- a/ru/codex/security.md +++ /dev/null @@ -1,7 +0,0 @@ -# Безопасность - -Мы серьезно относимся к безопасности в Codex и в Институте свободных технологий и его филиалах. - -Пожалуйста, сообщайте о любых инцидентах безопасности по адресу security@free.technology. - -Пожалуйста, сообщайте о любых обнаруженных уязвимостях в нашей программе вознаграждений на HackenProof, чтобы помочь обеспечить безопасность наших протоколов и программного обеспечения. diff --git a/ru/codex/terms-of-use.md b/ru/codex/terms-of-use.md deleted file mode 100644 index c4455a6..0000000 --- a/ru/codex/terms-of-use.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -lastUpdated: false ---- -# Условия использования - -Последнее обновление: 14 февраля 2024 года - -Настоящие условия использования веб-сайта ("**Условия использования веб-сайта**") заключены между вами и нами и регулируют ваш доступ и использование данного веб-сайта, включая любой контент и функциональность, содержащиеся на веб-сайте. - -Вы несете ответственность за тщательное ознакомление с Условиями использования веб-сайта перед использованием веб-сайта, и ваше использование веб-сайта означает ваше согласие соблюдать настоящие Условия использования веб-сайта. - -Если вы не согласны с настоящими Условиями использования веб-сайта, вы не должны получать доступ к веб-сайту или использовать его. - -### 1) Кто мы - -Для целей настоящих Условий использования веб-сайта соответствующей организацией является Logos Collective Association, которая имеет зарегистрированный офис в Цуге и юридический адрес: - -``` -Logos Collective Association -c/o PST Consulting GmbH -Baarerstrasse 10 -6300 Zug -Switzerland -``` - -Всякий раз, когда мы ссылаемся на "Logos", "мы", "нас" или любые другие подобные ссылки, мы имеем в виду Logos Collective Association. - -### 2) Отказ от ответственности - -Веб-сайт предоставляется нами на условиях "как есть", и вы используете веб-сайт на свой собственный риск. - -Мы отказываемся от всех гарантий любого рода, явных или подразумеваемых, включая, помимо прочего, гарантии товарности, пригодности для определенной цели и ненарушения прав интеллектуальной собственности или других прав. Мы не гарантируем и не делаем никаких заявлений относительно полноты, точности, законности, полезности, надежности, пригодности или доступности использования веб-сайта, контента на этом веб-сайте или иным образом связанного с веб-сайтом, такого контента или любых сайтов, связанных с этим сайтом. Эти отказы от ответственности применяются в максимальной степени, разрешенной применимым законодательством. - -Мы не заявляем, что веб-сайт или любой его контент доступен, соответствует законодательству или подходит в вашей юрисдикции. Ваш доступ или использование веб-сайта осуществляется на ваш собственный риск, и вы несете единоличную ответственность за соблюдение любых применимых местных законов. - -Контент, содержащийся здесь или доступный через этот веб-сайт, предназначен только для информационных целей и не должен рассматриваться как создающий какие-либо ожидания или формирующий основу любого контракта, обязательства или обязательного обязательства с нами. Никакая информация здесь не должна рассматриваться как содержащая или на которую можно полагаться как на обещание, заявление, гарантию или гарантию, будь то явная или подразумеваемая, и будь то в отношении прошлого, настоящего или будущего в отношении проектов и вопросов, описанных здесь. - -Информация, содержащаяся здесь, не является финансовой, юридической, налоговой или иной консультацией и не должна рассматриваться как таковая. - -Ничто на этом веб-сайте не должно толковаться вами как предложение купить или продать, или призыв к предложению купить или продать какие-либо токены или ценные бумаги. - -### 3) Прогнозные заявления - -Веб-сайт также может содержать прогнозные заявления, основанные на текущих ожиданиях, оценках, прогнозах, предположениях и проекциях о технологии, отрасли и рынках в целом. - -Прогнозные заявления, которые могут включать заявления о дорожной карте, описаниях проектов, технических деталях, функциональности, функциях, разработке и использовании токенов проектами, и любые другие заявления, связанные с такими вопросами или доступные через этот веб-сайт, подвержены высокой степени риска и неопределенности. Прогнозные заявления могут изменяться в зависимости от, среди прочего, рыночных условий, технических разработок и нормативной среды. Фактическая разработка и результаты, включая порядок и сроки, могут отличаться от представленных. Информация, содержащаяся здесь, является кратким изложением и не претендует на точность, надежность или полноту, и мы не несем ответственности за точность, надежность или полноту информации, содержащейся здесь. Из-за высокой степени риска и неопределенности, описанных выше, вы не должны чрезмерно полагаться на любые вопросы, описанные на этом веб-сайте или доступные через этот веб-сайт. - -Хотя мы стремимся регулярно обновлять наш веб-сайт, вся информация, включая сроки и детали каждого этапа, может быть изменена и может быть изменена или дополнена в любое время без уведомления и по нашему собственному усмотрению. - -### 4) Права интеллектуальной собственности - -Веб-сайт и его содержимое доступны под лицензией Creative Commons Attribution 4.0 International (CC-BY 4.0). По сути, эта лицензия позволяет пользователям копировать, изменять и распространять контент в любом формате для любых целей, включая коммерческое использование, при условии соблюдения определенных требований, таких как указание авторства. Для полных условий этой лицензии, пожалуйста, обратитесь к следующему веб-сайту: https://creativecommons.org/licenses/by/4.0/. - -### 5) Ссылки на сторонние веб-сайты - -В той степени, в которой веб-сайт предоставляет какие-либо ссылки на сторонний веб-сайт, их условия и положения, включая политики конфиденциальности, регулируют ваше использование этих сторонних веб-сайтов. Ссылаясь на такие сторонние веб-сайты, Status не представляет и не подразумевает, что он поддерживает такие сторонние веб-сайты или контент на них, или что он считает такие сторонние веб-сайты и контент на них точными, полезными или безвредными. Мы не контролируем такие сторонние веб-сайты и не несем ответственности за ваше использование или действия на любых сторонних веб-сайтах, доступ к которым осуществляется через веб-сайт. Если вы получаете доступ к таким сторонним веб-сайтам через веб-сайт, это происходит на ваш собственный риск, и вы несете единоличную ответственность за свои действия на таких сторонних веб-сайтах. - -### 6) Ограничение ответственности - -Мы не несем ответственности перед вами по любому контракту, небрежности, строгой ответственности или любой другой правовой или справедливой теории за любые упущенные выгоды, стоимость приобретения замещающих услуг или любые специальные, случайные или косвенные убытки, связанные с, возникающие из или каким-либо образом связанные с настоящими Условиями использования веб-сайта, веб-сайтом, контентом на веб-сайте или вашим использованием веб-сайта, даже если мы были уведомлены о возможности таких убытков. В любом случае наша совокупная ответственность за такие претензии ограничена 100 евро (сто евро). Это ограничение ответственности применяется в максимальной степени, разрешенной применимым законодательством. - -### 7) Возмещение убытков - -Вы должны возместить нам убытки и защитить нас от любых и всех претензий, убытков и расходов, включая гонорары адвокатов, возникающих в связи с или связанных с вашим использованием веб-сайта, контентом на веб-сайте, включая, помимо прочего, ваше нарушение настоящих Условий использования веб-сайта. - -### 8) Изменения - -Мы можем изменить или заменить любую часть настоящих Условий использования веб-сайта в любое время и без уведомления. Вы несете ответственность за периодическую проверку веб-сайта на наличие изменений. Новые Условия использования веб-сайта вступают в силу немедленно после их размещения на веб-сайте. - -### 9) Применимое право - -Швейцарское право регулирует настоящие Условия использования веб-сайта и любые споры между вами и нами, будь то в суде или арбитраже, без учета положений о коллизии законов. - -### 10) Споры - -В этих условиях термин "спор" имеет самое широкое значение, допустимое законом, и включает любую претензию, которую вы предъявляете, или спор, который у вас может возникнуть в отношении настоящих Условий использования веб-сайта, веб-сайта, контента на веб-сайте или вашего использования веб-сайта. - -Мы предпочитаем арбитраж судебному разбирательству, поскольку считаем, что он соответствует нашему принципу разрешения споров наиболее эффективным и экономически эффективным способом. Вы связаны следующим арбитражным положением, которое отказывает вам в праве на судебное разбирательство и на слушание судьей. Обратите внимание, что судебный пересмотр арбитражного решения ограничен. Вы также отказываетесь от всех своих прав на суд присяжных (если таковые имеются) во всех юрисдикциях. - -Если возникает (потенциальный) спор, вы должны сначала использовать разумные усилия для его урегулирования с нами. Если эти усилия не приводят к разрешению такого спора, вы должны отправить нам письменное уведомление о споре, в котором указывается (i) характер спора и претензия, которую вы предъявляете; и (ii) средство правовой защиты, которое вы ищете. - -Если мы и вы не сможем разрешить этот спор в течение шестидесяти (60) календарных дней с момента получения нами этого уведомления о споре, то любой такой спор будет передан и окончательно разрешен вами и нами через арбитраж, проводимый Швейцарским арбитражным институтом в соответствии с действующими Швейцарскими правилами международного арбитража, которые считаются включенными здесь посредством ссылки. Арбитражное решение может быть исполнено в любом суде. Арбитраж будет проводиться в Цуге, Швейцария, и может проводиться с помощью видеоконференции виртуальными/онлайн методами, если это возможно. Трибунал будет состоять из одного арбитра, и все разбирательства, а также переписка между сторонами будут конфиденциальными. Языком арбитража будет английский. Оплата всех соответствующих сборов в отношении арбитража, включая подачу, администрирование и гонорары арбитра, будет осуществляться в соответствии с Швейцарскими правилами международного арбитража. - -Независимо от любого применимого срока исковой давности, вы должны предъявить любые претензии в течение одного года после возникновения претензии или времени, когда вы должны были разумно узнать о претензии. Вы также отказываетесь от права участвовать в коллективном иске или коллективном арбитраже против нас. - -### 11) О настоящих Условиях использования веб-сайта - -Настоящие Условия использования веб-сайта охватывают все соглашение между вами и нами в отношении веб-сайта и заменяют все предыдущие и современные договоренности, соглашения, заявления и гарантии, как письменные, так и устные, в отношении веб-сайта. - -Заголовки и подзаголовки, идентифицирующие разделы и подразделы настоящих Условий использования веб-сайта, предназначены только для справки и не определяют, не изменяют, не расширяют, не ограничивают и не влияют на толкование каких-либо положений настоящих Условий использования веб-сайта. - -Если какая-либо часть настоящих Условий использования веб-сайта признана недействительной или не имеющей исковой силы, эта часть будет отделима от настоящих Условий использования веб-сайта, а оставшиеся части останутся в полной силе и действии. Если мы не применяем какие-либо из настоящих Условий использования веб-сайта, это не означает, что мы отказались от нашего права применять их. - -Если у вас есть какие-либо конкретные вопросы о настоящих Условиях использования веб-сайта, пожалуйста, свяжитесь с нами по адресу legal@free.technology. - -This document is licensed under CC-BY-SA. diff --git a/ru/developers/api.md b/ru/developers/api.md deleted file mode 100644 index e37f0b9..0000000 --- a/ru/developers/api.md +++ /dev/null @@ -1,5 +0,0 @@ -# API Codex - -Codex использует REST API для взаимодействия с узлом, и мы можем использовать HTTP-клиент для взаимодействия и настройки. - -Спецификация API доступна на [api.codex.storage](https://api.codex.storage) и генерируется на основе [openapi.yaml](https://github.com/codex-storage/nim-codex/blob/master/openapi.yaml). Мы также генерируем [Postman Collection](https://api.codex.storage/postman.json). diff --git a/ru/index.md b/ru/index.md deleted file mode 100644 index 0fd5b0b..0000000 --- a/ru/index.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -# https://vitepress.dev/reference/default-theme-home-page -layout: home - -hero: - name: Codex - text: Децентрализованная платформа хранения данных - tagline: Codex — это надежный, децентрализованный протокол хранения данных, созданный для того, чтобы мировое сообщество могло сохранять свои важнейшие знания без риска цензуры. - actions: - - theme: brand - text: Что такое Codex? - link: /ru/learn/what-is-codex - - theme: alt - text: Быстрый старт - link: /ru/learn/quick-start - - theme: alt - text: Присоединиться к Codex Testnet - link: /ru/networks/testnet - -features: - - title: Изучение - details: Узнать бльше информации о Codex - link: /ru/learn/what-is-codex - icon: 📚 - - title: Сети - details: Участвуй в сети Codex в качестве оператора хранилища или покупателя - link: /ru/networks/networks - icon: 🚦 - - title: Разработчики - details: Разработка Codex - link: /ru/developers/api - icon: 🏗️ ---- diff --git a/ru/learn/architecture.md b/ru/learn/architecture.md deleted file mode 100644 index 32d5090..0000000 --- a/ru/learn/architecture.md +++ /dev/null @@ -1,86 +0,0 @@ -# Описание и архитектура - -Codex создает надежный механизм хранения данных, который полностью децентрализован и обеспечивает устойчивость к коррупции и цензуре для web3-приложений. Он изначально защищает участников сети, предоставляя хостам правдоподобное отрицание ответственности за хранимые ими данные, а клиентам - доказуемые гарантии долговечности - до 99,99%, оставаясь при этом эффективным с точки зрения хранения и пропускной способности. - -Эти четыре ключевые особенности объединяются, чтобы отличить Codex от существующих проектов в нише децентрализованного хранения: - -- **Кодирование с исправлением ошибок:** Обеспечивает эффективную избыточность данных, что повышает гарантии долговечности данных. - -- **Доказательство извлекаемости на основе ZK:** Для легких гарантий долговечности данных. - -- **Механизм ленивого восстановления:** Для эффективного восстановления данных и предотвращения потерь. - -- **Стимулирование:** Для поощрения рационального поведения, широкого участия в сети и эффективного предоставления ограниченных сетевых ресурсов. - -### Стимулируемая децентрализация - -Механизмы стимулирования - это один из ключевых элементов, отсутствующих в традиционных файлообменных сетях. Codex считает, что надежная структура стимулирования на основе рынка обеспечит широкое участие всех типов узлов, описанных ниже. - -Разработка адекватной структуры стимулирования обусловлена следующими целями: - -- Спрос и предложение для поощрения оптимального использования сетевых ресурсов. - -- Увеличение участия путем предоставления узлам возможности использовать свои конкурентные преимущества для максимизации прибыли. - -- Предотвращение спама и сдерживание вредоносного участия. - -Хотя структура стимулирования Codex еще не окончательно определена, она будет включать рынок участников, желающих хранить данные, и тех, кто предоставляет хранилище, размещающих залог, причем последние будут делать ставки на открытые контракты на хранение. Эта структура направлена на обеспечение согласования стимулов участников, в результате чего Codex будет функционировать как задумано. - -### Сетевая архитектура - -Codex состоит из нескольких типов узлов, каждый из которых выполняет свою роль в работе сети. Аналогично, требования к оборудованию для каждого типа узла различаются, что позволяет участвовать тем, кто использует устройства с ограниченными ресурсами. - -**Узлы хранения** - -Как надежные поставщики долгосрочного хранения Codex, узлы хранения размещают залог на основе залога, размещенного на стороне запроса контрактов, и количества слотов, которые имеет контракт. Это связано с долговечностью, требуемой пользователем. Непредоставление периодических доказательств владения данными приводит к штрафам за сокращение. - -**Узел-агрегатор** - -Метод разгрузки кодирования с исправлением ошибок, генерации доказательств и агрегации доказательств клиентским узлом с низкими ресурсами, в настоящее время находится в разработке и будет частью следующего выпуска Codex во втором/четвертом квартале следующего года. - -**Клиентские узлы** - -Клиентские узлы делают запросы к другим узлам на хранение, поиск и извлечение данных. Большая часть сети Codex будет состоять из клиентских узлов, и эти участники могут одновременно выступать в качестве кэширующих узлов для компенсации стоимости потребляемых сетевых ресурсов. - -Когда узел берет на себя обязательство по контракту на хранение и пользователь загружает данные, сеть будет активно проверять, что узел хранения находится в сети и что данные доступны для извлечения. Затем узлы хранения случайным образом опрашиваются для передачи доказательств владения данными в течение интервала, соответствующего продолжительности контракта и гарантии извлекаемости, которую предоставляет протокол. - -Если узел хранения отправляет недействительные доказательства или не предоставляет их вовремя, сеть исключает узел хранения из слота, и слот станет доступным для первого узла, который сгенерирует действительное доказательство для этого слота. - -Когда контракт перепубликуется, часть залога неисправного узла оплачивает комиссию за пропускную способность нового узла хранения. Кодирование с исправлением ошибок дополняет схему восстановления, позволяя восстанавливать отсутствующие фрагменты из данных в других слотах в рамках того же контракта на хранение, размещенного на безупречных узлах хранения. - -![архитектура](/learn/architecture.png) - -### Архитектура рынка ### - -Рынок состоит из смарт-контракта, развернутого в блокчейне, и модулей покупки и продажи, которые являются частью программного обеспечения узла. Модуль покупки отвечает за размещение запросов на хранение в смарт-контракте. Модуль продаж является его аналогом, который поставщики хранилищ используют для определения того, какие запросы на хранение их интересуют. - -#### Смарт-контракт #### - -Смарт-контракт облегчает сопоставление между поставщиками хранилищ и клиентами хранилищ. Клиент хранилища может запросить определенный объем хранилища на определенный срок. Этот запрос затем размещается в блокчейне, чтобы поставщики хранилищ могли его увидеть и решить, хотят ли они заполнить слот в запросе. - -Основные параметры запроса на хранение: -- количество байтов хранилища, которое запрашивается -- идентификатор контента (CID) данных, которые должны быть сохранены -- срок, на который должны быть сохранены данные -- количество слотов (на основе параметров кодирования с исправлением ошибок) -- количество токенов для оплаты хранения - -На уровне протокола клиент хранилища свободен в определении этих параметров по своему усмотрению, чтобы он мог выбрать уровень долговечности, подходящий для данных, и скорректировать его с учетом изменяющихся цен на хранение. Приложения, построенные на Codex, могут предоставлять рекомендации своим пользователям по выбору правильных параметров, аналогично тому, как кошельки Ethereum помогают с определением комиссий за газ. - -Смарт-контракт также проверяет, что поставщики хранилищ выполняют свои обещания. Поставщики хранилищ размещают залог, когда обещают заполнить слот запроса на хранение. От них ожидается предоставление периодических доказательств хранения в контракт, либо напрямую, либо через агрегатор. Если они неоднократно не делают этого, их залог может быть конфискован. Их слот затем присуждается другому поставщику хранилищ. - -Смарт-контракт указывает, когда определенный поставщик хранилищ должен предоставить доказательство хранения. Это делается не с фиксированным интервалом времени, а определяется стохастически, чтобы гарантировать, что поставщик хранилищ не может предсказать, когда он должен предоставить следующее доказательство хранения. - -#### Покупка #### - -Модуль покупки в программном обеспечении узла взаимодействует со смарт-контрактом от имени оператора узла. Он размещает запросы на хранение и обрабатывает любые другие взаимодействия, которые требуются в течение срока действия запроса. Например, когда запрос отменяется из-за недостаточного количества заинтересованных поставщиков хранилищ, модуль покупки может вывести токены, связанные с запросом. - -#### Продажи #### - -Модуль продаж является аналогом модуля продаж. Он отслеживает смарт-контракт, чтобы получать уведомления о входящих запросах на хранение. Он ведет список наиболее перспективных запросов, которые он может выполнить. Он будет отдавать предпочтение тем запросам, которые имеют высокое вознаграждение и низкий залог. Как только он найдет подходящий запрос, он попытается сначала зарезервировать, а затем заполнить слот, загрузив связанные данные, создав доказательство хранения и разместив его в смарт-контракте. Затем он продолжит отслеживать смарт-контракт, чтобы предоставлять ему доказательства хранения, когда они потребуются. - -Модуль продаж содержит стратегию максимальных усилий для определения того, какие запросы на хранение его интересуют. Со временем мы ожидаем появления более специализированных стратегий для удовлетворения потребностей, например, крупных поставщиков по сравнению с поставщиками, которые запускают узел из дома. - -### Белая книга ### - -Прочитайте [белую книгу Codex](/learn/whitepaper) diff --git a/ru/learn/build.md b/ru/learn/build.md deleted file mode 100644 index 9ef9e78..0000000 --- a/ru/learn/build.md +++ /dev/null @@ -1,238 +0,0 @@ -# Сборка Codex - -## Содержание - -- [Установка инструментов разработчика](#prerequisites) - - [Linux](#linux) - - [macOS](#macos) - - [Windows + MSYS2](#windows-msys2) - - [Другие](#other) -- [Клонирование и подготовка Git-репозитория](#repository) -- [Сборка исполняемого файла](#executable) -- [Запуск примера](#example-usage) - -**Дополнительно** -- [Запуск тестов](#tests) - -## Предварительные требования - -Для сборки nim-codex необходимо установить и сделать доступными инструменты разработчика в операционной системе. - -Инструкции ниже примерно соответствуют настройкам окружения в [CI workflow](https://github.com/codex-storage/nim-codex/blob/master/.github/workflows/ci.yml) nim-codex и известны как рабочие. - -Другие подходы могут быть жизнеспособны. На macOS некоторые пользователи могут предпочесть [MacPorts](https://www.macports.org/) вместо [Homebrew](https://brew.sh/). На Windows вместо MSYS2 некоторые пользователи могут предпочесть установку инструментов разработчика с помощью [winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/), [Scoop](https://scoop.sh/) или [Chocolatey](https://chocolatey.org/), или загрузку установщиков для, например, Make и CMake, в остальном полагаясь на официальные инструменты разработчика Windows. Приветствуются вклады сообщества в эти документы и нашу систему сборки! - -### Rust - -Текущая реализация схемы доказательств с нулевым разглашением Codex требует установки Rust версии 1.79.0 или выше. Убедитесь, что вы установили его для вашей ОС и добавили в PATH вашего терминала так, чтобы команда `cargo --version` показывала совместимую версию. - -### Linux - -> [!WARNING] -> Сборка в Linux в настоящее время требует gcc $\leq$ 13. Если это не вариант в вашей системе, вы можете попробовать [сборку в Docker](#building-within-docker) как обходной путь. - -*Команды менеджера пакетов могут требовать `sudo` в зависимости от настройки ОС.* - -На базовой установке Debian (или дистрибутива, производного от Debian, такого как Ubuntu), выполните - -```shell -apt-get update && apt-get install build-essential cmake curl git rustc cargo -``` - -Не-Debian дистрибутивы имеют разные менеджеры пакетов: `apk`, `dnf`, `pacman`, `rpm`, `yum` и т.д. - -Например, на базовой установке Fedora выполните - -```shell -dnf install @development-tools cmake gcc-c++ rust cargo -``` - -В случае, если ваш дистрибутив не предоставляет требуемую версию Rust, мы можем установить её с помощью [rustup](https://www.rust-lang.org/tools/install) -```shell -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- --default-toolchain=1.79.0 -y - -. "$HOME/.cargo/env" -``` - -Обратите внимание, что в настоящее время вы не сможете собрать Codex с gcc 14. Чтобы проверить, что у вас поддерживаемая версия, выполните: - -```shell -gcc --version -``` - -Если вы получите число, начинающееся с 14 (например, `14.2.0`), то вам нужно либо понизить версию, либо попробовать обходной путь, например [сборку в Docker](#building-within-docker). - -### macOS - -Установите [Xcode Command Line Tools](https://mac.install.guide/commandlinetools/index.html), открыв терминал и выполнив -```shell -xcode-select --install -``` - -Установите [Homebrew (`brew`)](https://brew.sh/) и в новом терминале выполните -```shell -brew install bash cmake rust -``` - -Проверьте, что `PATH` настроен правильно -```shell -which bash cmake - -# /usr/local/bin/bash -# /usr/local/bin/cmake -``` - -### Windows + MSYS2 - -*Инструкции ниже предполагают, что ОС - 64-битная Windows и что оборудование или ВМ совместимо с [x86-64](https://en.wikipedia.org/wiki/X86-64).* - -Скачайте и запустите установщик с [msys2.org](https://www.msys2.org/). - -Запустите среду MSYS2 [environment](https://www.msys2.org/docs/environments/). UCRT64 обычно рекомендуется: из меню *Пуск* Windows выберите `MSYS2 MinGW UCRT x64`. - -Предполагая среду UCRT64, в Bash выполните -```shell -pacman -Suy -pacman -S base-devel git unzip mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-rust -``` - -Нам следует понизить GCC до версии 13 [^gcc-14] -```shell -pacman -U --noconfirm \ - https://repo.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-gcc-13.2.0-6-any.pkg.tar.zst \ - https://repo.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-gcc-libs-13.2.0-6-any.pkg.tar.zst -``` - -#### Опционально: Интеграция с терминалом VSCode - -Вы можете связать терминал MSYS2-UCRT64 с VSCode, изменив файл конфигурации, как показано ниже. -Файл: `C:/Users//AppData/Roaming/Code/User/settings.json` -```json -{ - ... - "terminal.integrated.profiles.windows": { - ... - "MSYS2-UCRT64": { - "path": "C:\\msys64\\usr\\bin\\bash.exe", - "args": [ - "--login", - "-i" - ], - "env": { - "MSYSTEM": "UCRT64", - "CHERE_INVOKING": "1", - "MSYS2_PATH_TYPE": "inherit" - } - } - } -} -``` - -### Другие - -Возможно, что nim-codex может быть собран и запущен на других платформах, поддерживаемых языком [Nim](https://nim-lang.org/): семейство BSD, более старые версии Windows и т.д. Не было достаточного экспериментирования с nim-codex на таких платформах, поэтому инструкции не предоставляются. Приветствуются вклады сообщества в эти документы и нашу систему сборки! - -## Репозиторий - -В Bash выполните -```shell -git clone https://github.com/codex-storage/nim-codex.git repos/nim-codex && cd repos/nim-codex -``` - -nim-codex использует [nimbus-build-system](https://github.com/status-im/nimbus-build-system), поэтому затем выполните -```shell -make update -``` - -Этот шаг может занять некоторое время для завершения, потому что по умолчанию он собирает [компилятор Nim](https://nim-lang.org/docs/nimc.html). - -Чтобы увидеть больше вывода от `make`, передайте `V=1`. Это работает для всех целей `make` в проектах, использующих nimbus-build-system -```shell -make V=1 update -``` - -## Исполняемый файл - -В Bash выполните -```shell -make -``` - -Цель `make` по умолчанию создает исполняемый файл `build/codex`. - -## Инструменты - -### Инструмент загрузки схемы - -Чтобы собрать инструмент загрузки схемы, расположенный в `tools/cirdl`, выполните: - -```shell -make cirdl -``` - -## Пример использования - -См. инструкции в [Быстром старте](/learn/quick-start). - -## Тесты - -В Bash выполните -```shell -make test -``` - -### testAll - -#### Предварительные требования - -Для запуска интеграционных тестов требуется тестовый узел Ethereum. Следуйте этим инструкциям для его настройки. - -##### Windows (сделайте это перед "Все платформы") - -1. Скачайте и установите Visual Studio 2017 или новее. (Не VSCode!) В обзоре рабочих нагрузок включите `Desktop development with C++`. ( https://visualstudio.microsoft.com ) - -##### Все платформы - -1. Установите NodeJS (проверено с v18.14.0), рассмотрите использование NVM как менеджера версий. [Node Version Manager (`nvm`)](https://github.com/nvm-sh/nvm#readme) -1. Откройте терминал -1. Перейдите в папку vendor/codex-contracts-eth: `cd //vendor/codex-contracts-eth/` -1. `npm install` -> Должно завершиться с количеством добавленных пакетов и обзором известных уязвимостей. -1. `npm test` -> Должен вывести результаты тестов. Может занять минуту. - -Перед запуском интеграционных тестов вы должны вручную запустить тестовый узел Ethereum. -1. Откройте терминал -1. Перейдите в папку vendor/codex-contracts-eth: `cd //vendor/codex-contracts-eth/` -1. `npm start` -> Это должно запустить Hardhat и вывести ряд ключей и предупреждающее сообщение. - -#### Запуск - -Цель `testAll` запускает те же тесты, что и `make test`, а также запускает тесты для контрактов Ethereum nim-codex, а также базовый набор интеграционных тестов. - -Чтобы запустить `make testAll`. - -Используйте новый терминал для запуска: -```shell -make testAll -``` - -## Сборка в Docker - -Для конкретного случая дистрибутивов Linux, которые поставляются с gcc 14 -и понижение до 13 невозможно/нежелательно, сборка в контейнере Docker -и извлечение бинарных файлов путем копирования или монтирования остается -вариантом; например: - -```bash= -# Клонировать оригинальный репозиторий. -git clone https://github.com/codex-storage/nim-codex - -# Собрать внутри docker -docker build -t codexstorage/nim-codex:latest -f nim-codex/docker/codex.Dockerfile nim-codex - -# Извлечь исполняемый файл -docker create --name=codex-build codexstorage/nim-codex:latest -docker cp codex-build:/usr/local/bin/codex ./codex -docker cp codex-build:/usr/local/bin/cirdl ./cirdl -``` - -и вуаля, у вас должны быть бинарные файлы доступны в текущей папке. diff --git a/ru/learn/download-flow.md b/ru/learn/download-flow.md deleted file mode 100644 index 346627a..0000000 --- a/ru/learn/download-flow.md +++ /dev/null @@ -1,67 +0,0 @@ -# Процесс загрузки -Последовательность взаимодействий, приводящих к передаче блоков данных через сеть. - -## Локальное хранилище -Когда данные доступны в локальном хранилище блоков, - -```mermaid -sequenceDiagram -actor Alice -participant API -Alice->>API: Download(CID) -API->>+Node/StoreStream: Retrieve(CID) -loop Get manifest block, then data blocks - Node/StoreStream->>NetworkStore: GetBlock(CID) - NetworkStore->>LocalStore: GetBlock(CID) - LocalStore->>NetworkStore: Block - NetworkStore->>Node/StoreStream: Block -end -Node/StoreStream->>Node/StoreStream: Handle erasure coding -Node/StoreStream->>-API: Data stream -API->>Alice: Stream download of block -``` - -## Сетевое хранилище -Когда данные не найдены в локальном хранилище блоков, используется механизм обмена блоками для обнаружения местоположения блока в сети. Устанавливается соединение с узлом(ами), у которых есть блок, и происходит обмен. - -```mermaid -sequenceDiagram -box -actor Alice -participant API -participant Node/StoreStream -participant NetworkStore -participant Discovery -participant Engine -end -box -participant OtherNode -end -Alice->>API: Download(CID) -API->>+Node/StoreStream: Retrieve(CID) -Node/StoreStream->>-API: Data stream -API->>Alice: Download stream begins -loop Get manifest block, then data blocks - Node/StoreStream->>NetworkStore: GetBlock(CID) - NetworkStore->>Engine: RequestBlock(CID) - opt CID not known - Engine->>Discovery: Discovery Block - Discovery->>Discovery: Locates peers who provide block - Discovery->>Engine: Peers - Engine->>Engine: Update peers admin - end - Engine->>Engine: Select optimal peer - Engine->>OtherNode: Send WantHave list - OtherNode->>Engine: Send BlockPresence - Engine->>Engine: Update peers admin - Engine->>Engine: Decide to buy block - Engine->>OtherNode: Send WantBlock list - OtherNode->>Engine: Send Block - Engine->>NetworkStore: Block - NetworkStore->>NetworkStore: Add to Local store - NetworkStore->>Node/StoreStream: Resolve Block - Node/StoreStream->>Node/StoreStream: Handle erasure coding - Node/StoreStream->>API: Push data to stream -end -API->>Alice: Download stream finishes -``` diff --git a/ru/learn/installer/install-and-run.md b/ru/learn/installer/install-and-run.md deleted file mode 100644 index c0342cf..0000000 --- a/ru/learn/installer/install-and-run.md +++ /dev/null @@ -1,48 +0,0 @@ -# Быстрый старт - -Codex Installer - это инструмент командной строки, который упрощает процесс настройки узла Codex. Он обрабатывает все необходимые шаги для быстрого и эффективного запуска вашего узла. - -> Прежде чем мы начнем, пожалуйста, просмотрите и примите [отказ от ответственности](/codex/installer-disclaimer), так как Codex Installer собирает некоторую информацию о вашем узле для улучшения пользовательского опыта. - -
- - - -## Требования - -- git -- npm - -## Запуск Codex Installer - -Чтобы запустить Codex Installer, просто выполните следующую команду в вашем терминале: - -```bash -npx codexstorage -``` - -## Скачивание и установка Codex - -После выполнения вышеуказанной команды вы увидите интерфейс командной строки с различными опциями, как показано ниже: - -![InstallCodex](/learn/codex-installer.png) - -При выборе опции `Download and install Codex` вам будет предложено согласиться с отказом от ответственности за конфиденциальность и указать путь установки для завершения установки. Если вы не хотите соглашаться с отказом от ответственности за сбор данных, вы можете выбрать опцию `Exit` и следовать инструкциям [Ручной настройки](/learn/quick-start.md) для установки Codex без использования Installer. - -## Запуск узла Codex - -При выборе опции `Run Codex node` вам будет предложено указать порт прослушивания (по умолчанию 8070) и порт обнаружения (по умолчанию 8090). Вы можете дополнительно указать ваш публичный адрес ERC20 для привязки вашего тестового узла к вашему кошельку (Обратите внимание, что Codex пока не обещает никаких стимулов за запуск узла). - -![RunCodex](/learn/codex-installer2.png) - -Держите это окно терминала открытым, так как его закрытие приведет к завершению работы вашего узла. - -## Получение роли *ALTRUISTIC MODE* в Discord Codex - -После этого ваш узел Codex должен быть запущен и работать. Вы можете проверить информацию и статус вашего узла, выбрав третью опцию. - -![Get Role](/learn/codex-installer3.png) - -Чтобы получить роль *ALTRUISTIC MODE*, присоединитесь к [Discord Codex](https://discord.gg/codex-storage) и перейдите в канал #bot. Выполните команду `/node `, где `` можно найти в меню Node Information в вашем Installer. - -Чтобы сохранить свою роль, вам потребуется часто взаимодействовать с тестовой сетью Codex, запуская свой узел и/или [загружая/скачивая файлы](/learn/installer/upload-and-download.md) с использованием тестовой сети. \ No newline at end of file diff --git a/ru/learn/installer/requirements.md b/ru/learn/installer/requirements.md deleted file mode 100644 index 54e25b4..0000000 --- a/ru/learn/installer/requirements.md +++ /dev/null @@ -1,23 +0,0 @@ -# Требования - -> **Примечание:** Использование установщика Codex рекомендуется только в том случае, если вы согласны предоставить информацию о вашем узле для улучшения работы Codex. Если вы не согласны с отказом от ответственности, пожалуйста, рассмотрите возможность [ручной настройки Codex](/learn/quick-start.md) - -
- -Чтобы обеспечить бесперебойную работу вашего узла Codex, необходимо убедиться, что ваша машина соответствует следующим требованиям: - -## Зависимости - -- git -- npm - -## Проброс портов - -Для правильной работы Codex требуется, чтобы на вашей машине были открыты два порта. Обратите внимание, что **порты, указанные ниже, настраиваются** в соответствии с вашими предпочтениями: - - | Протокол | Сервис | Порт | - | -------- | ---------- | ------ | - | UDP | Discovery | По умолчанию: `8090` | - | TCP | Transport | По умолчанию: `8070` | - -Если вы не знакомы с пробросом портов, вы можете следовать инструкциям [здесь](https://www.noip.com/support/knowledgebase/general-port-forwarding-guide/). \ No newline at end of file diff --git a/ru/learn/installer/upload-and-download.md b/ru/learn/installer/upload-and-download.md deleted file mode 100644 index 690d78d..0000000 --- a/ru/learn/installer/upload-and-download.md +++ /dev/null @@ -1,27 +0,0 @@ -# Загрузка/Скачивание файлов в тестовой сети - -Вы можете загружать или скачивать файлы, используя опцию Upload / Download в Codex Installer или с помощью приложения Codex GUI (рекомендуется). - -## Codex Vault - -Codex Vault - это веб-приложение с графическим интерфейсом, которое помогает вам взаимодействовать с тестовой сетью Codex путем загрузки и скачивания файлов. После запуска вашего узла Codex с помощью установщика, вы можете получить доступ к Codex Vault, перейдя по адресу https://app.codex.storage - -![Codex Vault](/learn/codex-vault.png) - -Убедитесь, что все необходимые условия отмечены в разделе 'health check' перед попыткой загрузки или скачивания файлов. - -### Загрузка и скачивание файлов - -Чтобы загрузить файл, вы можете либо перетащить файл в область загрузки, либо нажать кнопку 'upload'. После загрузки вы сможете найти уникальный CID для файла. - -Чтобы скачать файл, введите CID файла в разделе 'download' и нажмите кнопку 'download'. - -![Upload and Download](/learn/upload-download.png) - -## Что дальше? - -Теперь, когда вы знаете, как загружать и скачивать файлы в тестовой сети, вы можете попробовать изучить некоторые экспериментальные функции и создать свои собственные приложения на основе Codex: - -- [Использование REST API Codex](/learn/using) -- [Запуск Codex с поддержкой локального маркетплейса](/learn/local-marketplace) -- [Создание приложений с использованием библиотеки codex-js](https://github.com/codex-storage/codex-js) \ No newline at end of file diff --git a/ru/learn/local-marketplace.md b/ru/learn/local-marketplace.md deleted file mode 100644 index 5950591..0000000 --- a/ru/learn/local-marketplace.md +++ /dev/null @@ -1,662 +0,0 @@ ---- -outline: [2, 3] ---- -# Запуск локальной сети Codex с поддержкой маркетплейса - -Это руководство научит вас, как запустить небольшую сеть Codex с включенным -_маркетплейсом хранения_; т.е. функциональностью в Codex, которая -позволяет участникам предлагать и покупать хранилище на рынке, обеспечивая -честное выполнение обязательств поставщиками хранилища с помощью криптографических доказательств. - -В этом руководстве вы: - -1. [Настроите сеть Geth PoA](#_1-set-up-a-geth-poa-network); -2. [Настроите маркетплейс](#_2-set-up-the-marketplace); -3. [Запустите Codex](#_3-run-codex); -4. [Купите и продайте хранилище на маркетплейсе](#_4-buy-and-sell-storage-on-the-marketplace). - -## Предварительные требования - -Для прохождения этого руководства вам понадобится: - -* клиент Ethereum [geth](https://github.com/ethereum/go-ethereum); - Вам нужна версия `1.13.x` geth, так как более новые версии больше не поддерживают - Proof of Authority (PoA). Это руководство было протестировано с версией geth `1.13.15`. -* бинарный файл Codex, который [можно собрать из исходного кода](https://github.com/codex-storage/nim-codex?tab=readme-ov-file#build-and-run). - -Мы также будем использовать синтаксис [bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell)) -на протяжении всего руководства. Если вы используете другую оболочку, вам может потребоваться адаптировать -команды под вашу платформу. - -Для начала создайте новую папку, где мы будем хранить файлы, связанные с руководством, -чтобы держать их отдельно от репозитория codex. -Предположим, что имя папки будет `marketplace-tutorial`. - -## 1. Настройка сети Geth PoA - -Для этого руководства мы будем использовать простую -[Proof-of-Authority](https://github.com/ethereum/EIPs/issues/225) сеть -с geth. Первым шагом является создание _учетной записи подписанта_: учетной записи, которая -будет использоваться geth для подписи блоков в сети. -Любой блок, подписанный подписантом, принимается как действительный. - -### 1.1. Создание учетной записи подписанта - -Чтобы создать учетную запись подписанта, из директории `marketplace-tutorial` выполните: - -```bash -geth account new --datadir geth-data -``` - -Генератор учетных записей попросит вас ввести пароль, который вы можете -оставить пустым. Затем он выведет некоторую информацию, -включая публичный адрес учетной записи: - -```bash -INFO [09-29|16:49:24.244] Maximum peer count ETH=50 total=50 -Your new account is locked with a password. Please give a password. Do not forget this password. -Password: -Repeat password: - -Your new key was generated - -Public address of the key: 0x33A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB -Path of the secret key file: geth-data/keystore/UTC--2024-09-29T14-49-31.655272000Z--33a904ad57d0e2cb8ffe347d3c0e83c2e875e7db - -- You can share your public address with anyone. Others need it to interact with you. -- You must NEVER share the secret key with anyone! The key controls access to your funds! -- You must BACKUP your key file! Without the key, it's impossible to access account funds! -- You must REMEMBER your password! Without the password, it's impossible to decrypt the key! -``` - -В этом примере публичный адрес учетной записи подписанта - -`0x33A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB`. -У вас будет выведен другой адрес. Сохраните его для дальнейшего использования. - -Затем установите переменную окружения для дальнейшего использования: - -```bash -export GETH_SIGNER_ADDR="0x0000000000000000000000000000000000000000" -echo ${GETH_SIGNER_ADDR} > geth_signer_address.txt -``` - -> Здесь убедитесь, что вы заменили `0x0000000000000000000000000000000000000000` -> на ваш публичный адрес учетной записи подписанта -> (`0x33A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB` в нашем примере). - -### 1.2. Настройка сети и создание генезис-блока - -Следующий шаг - указать geth, какую сеть вы хотите запустить. -Мы будем запускать [pre-merge](https://ethereum.org/en/roadmap/merge/) -сеть с консенсусом Proof-of-Authority. -Чтобы это работало, создайте файл `network.json`. - -Если вы установили переменную `GETH_SIGNER_ADDR` выше, вы можете выполнить следующую -команду для создания файла `network.json`: - -```bash -echo "{\"config\": { \"chainId\": 12345, \"homesteadBlock\": 0, \"eip150Block\": 0, \"eip155Block\": 0, \"eip158Block\": 0, \"byzantiumBlock\": 0, \"constantinopleBlock\": 0, \"petersburgBlock\": 0, \"istanbulBlock\": 0, \"berlinBlock\": 0, \"londonBlock\": 0, \"arrowGlacierBlock\": 0, \"grayGlacierBlock\": 0, \"clique\": { \"period\": 1, \"epoch\": 30000 } }, \"difficulty\": \"1\", \"gasLimit\": \"8000000\", \"extradata\": \"0x0000000000000000000000000000000000000000000000000000000000000000${GETH_SIGNER_ADDR:2}0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\", \"alloc\": { \"${GETH_SIGNER_ADDR}\": { \"balance\": \"10000000000000000000000\"}}}" > network.json -``` - -Вы также можете создать файл вручную, не забыв обновить его своим -публичным адресом подписанта: - -```json -{ - "config": { - "chainId": 12345, - "homesteadBlock": 0, - "eip150Block": 0, - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "berlinBlock": 0, - "londonBlock": 0, - "arrowGlacierBlock": 0, - "grayGlacierBlock": 0, - "clique": { - "period": 1, - "epoch": 30000 - } - }, - "difficulty": "1", - "gasLimit": "8000000", - "extradata": "0x000000000000000000000000000000000000000000000000000000000000000033A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "alloc": { - "0x33A904Ad57D0E2CB8ffe347D3C0E83C2e875E7dB": { - "balance": "10000000000000000000000" - } - } -} -``` - -Обратите внимание, что адрес учетной записи подписанта встроен в два разных места: -* внутри строки `"extradata"`, окруженный нулями и без префикса `0x`; -* как ключ записи в секции `alloc`. - Убедитесь, что вы заменили этот ID на ID учетной записи, который вы записали в - [Шаге 1.1](#_1-1-create-a-signer-account). - -После создания `network.json` вы можете инициализировать сеть с помощью: - -```bash -geth init --datadir geth-data network.json -``` - -В выводе этой команды могут быть предупреждения, например: - -```bash -WARN [08-21|14:48:12.305] Unknown config environment variable envvar=GETH_SIGNER_ADDR -``` - -или даже ошибки при первом запуске команды: - -```bash -ERROR[08-21|14:48:12.399] Head block is not reachable -``` - -Важно, что в конце вы должны увидеть что-то похожее на: - -```bash -INFO [08-21|14:48:12.639] Successfully wrote genesis state database=lightchaindata hash=768bf1..42d06a -``` - -### 1.3. Запуск вашего PoA узла - -Теперь мы готовы запустить нашу $1$-узловую приватную блокчейн-сеть. -Чтобы запустить узел подписанта, откройте отдельный терминал в той же рабочей -директории и убедитесь, что у вас установлена переменная `GETH_SIGNER_ADDR`. -Для удобства используйте `geth_signer_address.txt`: - -```bash -export GETH_SIGNER_ADDR=$(cat geth_signer_address.txt) -``` - -Имея установленную переменную `GETH_SIGNER_ADDR`, выполните: - -```bash -geth\ - --datadir geth-data\ - --networkid 12345\ - --unlock ${GETH_SIGNER_ADDR}\ - --nat extip:127.0.0.1\ - --netrestrict 127.0.0.0/24\ - --mine\ - --miner.etherbase ${GETH_SIGNER_ADDR}\ - --http\ - --allow-insecure-unlock -``` - -Обратите внимание, что учетная запись подписанта, созданная в -[Шаге 1.1](#_1-1-create-a-signer-account), снова появляется как в -`--unlock`, так и в `--allow-insecure-unlock`. - -Geth попросит вас ввести пароль учетной записи при запуске. -После этого он должен запуститься и начать "майнить" блоки. - -Здесь также могут возникнуть ошибки, например: - -```bash -ERROR[08-21|15:00:27.625] Bootstrap node filtered by netrestrict id=c845e51a5e470e44 ip=18.138.108.67 -ERROR[08-21|15:00:27.625] Bootstrap node filtered by netrestrict id=f23ac6da7c02f84a ip=3.209.45.79 -ERROR[08-21|15:00:27.625] Bootstrap node filtered by netrestrict id=ef2d7ab886910dc8 ip=65.108.70.101 -ERROR[08-21|15:00:27.625] Bootstrap node filtered by netrestrict id=6b36f791352f15eb ip=157.90.35.166 -``` - -Их можно безопасно игнорировать. - -Если команда выше завершается с ошибкой: - -```bash -Fatal: Failed to register the Ethereum service: only PoS networks are supported, please transition old ones with Geth v1.13.x -``` - -убедитесь, что вы используете правильную версию Geth -(см. раздел [Предварительные требования](#prerequisites)) - -## 2. Настройка маркетплейса - -Для этого раздела вам нужно открыть новый терминал, и geth должен быть уже запущен. -Настройка маркетплейса Codex включает: - -1. Развертывание контрактов маркетплейса Codex в нашу приватную блокчейн-сеть -2. Настройку учетных записей Ethereum, которые мы будем использовать для покупки и продажи хранилища в - маркетплейсе Codex -3. Обеспечение этих учетных записей необходимыми балансами токенов - -### 2.1. Развертывание контрактов маркетплейса Codex - -Убедитесь, что вы вышли из директории `marketplace-tutorial` и клонируйте -`codex-storage/nim-codex.git`: - -```bash -git clone https://github.com/codex-storage/nim-codex.git -``` - -> Если вы хотите просто клонировать репозиторий для прохождения руководства, вы можете -> пропустить историю и просто скачать голову ветки master, используя -> опцию `--depth 1`: `git clone --depth 1 https://github.com/codex-storage/nim-codex.git` - -Таким образом, структура директорий для целей этого руководства выглядит так: - -```bash -| -|-- nim-codex -└-- marketplace-tutorial -``` - -> Вы можете клонировать `codex-storage/nim-codex.git` в другое место. - -Теперь из папки `nim-codex` выполните: - -```bash -make update && make -``` - -> Это может занять некоторое время, так как это также соберет компилятор `nim`. Будьте терпеливы. - -Теперь, чтобы запустить локальную сеть Ethereum, выполните: - -```bash -cd vendor/codex-contracts-eth -npm install -``` - -> При написании документа мы использовали `node` версии `v20.17.0` и -> `npm` версии `10.8.2`. - -Прежде чем продолжить, вы должны **дождаться, пока будет добыто $256$ блоков** -**в вашей PoA сети**, иначе развертывание завершится неудачей. Это должно занять около -$4$ минут и $30$ секунд. Вы можете проверить, на какой высоте блока вы находитесь, -выполнив следующую команду -**из папки `marketplace-tutorial`**: - -```bash -geth attach --exec web3.eth.blockNumber ./geth-data/geth.ipc -``` - -как только это превысит $256$, вы готовы к работе. - -Чтобы развернуть контракты, из директории `codex-contracts-eth` выполните: - -```bash -export DISTTEST_NETWORK_URL=http://localhost:8545 -npx hardhat --network codexdisttestnetwork deploy -``` - -Если команда завершится успешно, вы увидите вывод, похожий на этот: - -```bash -Deployed Marketplace with Groth16 Verifier at: -0xCf0df6C52B02201F78E8490B6D6fFf5A82fC7BCd -``` -> конечно, ваш адрес будет другим. - -Теперь вы готовы подготовить учетные записи. - -### 2.2. Генерация необходимых учетных записей - -Мы будем запускать $2$ узла Codex: **поставщик хранилища**, который будет продавать хранилище -в сети, и **клиент**, который будет покупать и использовать такое хранилище; -поэтому нам нужны две действительные учетные записи Ethereum. Мы могли бы создать случайные -учетные записи, используя один из многих доступных инструментов, но, поскольку -это руководство работает в локальной приватной сети, мы просто предоставим вам -две предварительно созданные учетные записи вместе с их приватными ключами, -которые вы можете скопировать и вставить: - -Сначала убедитесь, что вы вернулись в папку `marketplace-tutorial` и -не находитесь в подпапке `codex-contracts-eth`. Затем установите эти переменные: - -**Хранилище:** -```bash -export ETH_STORAGE_ADDR=0x45BC5ca0fbdD9F920Edd12B90908448C30F32a37 -export ETH_STORAGE_PK=0x06c7ac11d4ee1d0ccb53811b71802fa92d40a5a174afad9f2cb44f93498322c3 -echo $ETH_STORAGE_PK > storage.pkey && chmod 0600 storage.pkey -``` - -**Клиент:** -```bash -export ETH_CLIENT_ADDR=0x9F0C62Fe60b22301751d6cDe1175526b9280b965 -export ETH_CLIENT_PK=0x5538ec03c956cb9d0bee02a25b600b0225f1347da4071d0fd70c521fdc63c2fc -echo $ETH_CLIENT_PK > client.pkey && chmod 0600 client.pkey -``` - -### 2.3. Обеспечение учетных записей токенами - -Теперь нам нужно перевести немного ETH на каждую из учетных записей, а также предоставить -им некоторые токены Codex для использования узлом хранилища в качестве залога и -для клиентского узла для покупки фактического хранилища. - -Хотя процесс не особенно сложен, я предлагаю вам использовать -[скрипт, который мы подготовили](https://github.com/gmega/local-codex-bare/blob/main/scripts/mint-tokens.js) -для этого. Этот скрипт, по сути: - -1. читает адрес контракта маркетплейса и его ABI из данных развертывания; -2. переводит $1$ ETH с учетной записи подписанта на целевую учетную запись, если целевая - учетная запись не имеет баланса ETH; -3. чеканит $n$ токенов Codex и добавляет их в баланс целевой учетной записи. - -Чтобы использовать скрипт, просто скачайте его в локальный файл с именем `mint-tokens.js`, -например, используя `curl` (убедитесь, что вы находитесь в -директории `marketplace-tutorial`): - -```bash -# скачать скрипт -curl https://raw.githubusercontent.com/gmega/codex-local-bare/main/scripts/mint-tokens.js -o mint-tokens.js -``` - -Затем выполните: - -```bash -# установить расположение файла контракта (мы предполагаем, что вы находитесь в директории marketplace-tutorial) -export CONTRACT_DEPLOY_FULL="../nim-codex/vendor/codex-contracts-eth/deployments/codexdisttestnetwork" -export GETH_SIGNER_ADDR=$(cat geth_signer_address.txt) -# Устанавливает Web3-js -npm install web3 -# Предоставляет токены учетной записи хранилища. -node ./mint-tokens.js $CONTRACT_DEPLOY_FULL/TestToken.json $GETH_SIGNER_ADDR 0x45BC5ca0fbdD9F920Edd12B90908448C30F32a37 10000000000 -# Предоставляет токены клиентской учетной записи. -node ./mint-tokens.js $CONTRACT_DEPLOY_FULL/TestToken.json $GETH_SIGNER_ADDR 0x9F0C62Fe60b22301751d6cDe1175526b9280b965 10000000000 -``` - -Если вы получите сообщение типа - -```bash -Usage: mint-tokens.js -``` - -то вам нужно убедиться, что вы предоставили все необходимые аргументы. -В частности, вам нужно убедиться, что переменная окружения `GETH_SIGNER_ADDR` -содержит адрес подписанта (мы использовали -`export GETH_SIGNER_ADDR=$(cat geth_signer_address.txt)` выше, чтобы -убедиться, что она установлена). - -## 3. Запуск Codex - -С учетными записями и geth на месте, мы теперь можем запустить узлы Codex. - -### 3.1. Узел хранилища - -Узел хранилища будет тем, который хранит данные и отправляет доказательства -хранения в цепочку. Для этого ему нужен доступ к: - -1. адресу контракта маркетплейса, который был развернут в - локальном узле geth в [Шаге 2.1](#_2-1-deploy-the-codex-marketplace-contracts); -2. образцам файлов церемонии, которые поставляются в репозитории контрактов Codex - (`nim-codex/vendor/codex-contracts-eth`). - -**Адрес контракта маркетплейса.** Адрес контракта можно найти -внутри файла `nim-codex/vendor/codex-contracts-eth/deployments/codexdisttestnetwork/Marketplace.json`. -Мы захватили это расположение выше в переменной `CONTRACT_DEPLOY_FULL`, поэтому из -папки `marketplace-tutorial` просто выполните: - -```bash -grep '"address":' ${CONTRACT_DEPLOY_FULL}/Marketplace.json -``` - -что должно вывести что-то вроде: -```bash -"address": "0xCf0df6C52B02201F78E8490B6D6fFf5A82fC7BCd", -``` - -> Этот адрес должен соответствовать адресу, который мы получили ранее при развертывании -> контракта маркетплейса выше. - -Затем выполните следующее с правильным адресом маркетплейса: -```bash -export MARKETPLACE_ADDRESS="0x0000000000000000000000000000000000000000" -echo ${MARKETPLACE_ADDRESS} > marketplace_address.txt -``` - -где вы заменяете `0x0000000000000000000000000000000000000000` на -адрес контракта маркетплейса выше в -[Шаге 2.1](#_2-1-deploy-the-codex-marketplace-contracts). - -**Файлы церемонии провайдера.** Файлы церемонии находятся в подкаталоге -`nim-codex/vendor/codex-contracts-eth/verifier/networks/codexdisttestnetwork`. -Их три: `proof_main.r1cs`, `proof_main.zkey`, -и `prooof_main.wasm`. Нам понадобятся все они для запуска узла хранилища Codex. - -**Запуск узла хранилища.** Пусть: - -* `PROVER_ASSETS` содержит директорию, где находятся файлы церемонии провайдера. - **Это должен быть абсолютный путь**; -* `CODEX_BINARY` содержит расположение вашего бинарного файла Codex; -* `MARKETPLACE_ADDRESS` содержит адрес контракта маркетплейса - (мы уже установили его выше). - -Установите эти пути в переменные окружения (убедитесь, что вы находитесь в -директории `marketplace-tutorial`): - -```bash -export CONTRACT_DEPLOY_FULL=$(realpath "../nim-codex/vendor/codex-contracts-eth/deployments/codexdisttestnetwork") -export PROVER_ASSETS=$(realpath "../nim-codex/vendor/codex-contracts-eth/verifier/networks/codexdisttestnetwork/") -export CODEX_BINARY=$(realpath "../nim-codex/build/codex") -export MARKETPLACE_ADDRESS=$(cat marketplace_address.txt) -``` -> вы можете заметить, что мы уже установили переменную `CONTRACT_DEPLOY_FULL` -> выше. Здесь мы убеждаемся, что это абсолютный путь. - -Чтобы запустить узел хранилища, выполните: - -```bash -${CODEX_BINARY}\ - --data-dir=./codex-storage\ - --listen-addrs=/ip4/0.0.0.0/tcp/8080\ - --api-port=8000\ - --disc-port=8090\ - persistence\ - --eth-provider=http://localhost:8545\ - --eth-private-key=./storage.pkey\ - --marketplace-address=${MARKETPLACE_ADDRESS}\ - --validator\ - --validator-max-slots=1000\ - prover\ - --circom-r1cs=${PROVER_ASSETS}/proof_main.r1cs\ - --circom-wasm=${PROVER_ASSETS}/proof_main.wasm\ - --circom-zkey=${PROVER_ASSETS}/proof_main.zkey -``` - -**Запуск клиентского узла.** - -Клиентский узел запускается аналогично, за исключением того, что: - -* нам нужно передать SPR узла хранилища, чтобы он мог сформировать сеть с ним; -* поскольку он не выполняет никаких доказательств, ему не требуются файлы церемонии. - -Мы получаем Signed Peer Record (SPR) узла хранилища, чтобы мы могли загрузить -клиентский узел с ним. Чтобы получить SPR, выполните следующий вызов: - -```bash -curl -H 'Accept: text/plain' 'http://localhost:8000/api/codex/v1/spr' --write-out '\n' -``` - -Вы должны получить SPR, начинающийся с `spr:`. - -Прежде чем продолжить, откройте новый терминал и войдите в директорию `marketplace-tutorial`. - -Затем установите эти пути в переменные окружения: - -```bash -# установить SPR для узла хранилища -export STORAGE_NODE_SPR=$(curl -H 'Accept: text/plain' 'http://localhost:8000/api/codex/v1/spr') -# базовые переменные -export CONTRACT_DEPLOY_FULL=$(realpath "../nim-codex/vendor/codex-contracts-eth/deployments/codexdisttestnetwork") -export CODEX_BINARY=$(realpath "../nim-codex/build/codex") -export MARKETPLACE_ADDRESS=$(cat marketplace_address.txt) -``` -и затем выполните: - -```bash -${CODEX_BINARY}\ - --data-dir=./codex-client\ - --listen-addrs=/ip4/0.0.0.0/tcp/8081\ - --api-port=8001\ - --disc-port=8091\ - --bootstrap-node=${STORAGE_NODE_SPR}\ - persistence\ - --eth-provider=http://localhost:8545\ -``` - -## 4. Покупка и продажа хранилища на маркетплейсе - -Любые переговоры о хранилище имеют две стороны: покупатель и продавец. -Поэтому, прежде чем мы сможем фактически запросить хранилище, мы должны сначала предложить -его на продажу. - -### 4.1 Продажа хранилища - -Следующий запрос заставит узел хранилища выставить $50\text{MB}$ -хранилища на продажу на $1$ час по цене $1$ токен Codex -за слот в секунду, при этом выражая готовность принять максимум -$1000$ токенов Codex в качестве штрафа за невыполнение своей части контракта.[^1] - -```bash -curl 'http://localhost:8000/api/codex/v1/sales/availability' \ - --header 'Content-Type: application/json' \ - --data '{ - "totalSize": "50000000", - "duration": "3600", - "minPrice": "1", - "maxCollateral": "1000" -}' -``` - -Это должно вернуть JSON-ответ, содержащий `id` (например, `"id": "0xb55b3bc7aac2563d5bf08ce8a177a38b5a40254bfa7ee8f9c52debbb176d44b0"`), -который идентифицирует это предложение хранилища. - -> Чтобы сделать JSON-ответы более читаемыми, вы можете попробовать -> утилиту форматирования JSON [jq](https://jqlang.github.io/jq/) -> просто добавив `| jq` после команды. -> На macOS вы можете установить с помощью `brew install jq`. - -Чтобы проверить текущие предложения хранилища для этого узла, вы можете выполнить: - -```bash -curl 'http://localhost:8000/api/codex/v1/sales/availability' -``` - -или с `jq`: - -```bash -curl 'http://localhost:8000/api/codex/v1/sales/availability' | jq -``` - -Это должно вывести список предложений, с тем, который вы только что создали, среди -них (для нашего руководства, в это время будет возвращено только одно предложение). - -### 4.2. Покупка хранилища - -Прежде чем мы сможем купить хранилище, у нас должны быть некоторые фактические данные для запроса -хранилища. Начните с загрузки небольшого файла на ваш клиентский узел. -В Linux (или macOS) вы могли бы, например, использовать `dd` для генерации файла размером $1M$: - -```bash -dd if=/dev/urandom of=./data.bin bs=1M count=1 -``` - -Предполагая, что ваш файл называется `data.bin`, вы можете загрузить его с помощью: - -```bash -curl --request POST http://localhost:8001/api/codex/v1/data --header 'Content-Type: application/octet-stream' --write-out '\n' -T ./data.bin -``` - -После завершения загрузки вы должны увидеть _Content Identifier_, -или _CID_ (например, `zDvZRwzm2mK7tvDzKScRLapqGdgNTLyyEBvx1TQY37J2CdWdS6Sj`) -для загруженного файла, выведенный в терминал. -Используйте этот CID в запросе на покупку: - -```bash -# убедитесь, что заменили CID перед с CID, который вы получили на предыдущем шаге -export CID=zDvZRwzm2mK7tvDzKScRLapqGdgNTLyyEBvx1TQY37J2CdWdS6Sj -``` - -```bash -curl "http://localhost:8001/api/codex/v1/storage/request/${CID}" \ - --header 'Content-Type: application/octet-stream' \ - --data "{ - \"duration\": \"600\", - \"reward\": \"1\", - \"proofProbability\": \"3\", - \"expiry\": \"500\", - \"nodes\": 3, - \"tolerance\": 1, - \"collateral\": \"1000\" - }" \ - --write-out '\n' -``` - -Параметры под `--data` говорят, что: - -1. мы хотим купить хранилище для нашего файла на $5$ минут (`"duration": "600"`); -2. мы готовы платить до $1$ токена за слот в секунду (`"reward": "1"`) -3. наш файл будет разделен на три части (`"nodes": 3`). - Поскольку мы установили `"tolerance": 1`, нам нужно только две части (`nodes - tolerance`) - для восстановления файла; т.е. мы можем допустить, что максимум один узел - перестанет хранить наши данные; либо из-за сбоя, либо по другим причинам; -4. мы требуем `1000` токенов в качестве залога от поставщиков хранилища для каждой части. - Поскольку есть $3$ такие части, всего будет `3000` залога, - зафиксированного поставщиком(ами) хранилища, как только наш запрос будет начат. -5. наконец, `expiry` устанавливает временной лимит для заполнения всех слотов - поставщиком(ами) хранилища. Если слоты не заполнены к моменту `expire`, - запрос истечет и завершится неудачей. - -### 4.3. Отслеживание ваших запросов на хранилище - -POST-запрос на хранилище сделает его доступным на рынке хранилища, -и узел хранилища в конечном итоге подберет его. - -Вы можете опрашивать статус вашего запроса с помощью: -```bash -export STORAGE_PURCHASE_ID="1d0ec5261e3364f8b9d1cf70324d70af21a9b5dccba380b24eb68b4762249185" -curl "http://localhost:8001/api/codex/v1/storage/purchases/${STORAGE_PURCHASE_ID}" -``` - -Например: - -```bash -> curl 'http://localhost:8001/api/codex/v1/storage/purchases/6c698cd0ad71c41982f83097d6fa75beb582924e08a658357a1cd4d7a2a6766d' -``` - -Это возвращает результат типа: - -```json -{ - "requestId": "0x86501e4677a728c6a8031971d09b921c3baa268af06b9f17f1b745e7dba5d330", - "request": { - "client": "0x9f0c62fe60b22301751d6cde1175526b9280b965", - "ask": { - "slots": 3, - "slotSize": "262144", - "duration": "1000", - "proofProbability": "3", - "reward": "1", - "collateral": "1", - "maxSlotLoss": 1 - }, - "content": { - "cid": "zDvZRwzkyw1E7ABaUSmgtNEDjC7opzhUoHo99Vpvc98cDWeCs47u" - }, - "expiry": "1711992852", - "nonce": "0x9f5e651ecd3bf73c914f8ed0b1088869c64095c0d7bd50a38fc92ebf66ff5915", - "id": "0x6c698cd0ad71c41982f83097d6fa75beb582924e08a658357a1cd4d7a2a6766d" - }, - "state": "submitted", - "error": null -} -``` - -Показывает, что запрос был отправлен, но еще не заполнен. -Ваш запрос будет успешным, как только `"state"` покажет `"started"`. -Все, что отличается от этого, означает, что запрос еще не полностью -обработан, а состояние `"error"` отличное от `null` означает, что он завершился неудачей. - -Ну что, это было довольно долгое путешествие, не так ли? Вы можете поздравить себя с -успешным завершением руководства по маркетплейсу codex! - -[^1]: Файлы Codex разделяются на части, называемые "слотами", и распределяются -по различным поставщикам хранилища. Залог относится к одному такому слоту, -и будет медленно уменьшаться по мере того, как поставщик хранилища не сможет предоставить -своевременные доказательства, но фактическая логика [более сложна, чем это](https://github.com/codex-storage/codex-contracts-eth/blob/6c9f797f408608958714024b9055fcc330e3842f/contracts/Marketplace.sol#L209). diff --git a/ru/learn/local-two-client-test.md b/ru/learn/local-two-client-test.md deleted file mode 100644 index c1b51d7..0000000 --- a/ru/learn/local-two-client-test.md +++ /dev/null @@ -1,227 +0,0 @@ -# Тест с двумя клиентами Codex - -Тест с двумя клиентами - это ручной тест, который вы можете выполнить для проверки вашей настройки и ознакомления с API Codex. Эти шаги проведут вас через запуск и подключение двух узлов, чтобы загрузить файл на один и затем скачать этот файл с другого. Этот тест также включает запуск локального узла блокчейна для обеспечения доступности функциональности Marketplace. Однако запуск локального узла блокчейна не является строго необходимым, и вы можете пропустить шаги, отмеченные как необязательные, если решите не запускать локальный узел блокчейна. - -## Предварительные требования - -Убедитесь, что вы [собрали клиент](/learn/build) или получили [скомпилированный бинарный файл](/learn/quick-start#get-codex-binary). - -## Шаги - -### 0. Настройка узла блокчейна (необязательно) - -Вам необходимо установить NodeJS и npm для запуска локального узла блокчейна. - -Перейдите в директорию `vendor/codex-contracts-eth` и выполните эти две команды: -``` -npm ci -npm start -``` - -Это запустит локальный блокчейн Ganache. - -### 1. Запуск Узла #1 - -Откройте терминал и выполните: -- Mac/Linux: - ```shell - codex \ - --data-dir="$(pwd)/Data1" \ - --api-port=8080 \ - --disc-port=8090 \ - --listen-addrs="/ip4/127.0.0.1/tcp/8070" - ``` -- Windows: - ```batch - codex.exe ^ - --data-dir="Data1" ^ - --api-port=8080 ^ - --disc-port=8090 ^ - --listen-addrs="/ip4/127.0.0.1/tcp/8070" - ``` - -Необязательно, если вы хотите использовать функциональность блокчейна Marketplace, вам также нужно включить эти флаги: `--persistence --eth-account=`, где `account` может быть одним из следующих: - - - `0x70997970C51812dc3A010C7d01b50e0d17dc79C8` - - `0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC` - - `0x90F79bf6EB2c4f870365E785982E1f101E93b906` - - `0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65` - -**Для каждого узла используйте разный аккаунт!** - -| Аргумент | Описание | -|----------------|-----------------------------------------------------------------------| -| `data-dir` | Мы указываем относительный путь, где узел будет хранить свои данные. | -| `listen-addrs` | Multiaddress, где узел будет принимать соединения от других узлов. | -| `api-port` | Порт на localhost, где узел будет предоставлять свой API. | -| `data-dir` | We specify a relative path where the node will store its data. | -| `listen-addrs` | Multiaddress where the node will accept connections from other nodes. | -| `api-port` | Port on localhost where the node will expose its API. | -| `disc-port` | Port the node will use for its discovery service. | -| `persistence` | Enables Marketplace functionality. Requires a blockchain connection. | -| `eth-account` | Defines which blockchain account the node should use. | - -Codex uses sane defaults for most of its arguments. Here we specify some explicitly for the purpose of this walk-through. - -### 2. Sign of life - -Run the command : - -```bash -curl -X GET http://127.0.0.1:8080/api/codex/v1/debug/info -``` - -This GET request will return the node's debug information. The response will be in JSON and should look like: - -```json -{ - "id": "16Uiu2HAmJ3TSfPnrJNedHy2DMsjTqwBiVAQQqPo579DuMgGxmG99", - "addrs": [ - "/ip4/127.0.0.1/tcp/8070" - ], - "repo": "/Users/user/projects/nim-codex/Data1", - "spr": "spr:CiUIAhIhA1AL2J7EWfg7x77iOrR9YYBisY6CDtU2nEhuwDaQyjpkEgIDARo8CicAJQgCEiEDUAvYnsRZ-DvHvuI6tH1hgGKxjoIO1TacSG7ANpDKOmQQ2MWasAYaCwoJBH8AAAGRAh-aKkYwRAIgB2ooPfAyzWEJDe8hD2OXKOBnyTOPakc4GzqKqjM2OGoCICraQLPWf0oSEuvmSroFebVQx-3SDtMqDoIyWhjq1XFF", - "announceAddresses": [ - "/ip4/127.0.0.1/tcp/8070" - ], - "table": { - "localNode": { - "nodeId": "f6e6d48fa7cd171688249a57de0c1aba15e88308c07538c91e1310c9f48c860a", - "peerId": "16Uiu2HAmJ3TSfPnrJNedHy2DMsjTqwBiVAQQqPo579DuMgGxmG99", - "record": "...", - "address": "0.0.0.0:8090", - "seen": false - }, - "nodes": [] - }, - "codex": { - "version": "untagged build", - "revision": "b3e626a5" - } -} -``` - -| Field | Description | -| ------------------- | ---------------------------------------------------------------------------------------- | -| `id` | Id of the node. Also referred to as 'peerId'. | -| `addrs` | Multiaddresses currently open to accept connections from other nodes. | -| `repo` | Path of this node's data folder. | -| `spr` | Signed Peer Record, encoded information about this node and its location in the network. | -| `announceAddresses` | Multiaddresses used for annoucning this node | -| `table` | Table of nodes present in the node's DHT | -| `codex` | Codex version information | - -### 3. Launch Node #2 - -We will need the signed peer record (SPR) from the first node that you got in the previous step. - -Replace `` in the following command with the SPR returned from the previous command, note that it should include the `spr:` at the beginning. - -Open a new terminal and run: -- Mac/Linux: - ```shell - codex \ - --data-dir="$(pwd)/Data2" \ - --api-port=8081 \ - --disc-port=8091 \ - --listen-addrs=/ip4/127.0.0.1/tcp/8071 \ - --bootstrap-node= - ``` -- Windows: - ``` - codex.exe ^ - --data-dir="Data2" ^ - --api-port=8081 ^ - --disc-port=8091 ^ - --listen-addrs=/ip4/127.0.0.1/tcp/8071 ^ - --bootstrap-node= - ``` - -Alternatively on Mac, Linux, or MSYS2 and a recent Codex binary you can run it in one command like: - -```shell -codex \ - --data-dir="$(pwd)/Data2" \ - --api-port=8081 \ - --disc-port=8091 \ - --listen-addrs=/ip4/127.0.0.1/tcp/8071 \ - --bootstrap-node=$(curl -H "Accept: text/plain" http://127.0.0.1:8080/api/codex/v1/spr) -``` - -Notice we're using a new data-dir, and we've increased each port number by one. This is needed so that the new node won't try to open ports already in use by the first node. - -We're now also including the `bootstrap-node` argument. This allows us to link the new node to another one, bootstrapping our own little peer-to-peer network. SPR strings always start with `spr:`. - -### 4. Connect The Two - -Normally the two nodes will automatically connect. If they do not automatically connect or you want to manually connect nodes you can use the peerId to connect nodes. - -You can get the first node's peer id by running the following command and finding the `"peerId"` in the results: - -```shell -curl -X GET \ - -H "Accept: text/plain" \ - http://127.0.0.1:8081/api/codex/v1/peerid -``` - -Next replace `` in the following command with the peerId returned from the previous command: - -```shell -curl -X GET \ - http://127.0.0.1:8080/api/codex/v1/connect/?addrs=/ip4/127.0.0.1/tcp/8071 -``` - -Alternatively on Mac, Linux, or MSYS2 and a recent Codex binary you can run it in one command like: - -```shell -curl -X GET \ - http://127.0.0.1:8080/api/codex/v1/connect/$(curl -X GET -H "Accept: text/plain" http://127.0.0.1:8081/api/codex/v1/peerid)\?addrs=/ip4/127.0.0.1/tcp/8071 -``` - -Notice that we are sending the "`peerId`" and the multiaddress of node 2 to the `/connect` endpoint of node 1. This provides node 1 all the information it needs to communicate with node 2. The response to this request should be `Successfully connected to peer`. - -### 5. Upload The File - -We're now ready to upload a file to the network. In this example we'll use node 1 for uploading and node 2 for downloading. But the reverse also works. - -Next replace `` with the path to the file you want to upload in the following command: - -```shell -curl -X POST \ - 127.0.0.1:8080/api/codex/v1/data \ - -H "Content-Type: application/octet-stream" \ - -H "Expect: 100-continue" \ - -T "" -``` -> [!TIP] -> If curl is reluctant to show you the response, add `-o ` to write the result to a file. - -Depending on the file size this may take a moment. Codex is processing the file by cutting it into blocks and generating erasure-recovery data. When the process is finished, the request will return the content-identifier (CID) of the uploaded file. It should look something like `zdj7WVxH8HHHenKtid8Vkgv5Z5eSUbCxxr8xguTUBMCBD8F2S`. - -### 6. Download The File - -Replace `` with the identifier returned in the previous step. Replace `` with the filename where you want to store the downloaded file: - -```bash -curl -X GET \ - 127.0.0.1:8081/api/codex/v1/data//network \ - -o -``` - -Notice we are connecting to the second node in order to download the file. The CID we provide contains the information needed to locate the file within the network. - -### 7. Verify The Results - -If your file is downloaded and identical to the file you uploaded, then this manual test has passed. Rejoice! If on the other hand that didn't happen or you were unable to complete any of these steps, please leave us a message detailing your troubles. - -## Notes - -When using the Ganache blockchain, there are some deviations from the expected behavior, mainly linked to how blocks are mined, which affects certain functionalities in the Sales module. -Therefore, if you are manually testing processes such as payout collection after a request is finished or proof submissions, you need to mine some blocks manually for it to work correctly. You can do this by using the following curl command: - -```shell -curl -X POST \ - 127.0.0.1:8545 \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"evm_mine","params":[],"id":67}' -``` diff --git a/ru/learn/quick-start.md b/ru/learn/quick-start.md deleted file mode 100644 index 7a9d272..0000000 --- a/ru/learn/quick-start.md +++ /dev/null @@ -1,147 +0,0 @@ -# Быстрый старт - -Чтобы запустить Codex через это руководство, нам нужно выполнить следующие шаги: -- [Ознакомиться с отказом от ответственности](/codex/disclaimer) -- [Получить бинарный файл Codex](#get-codex-binary) -- [Запустить Codex](#run-codex) -- [Взаимодействовать с Codex](#interact-with-codex) - -## Получение бинарного файла Codex - -Для быстрого старта мы будем использовать предварительно скомпилированные бинарные файлы со [страницы релизов GitHub](https://github.com/codex-storage/nim-codex/releases). Если вы предпочитаете компилировать из исходного кода, пожалуйста, проверьте [Сборка Codex](/learn/build). - -Пожалуйста, следуйте шагам для вашей ОС из списка: -- [Linux/macOS](#linux-macos) -- [Windows](#windows) - -### Linux/macOS - -1. Установите последний релиз Codex - ```shell - curl -s https://get.codex.storage/install.sh | bash - ``` - -2. Установите зависимости - ```shell - # Debian-based Linux - sudo apt update && sudo apt install libgomp1 - ``` - -3. Проверьте результат - ```shell - codex --version - ``` - -### Windows - -1. Установите последний релиз Codex - ```batch - curl -sO https://get.codex.storage/install.cmd && install.cmd - ``` - - > [!WARNING] - > Антивирусное программное обеспечение Windows и встроенные брандмауэры могут привести к сбою шагов. Мы рассмотрим некоторые возможные ошибки здесь, но всегда учитывайте проверку вашей настройки, если запросы завершаются неудачей - в частности, если временное отключение вашего антивируса исправляет это, то, вероятно, это является причиной. - - Если вы видите ошибку типа: - - ```batch - curl: (35) schannel: next InitializeSecurityContext failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012) - The revocation function was unable to check revocation for the certificate. - ``` - - Возможно, вам нужно добавить опцию `--ssl-no-revoke` к вашим вызовам curl, т.е. изменить вызовы выше, чтобы они выглядели так: - - ```batch - curl -LO --ssl-no-revoke https://... - ``` - -2. Обновите путь, используя вывод консоли - - Только для текущей сессии - ```batch - :: Путь установки по умолчанию - set "PATH=%PATH%%LOCALAPPDATA%\Codex;" - ``` - - - Обновление PATH постоянно - - Панель управления --> Система --> Дополнительные параметры системы --> Переменные среды - - Или введите `environment variables` в поле поиска Windows - -3. Проверьте результат - ```shell - codex --version - ``` - -## Запуск Codex - -Мы можем [запустить Codex в разных режимах](/learn/run#run), и для быстрого старта мы запустим [узел Codex](/learn/run#codex-node), чтобы иметь возможность обмениваться файлами в сети. - -1. Запустите Codex - - **Linux/macOS** - ```shell - codex \ - --data-dir=datadir \ - --disc-port=8090 \ - --listen-addrs=/ip4/0.0.0.0/tcp/8070 \ - --nat=any \ - --api-cors-origin="*" \ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P - ``` - - **Windows** - - > [!WARNING] - > Windows на этом этапе может запросить разрешение на доступ в интернет для Codex. Вы должны разрешить это для работы. - > Также может потребоваться добавить правила входящего брандмауэра для Codex, и мы можем использовать утилиту `netsh`. - -
- добавить правила брандмауэра с помощью netsh - - ```batch - :: Добавить правила - netsh advfirewall firewall add rule name="Allow Codex (TCP-In)" protocol=TCP dir=in localport=8070 action=allow - netsh advfirewall firewall add rule name="Allow Codex (UDP-In)" protocol=UDP dir=in localport=8090 action=allow - - :: Показать правила - netsh advfirewall firewall show rule name=all | find /I "Codex" - - :: Удалить правила - netsh advfirewall firewall delete rule name="Allow Codex (TCP-In)" - netsh advfirewall firewall delete rule name="Allow Codex (UDP-In)" - ``` -
- - ```batch - :: Запустить Codex - codex ^ - --data-dir=datadir ^ - --disc-port=8090 ^ - --listen-addrs=/ip4/0.0.0.0/tcp/8070 ^ - --nat=any ^ - --api-cors-origin="*" ^ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P - ``` - - > [!TIP] - > В примере выше мы используем [узлы начальной загрузки тестовой сети Codex](/networks/testnet#bootstrap-nodes) и, таким образом, присоединяемся к тестовой сети. Если вы хотите присоединиться к другой сети, пожалуйста, используйте [соответствующее значение](/networks/networks). - -2. Настройте проброс портов TCP/UDP на вашем интернет-маршрутизаторе - | Протокол | Сервис | Порт | - | -------- | ---------- | ------ | - | UDP | Discovery | `8090` | - | TCP | Transport | `8070` | - -Если вы хотите покупать или продавать хранилище, рассмотрите возможность запуска [узла Codex с поддержкой маркетплейса](/learn/run#codex-node-with-marketplace-support) или [узла хранения Codex](/learn/run#codex-storage-node). - -## Взаимодействие с Codex - -Когда ваш узел Codex запущен и работает, вы можете взаимодействовать с ним, используя [Пользовательский интерфейс приложения Codex](https://app.codex.storage) для обмена файлами. - -Также вы можете взаимодействовать с Codex, используя [API Codex](/developers/api), и для ознакомления с API рассмотрите возможность следования руководству [Использование Codex](/learn/using). - -## Оставайтесь на связи - -Хотите быть в курсе или ищете дополнительную помощь? Попробуйте наш [дискорд-сервер](https://discord.gg/codex-storage). - -Готовы исследовать функциональность Codex? Пожалуйста, [Присоединитесь к тестовой сети Codex](/networks/testnet). - -Если вы хотите запустить Codex локально без присоединения к тестовой сети, рассмотрите возможность попробовать [Тест с двумя клиентами Codex](/learn/local-two-client-test) или [Запуск локальной сети Codex с поддержкой маркетплейса](/learn/local-marketplace). diff --git a/ru/learn/run.md b/ru/learn/run.md deleted file mode 100644 index 302470b..0000000 --- a/ru/learn/run.md +++ /dev/null @@ -1,534 +0,0 @@ ---- -outline: [2, 4] ---- -# Запуск Codex - -На данный момент Codex реализован только на [Nim](https://nim-lang.org) и находится в репозитории [nim-codex](https://github.com/codex-storage/nim-codex). - -Это консольное приложение, которое может быть запущено разными способами: - - [Использование бинарного файла](#using-binary) - - [Запуск как сервис в Linux](#run-as-a-service-in-linux) - - [Запуск как сервис в Windows](#run-as-a-service-in-windows) (пока не поддерживается) - - [Использование Docker](#using-docker) - - [Использование Docker Compose](#using-docker-compose) - - [На Kubernetes](#on-kubernetes) - -При запуске необходимо передать [параметры конфигурации](#configuration) приложению, что можно сделать разными способами. - -## Конфигурация - -Настроить узел Codex можно несколькими способами: - 1. [Параметры командной строки](#cli-options) - 2. [Переменные окружения](#environment-variables) - 3. [Файл конфигурации](#configuration-file) - -Приоритет следующий: -[Параметры командной строки](#cli-options) --> [Переменные окружения](#environment-variables) --> [Файл конфигурации](#configuration-file). - -### Общая информация - -#### Единицы измерения - -Для некоторых параметров конфигурации мы можем передавать значения в общепринятых единицах измерения: -```shell ---cache-size=1m/1M/1mb/1MB ---storage-quota=2m/2M/2mb/2MB - ---block-mi=1s/1S/1m/1M/1h/1H/1d/1D/1w/1W ---block-ttl=2s/2S/2m/2M/2h/2H/2d/2D/2w/2W -``` - -#### Логирование - -Codex использует библиотеку логирования [Chronicles](https://github.com/status-im/nim-chronicles), которая обеспечивает большую гибкость в работе с логами. -Chronicles использует концепцию тем, которые группируют записи логов по семантическим группам. - -Используя параметр `log-level`, вы можете установить общий уровень логирования, например `--log-level="trace"`, но что более важно, -вы можете установить уровни логирования для конкретных тем, например `--log-level="info; trace: marketplace,node; error: blockexchange"`, -что устанавливает общий уровень логирования в `info`, а для тем `marketplace` и `node` устанавливает уровень `trace` и так далее. - -### Параметры командной строки - -```shell -codex --help - -Использование: - -codex [ПАРАМЕТРЫ]... команда - -Доступны следующие параметры: - - --config-file Загружает конфигурацию из TOML файла [=none]. - --log-level Устанавливает уровень логирования [=info]. - --metrics Включает сервер метрик [=false]. - --metrics-address Адрес прослушивания сервера метрик [=127.0.0.1]. - --metrics-port HTTP порт прослушивания сервера метрик [=8008]. - -d, --data-dir Директория, где codex будет хранить конфигурацию и данные - [=/root/.cache/codex]. - -i, --listen-addrs Multi-адреса для прослушивания [=/ip4/0.0.0.0/tcp/0]. - -a, --nat Метод обхода NAT для определения публичного адреса. - Варианты: any, none, upnp, pmp, extip: [any] - -u, --disc-port Порт обнаружения (UDP) [=8090]. - --net-privkey Источник сетевого (secp256k1) приватного ключа - путь к файлу или имя [=key]. - -b, --bootstrap-node Указывает один или несколько узлов начальной загрузки для использования при подключении к сети. - --max-peers Максимальное количество пиров для подключения [=160]. - --num-threads Количество рабочих потоков ("0" = использовать столько потоков, сколько доступно ядер CPU). - --agent-string Строка агента узла, используемая как идентификатор в сети [=Codex]. - --api-bindaddr Адрес привязки REST API [=127.0.0.1]. - -p, --api-port Порт REST API [=8080]. - --api-cors-origin Разрешенный источник CORS для REST API при загрузке данных. '*' разрешит все - источники, '' не разрешит ни одного. [=Запретить все кросс-оригинальные запросы - для загрузки данных]. - --repo-kind Бэкенд для основного хранилища репозитория (fs, sqlite, leveldb) [=fs]. - -q, --storage-quota Размер общего квота хранилища, выделенного узлу [=$DefaultQuotaBytes]. - -t, --block-ttl Таймаут блока по умолчанию в секундах - 0 отключает ttl [=$DefaultBlockTtl]. - --block-mi Интервал времени в секундах - определяет частоту цикла обслуживания блоков: как - часто блоки проверяются на истечение срока действия и очищаются - [=$DefaultBlockMaintenanceInterval]. - --block-mn Количество блоков для проверки в каждом цикле обслуживания [=1000]. - -c, --cache-size Размер кэша блоков, 0 отключает кэш - может помочь на медленных жестких дисках - [=0]. - -Доступные подкоманды: - -codex persistence [ПАРАМЕТРЫ]... команда - -Доступны следующие параметры: - - --eth-provider URL JSON-RPC API узла Ethereum [=ws://localhost:8545]. - --eth-account Учетная запись Ethereum, используемая для контрактов хранения. - --eth-private-key Файл, содержащий приватный ключ Ethereum для контрактов хранения. - --marketplace-address Адрес развернутого контракта Marketplace. - --validator Включает валидатор, требует узел Ethereum [=false]. - --validator-max-slots Максимальное количество слотов, которые мониторит валидатор [=1000]. - --reward-recipient Адрес для отправки выплат (например, вознаграждений и возвратов). - --request-cache-size Максимальное количество StorageRequests, хранящихся в памяти. Уменьшает получение данных StorageRequest из контракта. [=128]. - -Доступные подкоманды: - -codex persistence prover [ПАРАМЕТРЫ]... - -Доступны следующие параметры: - - -cd, --circuit-dir Директория, где Codex будет хранить данные схемы доказательств - [=/root/.cache/codex/circuits]. - --circom-r1cs Файл r1cs для схемы хранения - [=/root/.cache/codex/circuits/proof_main.r1cs]. - --circom-wasm Файл wasm для схемы хранения - [=/root/.cache/codex/circuits/proof_main.wasm]. - --circom-zkey Файл zkey для схемы хранения - [=/root/.cache/codex/circuits/proof_main.zkey]. - --circom-no-zkey Игнорировать файл zkey - использовать только для тестирования! [=false]. - --proof-samples Количество образцов для доказательства [=5]. - --max-slot-depth Максимальная глубина дерева слотов [=32]. - --max-dataset-depth Максимальная глубина дерева наборов данных [=8]. - --max-block-depth Максимальная глубина дерева Меркла сетевых блоков [=5]. - --max-cell-elements Максимальное количество элементов в ячейке [=67]. -``` - -### Переменные окружения - -Чтобы установить параметр конфигурации с помощью переменных окружения, сначала найдите нужный [параметр командной строки](#cli-options) -и затем преобразуйте его следующим образом: - - 1. добавьте префикс `CODEX_` - 2. сделайте его заглавными буквами - 3. замените `-` на `_` - -Например, чтобы настроить `--log-level`, используйте `CODEX_LOG_LEVEL` как имя переменной окружения. - -> [!WARNING] -> Некоторые параметры пока не могут быть настроены через переменные окружения [^multivalue-env-var] [^sub-commands]. - -### Файл конфигурации - -Для установки значений конфигурации также можно использовать файл [TOML](https://toml.io/en/). Имена параметров конфигурации и соответствующие значения размещаются в файле, разделенные `=`. Имена параметров конфигурации можно получить из команды [`codex --help`](#cli-options), и они не должны включать префикс `--`. Например, уровень логирования узла (`--log-level`) можно настроить с помощью TOML следующим образом: - -```toml -log-level = "trace" -``` - -Для параметров, таких как `bootstrap-node` и `listen-addrs`, которые принимают несколько значений, мы можем указать данные как массив -```toml -listen-addrs = [ - "/ip4/0.0.0.0/tcp/1234", - "/ip4/0.0.0.0/tcp/5678" -] -``` - -Узел Codex может затем прочитать конфигурацию из этого файла, используя параметр `--config-file` командной строки: -```shell -codex --config-file=/path/to/your/config.toml -``` - -Пожалуйста, проверьте [Запуск как сервис в Linux](#run-as-a-service-in-linux) для полного примера файла конфигурации. - -## Запуск - -В основном, мы можем запустить Codex в трех разных режимах: - - [Узел Codex](#codex-node) - полезен для локального тестирования/разработки и базового обмена файлами. - - [Узел Codex с поддержкой маркетплейса](#codex-node-with-marketplace-support) - вы можете обмениваться файлами и покупать хранилище, это основной режим и должен использоваться конечными пользователями. - - [Узел хранения Codex](#codex-storage-node) - должен использоваться поставщиками хранилища или если вы хотите продавать свое локальное хранилище. - - Мы также кратко рассмотрим [Узел начальной загрузки Codex](#codex-bootstrap-node). - -### Использование бинарного файла - -#### Узел Codex - -Мы можем запустить Codex простым способом: -```shell -codex -``` -> [!WARNING] -> Эта команда может работать некорректно при использовании релизов GitHub [^data-dir]. - -Но, она будет использовать значение `data-dir` по умолчанию, и мы можем передать пользовательское: -```shell -codex --data-dir=datadir -``` - -Это запустит Codex как изолированный экземпляр, и если мы хотим присоединиться к существующей сети, необходимо передать [узел начальной загрузки](#codex-bootstrap-node). Мы можем передать несколько узлов: -```shell -codex \ - --data-dir=datadir \ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P \ - --bootstrap-node=spr:CiUIAhIhAyUvcPkKoGE7-gh84RmKIPHJPdsX5Ugm_IHVJgF-Mmu_EgIDARo8CicAJQgCEiEDJS9w-QqgYTv6CHzhGYog8ck92xflSCb8gdUmAX4ya78QoemesAYaCwoJBES39Q2RAnVOKkYwRAIgLi3rouyaZFS_Uilx8k99ySdQCP1tsmLR21tDb9p8LcgCIG30o5YnEooQ1n6tgm9fCT7s53k6XlxyeSkD_uIO9mb3 -``` - -> [!IMPORTANT] -> Убедитесь, что вы используете правильное значение для [сети](/networks/networks), к которой хотите присоединиться. - -Также, чтобы сделать ваш узел Codex доступным для других участников сети, необходимо указать публичный IP-адрес, который можно использовать для доступа к вашему узлу: -```shell -codex \ - --data-dir=datadir \ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P \ - --nat=any -``` - -> [!TIP] -> Мы можем установить публичный IP с помощью curl и сервиса определения IP, например [ip.codex.storage](https://ip.codex.storage). - -После этого узел будет объявлять себя, используя ваш публичный IP, UDP-порт по умолчанию ([обнаружение](https://docs.libp2p.io/concepts/discovery-routing/overview/)) и динамический TCP-порт ([передача данных](https://docs.libp2p.io/concepts/transports/overview/)), которые можно настроить следующим образом: -```shell -codex \ - --data-dir=datadir \ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P \ - --nat=any \ - --disc-port=8090 \ - --listen-addrs=/ip4/0.0.0.0/tcp/8070 -``` - -Таким образом, узел будет объявлять себя, используя указанный [multi-адрес](https://docs.libp2p.io/concepts/fundamentals/addressing/), и мы можем проверить это через [API](https://api.codex.storage/#tag/Debug/operation/getDebugInfo) вызов: -```shell -curl -s localhost:8080/api/codex/v1/debug/info | jq -r '.announceAddresses' -``` -```json -[ - "/ip4/<ваш публичный IP>/tcp/8070" -] -``` -В основном, для P2P-коммуникации мы должны указать и настроить два порта: -| # | Протокол | Функция | Параметр командной строки | Пример | -| - | -------- | ------------------------------------------------------------------------ | ---------------- | -------------------------------------- | -| 1 | UDP | [Обнаружение](https://docs.libp2p.io/concepts/discovery-routing/overview/) | `--disc-port` | `--disc-port=8090` | -| 2 | TCP | [Транспорт](https://docs.libp2p.io/concepts/transports/overview/) | `--listen-addrs` | `--listen-addrs=/ip4/0.0.0.0/tcp/8070` | - -Также необходимо настроить [проброс портов](#port-forwarding) на вашем интернет-маршрутизаторе, чтобы сделать ваш узел доступным для участников. - -Итак, полностью рабочая базовая конфигурация будет выглядеть следующим образом: -```shell -codex \ - --data-dir=datadir \ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P \ - --nat=any \ - --disc-port=8090 \ - --listen-addrs=/ip4/0.0.0.0/tcp/8070 \ - --api-cors-origin="*" -``` - -After node is up and running and port-forwarding configurations was done, we should be able to [Upload a file](/learn/using#upload-a-file)/[Download a file](/learn/using#download-a-file) in the network using [API](/developers/api). - -You also can use [Codex App UI](https://app.codex.storage) for files upload/download. - -And to be able to purchase a storage, we should run [Codex node with marketplace support](#codex-node-with-marketplace-support). - -#### Узел Codex с поддержкой маркетплейса - -Для запуска узла Codex с поддержкой маркетплейса необходимо добавить несколько дополнительных параметров: - -```shell -codex \ - --data-dir=datadir \ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P \ - --nat=any \ - --disc-port=8090 \ - --listen-addrs=/ip4/0.0.0.0/tcp/8070 \ - --api-cors-origin="*" \ - --eth-provider=ws://localhost:8545 \ - --eth-account=0x45BC5ca0fbdD9F920Edd12B90908448C30F32a37 \ - --eth-private-key=0x06c7ac11d4ee1d0ccb53811b71802fa92d40a5a174afad9f2cb44f93498322c3 \ - --marketplace-address=0x1234567890123456789012345678901234567890 -``` - -> [!NOTE] -> Для работы с маркетплейсом необходимо иметь запущенный узел Ethereum и развернутый контракт Marketplace. - -#### Узел хранения Codex - -Узел хранения Codex - это специальный тип узла, который предоставляет хранилище для других участников сети. Для его запуска необходимо добавить параметр `--validator`: - -```shell -codex \ - --data-dir=datadir \ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P \ - --nat=any \ - --disc-port=8090 \ - --listen-addrs=/ip4/0.0.0.0/tcp/8070 \ - --api-cors-origin="*" \ - --eth-provider=ws://localhost:8545 \ - --eth-account=0x45BC5ca0fbdD9F920Edd12B90908448C30F32a37 \ - --eth-private-key=0x06c7ac11d4ee1d0ccb53811b71802fa92d40a5a174afad9f2cb44f93498322c3 \ - --marketplace-address=0x1234567890123456789012345678901234567890 \ - --validator=true \ - --validator-max-slots=1000 \ - --reward-recipient=0x45BC5ca0fbdD9F920Edd12B90908448C30F32a37 -``` - -> [!NOTE] -> Узел хранения требует больше ресурсов, чем обычный узел, так как он должен хранить и обслуживать данные для других участников сети. - -#### Узел начальной загрузки Codex - -Узел начальной загрузки - это специальный узел, который помогает новым узлам присоединиться к сети. Для его запуска необходимо добавить параметр `--bootstrap`: - -```shell -codex \ - --data-dir=datadir \ - --nat=any \ - --disc-port=8090 \ - --listen-addrs=/ip4/0.0.0.0/tcp/8070 \ - --api-cors-origin="*" \ - --bootstrap=true -``` - -> [!NOTE] -> Узел начальной загрузки должен быть доступен для других участников сети, поэтому важно правильно настроить проброс портов. - -### Запуск как сервис в Linux - -Для запуска Codex как системного сервиса в Linux можно использовать systemd. Создайте файл конфигурации `/etc/systemd/system/codex.service`: - -```ini -[Unit] -Description=Codex Node -After=network.target - -[Service] -Type=simple -User=codex -Group=codex -WorkingDirectory=/home/codex -ExecStart=/usr/local/bin/codex --config-file=/etc/codex/config.toml -Restart=always -RestartSec=10 - -[Install] -WantedBy=multi-user.target -``` - -И файл конфигурации `/etc/codex/config.toml`: - -```toml -data-dir = "/home/codex/.codex" -bootstrap-node = [ - "spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P" -] -nat = "any" -disc-port = 8090 -listen-addrs = ["/ip4/0.0.0.0/tcp/8070"] -api-cors-origin = "*" -eth-provider = "ws://localhost:8545" -eth-account = "0x45BC5ca0fbdD9F920Edd12B90908448C30F32a37" -eth-private-key = "0x06c7ac11d4ee1d0ccb53811b71802fa92d40a5a174afad9f2cb44f93498322c3" -marketplace-address = "0x1234567890123456789012345678901234567890" -validator = true -validator-max-slots = 1000 -reward-recipient = "0x45BC5ca0fbdD9F920Edd12B90908448C30F32a37" -``` - -Затем выполните следующие команды: - -```shell -sudo systemctl daemon-reload -sudo systemctl enable codex -sudo systemctl start codex -``` - -### Запуск как сервис в Windows - -This functionality is not supported yet :construction: - -### Использование Docker - -Для запуска Codex в Docker можно использовать официальный образ: - -```shell -docker run -d \ - --name codex \ - -p 8070:8070 \ - -p 8090:8090/udp \ - -p 8080:8080 \ - -v /path/to/data:/root/.codex \ - codexstorage/codex:latest \ - --data-dir=/root/.codex \ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P \ - --nat=any \ - --disc-port=8090 \ - --listen-addrs=/ip4/0.0.0.0/tcp/8070 \ - --api-cors-origin="*" -``` - -### Использование Docker Compose - -Для более сложных конфигураций можно использовать Docker Compose. Создайте файл `docker-compose.yml`: - -```yaml -version: '3' -services: - codex: - image: codexstorage/codex:latest - container_name: codex - ports: - - "8070:8070" - - "8090:8090/udp" - - "8080:8080" - volumes: - - /path/to/data:/root/.codex - command: > - --data-dir=/root/.codex - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P - --nat=any - --disc-port=8090 - --listen-addrs=/ip4/0.0.0.0/tcp/8070 - --api-cors-origin="*" -``` - -Затем выполните: - -```shell -docker-compose up -d -``` - -### На Kubernetes - -Для запуска Codex в Kubernetes создайте файл `codex-deployment.yaml`: - -```yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: codex -spec: - replicas: 1 - selector: - matchLabels: - app: codex - template: - metadata: - labels: - app: codex - spec: - containers: - - name: codex - image: codexstorage/codex:latest - ports: - - containerPort: 8070 - name: tcp - - containerPort: 8090 - name: udp - protocol: UDP - - containerPort: 8080 - name: api - volumeMounts: - - name: codex-data - mountPath: /root/.codex - command: - - codex - - --data-dir=/root/.codex - - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P - - --nat=any - - --disc-port=8090 - - --listen-addrs=/ip4/0.0.0.0/tcp/8070 - - --api-cors-origin="*" - volumes: - - name: codex-data - persistentVolumeClaim: - claimName: codex-pvc -``` - -И примените его: - -```shell -kubectl apply -f codex-deployment.yaml -``` - -## How-tos - -### NAT Configuration - -Use the `--nat` CLI flag to specify how your codex node should handle NAT traversal. Below are the available options: - -**any**(default): This option will automatically try to detect your public IP by checking the routing table or using UPnP/PMP NAT traversal techniques. If successful, it will use the detected public IP and port for the announce address. - -**upnp**: This option exclusively uses [UPnP](https://en.wikipedia.org/wiki/Universal_Plug_and_Play) to detect the public IP and create a port mapping entry, if your device supports UPnP. - -**pmp**: This option uses only [NAT-PMP](https://en.wikipedia.org/wiki/NAT_Port_Mapping_Protocol) to detect the public IP and create a port mapping entry, if your device supports NAT-PMP. - -**extIP:[Your Public IP]**:Use this option if you want to manually specify an external IP address and port for the announce address. When selecting this option, you'll need to configure **port forwarding** on your router to ensure that incoming traffic is directed to the correct internal IP and port. - -### Port Forwarding - -If you're running on a private network, you'll need to set up port forwarding to ensure seamless communication between the codex node and its peers. It's also recommended to configure appropriate firewall rules for TCP and UDP traffic. -While the specific steps required vary based on your router, they can be summarised as follows: -1. Find your public IP address by either visiting [ip-codex](https://ip.codex.storage/) or running `curl ip.codex.storage` -2. Identify your [private](#determine-your-private-ip) IP address -3. Access your router's settings by entering its IP address (typically [http://192.168.1.1](http://192.168.1.1/)) in your web browser -4. Sign in with administrator credentials and locate the port forwarding settings -5. Set up the discovery port forwarding rule with these settings: - - External Port: 8090 - - Internal Port: 8090 - - Protocol: UDP - - IP Address: Your device's private IP address -6. Set up the libp2p port forwarding rule with these settings: - - External Port: 8070 - - Internal Port: 8070 - - Protocol: TCP - - IP Address: Your device's private IP address - -#### Determine your private IP - -To determine your private IP address, run the appropriate command for your OS: - -**Linux**: -```shell -ip addr show | grep "inet " | grep -v 127.0.0.1 -``` - -**Windows**: -```shell -ipconfig | findstr /i "IPv4 Address" -``` - -**MacOs**: -```shell -ifconfig | grep "inet " | grep -v 127.0.0.1 -``` - -## Known issues - -[^multivalue-env-var]: Environment variables like `CODEX_BOOTSTRAP_NODE` and `CODEX_LISTEN_ADDRS` does not support multiple values. Please check [[Feature request] Support multiple SPR records via environment variable #525](https://github.com/codex-storage/nim-codex/issues/525), for more information. -[^sub-commands]: Sub-commands `persistence` and `persistence prover` can't be set via environment variables. -[^data-dir]: We should set data-dir explicitly when we use GitHub releases - [[BUG] Change codex default datadir from compile-time to run-time #923](https://github.com/codex-storage/nim-codex/issues/923) -[^eth-account]: Please ignore `--eth-account` CLI option - [Drop support for --eth-account #727](https://github.com/codex-storage/nim-codex/issues/727). diff --git a/ru/learn/tokenomics-litepaper.md b/ru/learn/tokenomics-litepaper.md deleted file mode 100644 index 4fed2ec..0000000 --- a/ru/learn/tokenomics-litepaper.md +++ /dev/null @@ -1,276 +0,0 @@ ---- -outline: [1, 3] ---- -# Лайтбук по токеномике Codex - Версия для тестовой сети - -**Codex: Децентрализованный протокол хранения для долговременной информации** - -# Юридические уведомления - -*Информация, содержащаяся в этом документе, предназначена только для информационных целей и не является проспектом, предложением о покупке, приглашением к покупке или рекомендацией для любого токена или ценной бумаги. Ни этот документ, ни какое-либо его содержание не должны рассматриваться как создание каких-либо ожиданий или формирование основы любого контракта, обязательства или обязательства. Никакая информация здесь не должна рассматриваться как содержащая или полагаться на обещание, представление, гарантию или гарантию, будь то явная или подразумеваемая и будь то в отношении прошлого, настоящего или будущего в отношении проектов и вопросов, описанных здесь. Представленная информация является кратким изложением и не претендует на точность, надежность или полноту. Этот документ находится в постоянном юридическом рассмотрении и может быть изменен или дополнен в любое время без предварительного уведомления. Никакая ответственность не будет нести за точность, надежность или полноту информации, содержащейся здесь. Из-за высокой степени риска и неопределенности, описанных выше, никто не должен полагаться на какие-либо вопросы, описанные в этом документе. Любые токены, упомянутые в этом документе, не были зарегистрированы в соответствии с какими-либо законами о ценных бумагах и не могут быть предложены или проданы в любой юрисдикции, где такое предложение или продажа были бы запрещены.* - -*Этот документ может содержать прогнозные заявления, которые основаны только на текущих ожиданиях, оценках, прогнозах, предположениях и проекциях о технологии, отрасли и рынках в целом. Прогнозные заявления, проекты, содержание и любые другие вопросы, описанные в этом документе, подвержены высокой степени риска и неопределенности. Дорожная карта, результаты, описания проектов, технические детали, функциональность и другие функции могут быть изменены на основе, среди прочего, рыночных условий, технических разработок и нормативной среды. Фактическая разработка и результаты, включая порядок и сроки, могут существенно отличаться от тех, которые ожидаются в этих прогнозных заявлениях.* - -*Информация, содержащаяся в этом документе, не является финансовой, юридической, налоговой, инвестиционной, профессиональной или иной консультацией и не должна рассматриваться как таковая.* - -# Обзор - -## Область применения - -Этот документ описывает токеномику Codex с элементами, отражающими развертывание тестовой сети протокола Codex. - -## Что делает Codex - -Codex - это современная децентрализованная платформа хранения, которая предлагает новое решение, повышающее гарантии долговечности данных для хранения огромных объемов данных, устраняя при этом любую зависимость от централизованных учреждений, которые могут привести к единой точке отказа. - -В то время как централизованные системы хранения, такие как Google Cloud, заявляют о одиннадцати девятках долговечности, долговременное хранение файлов в распределенных системах, обеспечивающих устойчивость к цензуре и конфиденциальность, является жизненно важным предварительным условием для использования, такого как сохранение фактических записей истории в сетевых состояниях. - -Хотя ни одна система не может гарантировать абсолютную защиту от потери данных, благодаря своей технической архитектуре, экономическим стимулам и алгоритмическому кодированию, Codex разработан для обеспечения высоко децентрализованного хранения данных с высокой долговечностью, устойчивостью к сбоям облака и устойчивостью к цензуре. - -## Как работает Codex - -Codex работает как сеть узлов хранения, называемых здесь **Поставщиками Хранения** (SP), которые хранят пользовательские данные в течение срока контракта, заключенного между SP и пользователями хранения, называемыми здесь просто **Клиентами**. - -Контракты на хранение инициируются **Клиентом**, запрашивающим хранение определенного объема данных на определенный срок и по определенной цене за весь контракт. **Поставщики Хранения** берут на себя обязательства по слотам для хранения избыточных фрагментов этих данных. - -Тот факт, что **SP** должны размещать залог (стейкать) для заполнения слота, помогает защититься от атак Сибил, способствуя разнообразию узлов хранения, выполняющих каждый контракт. Кроме того, этот залог действует как экономический стимул для обеспечения того, чтобы **SP** выполняли свои обязательства по периодическому доказательству того, что они все еще владеют рассматриваемыми данными. - -Это достигается путем периодических вызовов **SP** для предоставления криптографических доказательств, демонстрирующих, что данные, которые они обязались хранить, могут быть извлечены. Codex включает Zero Knowledge (ZK) и Data Availability Sampling (DAS) для достижения недорогого, высокоэффективного и надежного обнаружения потери данных. - -**SP** должны отвечать на эти вызовы, отправляя свои доказательства **Валидаторам**, которые проверяют действительность доказательств и публикуют в блокчейне только отсутствие доказательства. Это снижает затраты на проверку доказательств, не влияя на безопасность **Протокола**. - -Если SP не докажут фиксированное количество раз, что они все еще владеют рассматриваемыми данными, или отправят недействительное доказательство, их залог частично сокращается. Штраф за сокращение - это фиксированный процент от общего залога. Это сокращение продолжается до тех пор, пока не будет достигнуто определенное количество сокращений, после чего весь залог сокращается. В этот момент слот SP считается "оставленным". Сокращенный залог используется как стимул для нового **SP** взять на себя неудачный слот через "механизм восстановления слота" (обсуждается далее). Это гарантирует, что залог обеспечивает экономический стимул для обеспечения долговечности данных. - -Таким образом, Codex разработан таким образом, что рациональное поведение для **SP** состоит в хранении данных наиболее эффективным с точки зрения пространства способом для минимизации избыточных затрат на хранение, при этом балансируя необходимость достаточной избыточности для восстановления от возможности потери/повреждения данных штрафом за конфискацию их залога (сокращение). - -Хотя технология Codex максимизирует восстанавливаемость и долговечность в случае частичной потери данных, экономические стимулы Codex координируют рациональных участников для обеспечения стабильной и предсказуемой среды для пользователей хранения данных. В основе этих экономических стимулов лежит утилитарный токен Codex (CDX), который служит залогом для защиты долговечности файлов и облегчения восстановления слотов, а также средством платежа для координации успешных контрактов на хранение. - -# Жизненный цикл контракта - -Рынок координирует сопоставление **Клиентов**, которые хотят платить за хранение файлов, с **Поставщиками Хранения**, которые предлагают пространство для хранения и размещают залог для получения платежей по контракту. - -## Инициация запроса контракта - -Как принцип проектирования, **Клиенты** должны публиковать условия сделки, которые они ищут, а Поставщики Хранения определяют приоритеты, какие сделки соответствуют их критериям и представляют лучшие сделки для принятия. - -Когда создается запрос на контракт, **Клиент** вносит полную цену за длительность контракта на тот момент. Этот депозит действует как механизм предотвращения спама и гарантирует, что время и ресурсы **SP** не тратятся на заполнение слотов для сделок, за которые **Клиент** не завершает оплату. - -## Поставщики Хранения заполняют запросы - -Перед сопоставлением с контрактами на хранение **Поставщики Хранения** указывают свою совокупную доступность для новых контрактов. - -На основе доступности каждого **SP** создается очередь для каждого **SP**, ранжирующая открытые запросы **Клиента** на контрактные сделки с наиболее благоприятными сделками наверху. Со временем эта очередь разрешается путем сопоставления **SP** с контрактами, совместимыми с их доступностью, начиная с сделок с самым высоким рейтингом. - -При запуске **SP** не смогут настраивать алгоритм создания очереди, что означает, что **SP** с одинаковой доступностью будут иметь идентичные очереди (за исключением различий из-за функции случайности, которая увеличивает разнообразие **SP** для каждого контракта). В будущем ожидается, что **SP** смогут настраивать свой алгоритм ранжирования очереди. - -Если **SP** сопоставляется с контрактом на хранение и они имеют право зарезервировать слот в контракте, они резервируют открытый слот, загружают данные слота от **Клиента** или существующих **SP**, чьи данные могут быть использованы для восстановления содержимого слота, создают начальное доказательство хранения и отправляют это доказательство вместе с залогом в **Протокол**. - -Обратите внимание, что слот не считается подтвержденным как заполненный до тех пор, пока **SP** не разместит связанный залог и не создаст доказательство для слота. - -## Контракт истекает до начала - -Если все еще есть пустые слоты, когда истекает таймаут/срок действия запроса на контракт, сделка прекращается. - -**Поставщики Хранения**, которые заполнили слоты, если таковые имеются, получают компенсацию за время, в течение которого они хранили данные слота, по указанной в запросе на контракт цене за ТБ в месяц. Остаток депозита **Клиента** возвращается. - -Поскольку существует высокая вероятность наличия хотя бы нескольких занятых слотов, не должно быть необходимости в дополнительных штрафах для **Клиента** для предотвращения спам-запросов и стимулирования **Клиентов** к подаче привлекательных сделок. - -## Контракт начинается - -Контракт начинается, если *все* слоты заняты, то есть **SP** загрузили данные, разместили залог и опубликовали доказательства до достижения таймаута/срока действия запроса на контракт. - -В этот момент применяется *комиссия протокола* к депозиту пользователя. Поступления сжигаются. - -Остаток депозита клиента удерживается протоколом и будет использоваться для оплаты **SP** в конце контракта. - -## Контракт выполняется - -**Поставщики Хранения** должны отправлять доказательства **Валидаторам** в соответствии с частотой доказательств запроса на хранение, параметром, установленным Клиентом в запросе. - -### Отсутствующие доказательства - -Если **SP** не отправляет доказательства в течение последних периодов, они частично сокращаются. Штраф - это фиксированный процент от залога. После предоставления доказательства после частичного сокращения SP должен пополнить недостающий залог. - -Если SP будет сокращен достаточное количество раз, весь их залог будет сокращен и конфискован, и SP считается оставившим свой слот. Предоставление правильного доказательства в этот момент не отменит начало механизма восстановления слота. - -## Слот в контракте оставлен - -Когда **SP** не отправляет достаточное количество доказательств, так что они сокращаются достаточное количество раз, их слот считается оставленным. Для стимулирования нового **SP** прийти и взять на себя оставленный слот (восстановление слота), 50% залога, конфискованного у **SP**, который оставил слот, используется как стимул для нового **SP**. Оставшийся конфискованный залог сжигается. - -Это помогает согласовать экономический стимул для **SP** взять на себя оставленные слоты перед заполнением новых сделок, поскольку они могут эффективно заработать конфискованный залог за взятие на себя и выполнение оставленных слотов. - -## Контракт не выполняется - -Если в любой момент в течение срока действия контракта на хранение количество слотов, находящихся в оставленном состоянии (еще не восстановленных), достигает или превышает максимальное количество слотов хранения, которые могут быть потеряны до того, как данные станут невосстановимыми, то вся сделка хранения считается находящейся в состоянии *сбоя*. - -Каждый залог, размещенный **Поставщиками Хранения**, сжигается. Это стимулирует **SP** не допускать, чтобы сделки хранения подвергались риску невыполнения обязательств. **SP** стимулируются *проактивно* избегать этого путем диверсификации своей инфраструктуры и контрактов на хранение, в которые они вступают, и *реактивно* путем резервного копирования своих собственных данных слота или даже резервного копирования данных из других слотов, чтобы они могли лучше помочь восстановлению слота, когда сделка приближается к состоянию сбоя. - -Клиенты также получают обратно любой остаток от их первоначального платежа. - -## Контракт завершает свой полный срок - -Когда начатый контракт достигает своего предварительно указанного срока без предварительного невыполнения обязательств, контракт завершается. - -Весь залог возвращается **SP**, которые в настоящее время заполняют слоты (обратите внимание, что из-за восстановления слота это не обязательно те же **SP**, которые заполняли слоты при начале контракта), и весь оставшийся платеж возвращается клиенту. - -Сделки не могут быть автоматически продлены или продлены. Если **Клиент** желает продолжить сделку, он должен создать новый запрос на контракт хранения. В противном случае Клиенты могут получить свои данные. - -# Токеномика CDX в тестовой сети - -Токен CDX не существует в фазе тестовой сети. Описание ниже относится к механике тестового токена, а не к самому CDX, и для этой цели будет называться *CDX (тестовый токен)*. - -Для избежания сомнений, *CDX (тестовый токен)* являются виртуальными предметами без какой-либо ценности и не конвертируются в какую-либо другую валюту, токен или любую другую форму собственности. Они предназначены исключительно для использования в целях включения токеномики и облегчения различных ролей в этой фазе тестовой сети. - -## Роли - -Протокол Codex имеет две основные роли, выполняемые участниками сети. - -- **Клиенты**: платят Поставщикам Хранения в *CDX (тестовый токен)* за безопасное хранение своих данных в сети Codex на согласованный срок. -- **Поставщики Хранения**: размещают залог в *CDX (тестовый токен)* для вступления в контракты на хранение с Клиентами в обмен на платеж, номинированный в *CDX (тестовый токен)*. -- **Валидаторы**: размещают залог в *CDX (тестовый токен)* для проверки доказательств хранения в обмен на платеж, номинированный в *CDX (тестовый токен)*. - -## Утилита токена - -*CDX (тестовый токен)* используется как форма размещенного залога и средство платежа для защиты сети и доступа к ее услугам. - -Залог в основном используется как механизм предотвращения спама и атак Сибил, страхование ответственности (например, компенсация Клиентам в случае катастрофической потери данных) и для обеспечения рационального поведения. - -Платежи производятся Клиентами Поставщикам за оказанные услуги, такие как хранение данных в течение определенного времени или извлечение данных. Это реализуется через контракт Marketplace, который служит эскроу. Данные в контракте хранения распределяются по слотам, где каждый, в идеале, размещается на разных Поставщиках Хранения. - -### **Для Клиентов** - -- Оплата затрат на хранение и комиссий в *CDX (тестовый токен)* за хранение файлов. - -### **Для Поставщиков Хранения** - -- Размещение залога в *CDX (тестовый токен)* при принятии обязательств по новым контрактам хранения. Этот залог сокращается, если они не выполняют свои согласованные услуги. -- Заработок *CDX (тестовый токен)* от залога сокращенных Поставщиков Хранения путем участия в механизме восстановления слота. -- Заработок *CDX (тестовый токен)* от Клиентов при успешном завершении услуги хранения. - -### Для Валидаторов - -- Размещение залога в *CDX (тестовый токен)* для работы службы валидации. Этот залог сокращается, если они не отмечают доказательство как отсутствующее в течение предопределенного периода. -- Заработок *CDX (тестовый токен)* от залога сокращенных Поставщиков Хранения путем отметки доказательств как пропущенных - -На рисунке ниже показан поток *CDX (тестовый токен)* в системе. - -![Поток *CDX токена в системе](/learn/tokenomics-token-flow.png) - -## Механизмы захвата и накопления стоимости - -Codex создает *ценность* для участников: - -- Клиенты могут получить выгоду от хранения данных с сильными гарантиями долговечности; -- Поставщики Хранения могут получать доход от своих свободных ресурсов или капитала, предоставляя услугу. -- Валидаторы получают выплаты за отметку доказательств как отсутствующих. - -Клиентам нужны токены *CDX (тестовый токен)* для запроса сделок хранения. *CDX (тестовый токен)* захватывает ценность, созданную для Клиентов, будучи для них *Токеном Передачи Ценности*. - -Поставщики Хранения и Валидаторы вознаграждаются токеном *CDX (тестовый токен)* и также нуждаются в нем как в доказательстве приверженности Протоколу. Они рискуют быть сокращенными в обмен на вознаграждения. *CDX (тестовый токен)* захватывает ценность, созданную для Поставщиков, будучи для них *Токеном Работы*. - -Следующие механизмы описывают, как ценность накапливается в токене *CDX (тестовый токен)*. - -### Комиссия протокола за контракты - -Если контракт отменяется до его начала, с депонированной суммы Клиента взимается небольшой штраф и возвращается, что помогает предотвратить запросы сделок низкого качества спама. - -Если контракт успешно инициируется, протокол взимает комиссию за облегчение транзакции. Оставшаяся сумма становится доступной для платежей Поставщикам Хранения. - -Собранные комиссии сжигаются в обоих случаях. Это создает небольшую, но постоянную дефляционную силу на предложение токена, которая пропорциональна спросу на продукт. - -## Поведение и мотивации - -### Клиенты - -Клиенты имеют следующее рациональное поведение: - -- Запрос хранения от сети с комиссией по справедливым рыночным ставкам -- Предоставление данных узлам хранения, которые соответствуют их критериям - -Они также могут демонстрировать следующее враждебное поведение, будь то по мотивам прибыли, злонамеренности или цензуры: - -- Запрос хранения от сети, но никогда не предоставление данных доступными для любых или всех слотов -- Запрос хранения от сети, но не предоставление данных в течение требуемого периода времени для успешного начала контракта -- Запрос хранения от сети, но не предоставление данных конкретным Поставщикам -- Атака на SP, которые размещают их данные, чтобы попытаться освободить свои платежные обязательства в конце контракта. - -### **Поставщики Хранения** - -Поставщики Хранения имеют следующее рациональное поведение: - -- Принятие обязательств по слотам контрактов хранения для получения комиссии. -- Предоставление доказательств хранения для их обязательных слотов для избежания штрафов за сокращение залога. -- Предоставление данных любому, кто их запрашивает. -- Принятие обязательств по неудачным слотам контрактов хранения для поддержания целостности данных - -Они также могут демонстрировать следующее враждебное поведение, будь то по мотивам прибыли, злонамеренности или цензуры: - -- Резервирование слота контракта, но никогда его заполнение (попытка предотвратить начало контракта) -- Прекращение предоставления доказательств в середине срока действия контракта -- Создание доказательств, но не предоставление данных доступными для других узлов для извлечения - -### Валидаторы - -Валидаторы имеют следующее рациональное поведение: - -- Отметка доказательства как отсутствующего для получения комиссии -- Отслеживание истории пропущенных доказательств **SP** -- Запуск механизма восстановления слота, когда **SP** достигает максимально допустимого количества пропущенных доказательств - -Они также могут демонстрировать следующее враждебное поведение, будь то по мотивам прибыли, злонамеренности или цензуры: - -- Сговор с SP для игнорирования пропущенных доказательств -- Наблюдение пропущенного доказательства, но не публикация его в блокчейне - -## Механизмы стимулирования - -Следующие механизмы помогают стимулировать ожидаемое поведение каждой роли и смягчать вредные. - -### Клиенты предоставляют полную оплату заранее - -Клиенты должны внести полную сумму в *CDX (тестовый токен)*, которая покрывает весь срок действия контракта хранения заранее. Это указывает на их обязательство заплатить определенную сумму за контракт хранения, хотя контракт начинается только тогда и если все слоты данных заполнены Поставщиками Хранения. - -### Отложенный платеж Поставщикам Хранения - -Поставщики Хранения получают платеж, связанный с предоставлением услуг, только в конце срока действия контракта. - -### Требование залога - -Для заполнения слота данных Поставщики Хранения сначала размещают и обязуются предоставить требуемый залог в форме *CDX (тестовый токен)* для этого слота, который затем подлежит сокращению, если они не публикуют доказательство для подтверждения слота. - -Валидаторы также должны размещать залог для участия в службе валидации. - -### Доказательство хранения - -Контракты начинаются только тогда, когда все слоты данных заполнены. Слоты считаются заполненными только после того, как Поставщик Хранения разместил залог и связанное с ним доказательство для своего слота. - -После начала контракта Поставщики Хранения регулярно предоставляют доказательство хранения. - -### **Сокращение за пропущенные доказательства хранения** - -В любой момент в течение срока действия контракта на хранение поставщик хранения сокращается, если он не предоставляет определенное количество доказательств хранения подряд. Если SP возобновляет предоставление доказательств хранения, он должен пополнить сокращенный залог. Штраф представляет собой фиксированный процент от общего залога. - -### Механизм восстановления слота - -Если поставщик хранения не отправляет требуемые доказательства хранения, когда это необходимо, после определенного количества сокращений весь его залог будет конфискован. Часть конфискованного залога используется как стимул для нового поставщика хранения, который восстанавливает и начинает обслуживать оставленный слот. Оставшаяся часть конфискованного залога в *CDX (тестовый токен)* сжигается. - -### Сокращение невыполненного контракта - -Если в любой момент в течение срока действия контракта на хранение количество оставленных (и еще не восстановленных) слотов данных достигает или превышает максимально допустимое количество потерянных слотов (что означает, что данные становятся невосстанавливаемыми), то весь контракт на хранение считается *невыполненным*. - -На этом этапе залоги всех поставщиков хранения, обслуживающих слоты данных в контракте, полностью сокращаются. - -### Возмещение клиентам - -Если в любой момент в течение контракта достаточное количество слотов оставлено, так что данные не могут быть полностью восстановлены, клиенты получают обратно любой остаток от их первоначального платежа. - -## Жизненный цикл токена - -### Сжигание - -*CDX (тестовый токен)* сжигаются в следующих случаях: - -- Когда контракт на хранение не может быть инициирован, небольшая часть платежа клиента за сделку хранения сжигается. Это служит в первую очередь механизмом для предотвращения спама и обеспечения того, чтобы запросы сделок подавались по рыночным ценам для хранения. -- Когда контракт на хранение успешно инициируется, протокол взимает комиссию за облегчение транзакции. -- Когда поставщик хранения пропускает определенное количество доказательств хранения, часть залога сокращается и сжигается. -- После разрешения механизма восстановления слота оставшаяся часть залога оставившего поставщика хранения сжигается. diff --git a/ru/learn/troubleshoot.md b/ru/learn/troubleshoot.md deleted file mode 100644 index 5841f4c..0000000 --- a/ru/learn/troubleshoot.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -outline: [2, 3] ---- -# Устранение неполадок - -Проблемы с подключением вашего узла Codex к тестовой сети? Вот список распространенных проблем подключения Codex и шаги для их диагностики и решения. Если ваши проблемы не рассматриваются здесь, проверьте наши открытые проблемы на Github или свяжитесь с нами через наш Discord-сервер. - -## Основы - -Вы, вероятно, уже рассмотрели это. Но на всякий случай: - -1. Используете ли вы VPN? Убедитесь, что он правильно настроен для переадресации нужных портов, и убедитесь, что вы объявляете свой узел по публичному IP-адресу, по которому к вам можно обратиться. -1. Используете ли вы брандмауэр или другое программное обеспечение безопасности? Убедитесь, что он настроен на разрешение входящих подключений к портам обнаружения и одноранговой сети Codex. - -## Проверьте ваш объявляемый адрес - -Ваш узел объявляет ваш публичный адрес в сети, чтобы другие узлы могли подключиться к вам. Распространенной проблемой является сбой подключения из-за неправильных объявляемых адресов. Следуйте этим шагам, чтобы проверить ваш объявляемый адрес. - -1. Перейдите на сайт whats-my-ip или `ip.codex.storage` и запишите IP-адрес. -1. Перейдите в настройки WAN вашего маршрутизатора/модема и найдите публичный IP-адрес. -1. Эти два адреса должны совпадать. -1. Если они не совпадают, возможно, что A) вы находитесь за VPN. В этом случае вам нужно отключить VPN или убедиться, что вся переадресация настроена правильно. или B) Ваш интернет-провайдер поместил ваше восходящее соединение за вторичным NAT. Интернет-провайдеры делают это для экономии публичных IP-адресов. Адрес, назначенный вашему маршрутизатору/модему, не является "истинным" публичным интернет-адресом. Обычно эту проблему может решить ваш интернет-провайдер. Свяжитесь со службой поддержки и попросите их предоставить вам публичный адрес (иногда также называемый динамическим IP-адресом). -1. Вызовите конечную точку отладки/информации Codex. Смотрите [Использование Codex](/learn/using) для подробностей. -1. В JSON-ответе вы найдете "announceAddresses". -1. IP-адрес, указанный там, должен соответствовать вашему публичному IP. -1. Если объявляемый адрес в JSON неверен, вы можете настроить его вручную, изменив аргумент командной строки Codex `--nat` или установив переменную окружения `CODEX_NAT`. После того, как вы изменили свой объявляемый адрес и перезапустили узел, пожалуйста, дайте некоторое время (20-30 минут) для распространения обновленного адреса в сети. - -Если вы выполнили эти шаги и не нашли никаких проблем, ваш объявляемый адрес, вероятно, не является проблемой. - - diff --git a/ru/learn/using.md b/ru/learn/using.md deleted file mode 100644 index 3078dd8..0000000 --- a/ru/learn/using.md +++ /dev/null @@ -1,275 +0,0 @@ ---- -outline: [2, 3] ---- -# Использование Codex - -Мы можем взаимодействовать с Codex, используя [REST API](/developers/api). В этом документе показаны несколько полезных примеров. - -Также мы можем использовать [Пользовательский интерфейс приложения Codex](https://app.codex.storage). - -Интерпретатор командной строки работает немного по-разному на [Linux/macOS](#linux-macos) и [Windows](#windows), поэтому используйте инструкции для вашей ОС. - -## Linux/macOS - -### Обзор -1. [Отладка](#debug) -2. [Загрузка файла](#upload-a-file) -3. [Скачивание файла](#download-a-file) -4. [Локальные данные](#local-data) -5. [Создание доступности хранилища](#create-storage-availability) -6. [Покупка хранилища](#purchase-storage) -7. [Просмотр статуса покупки](#view-purchase-status) - -### Отладка -Простой способ проверить, что ваш узел запущен и работает: - -```shell -curl http://localhost:8080/api/codex/v1/debug/info \ - -w '\n' -``` - -Это вернет JSON-структуру с множеством информации о вашем локальном узле. Она содержит информацию о пирах, которая может быть полезна при устранении проблем с подключением. - -### Загрузка файла -> [!Warning] -> После загрузки файла в Codex другие узлы в сети могут его скачать. Пожалуйста, не загружайте ничего, что вы не хотите, чтобы другие видели, или правильно зашифруйте ваши данные *перед загрузкой*. - -```shell -curl -X POST \ - http://localhost:8080/api/codex/v1/data \ - -H 'Content-Type: application/octet-stream' \ - -w '\n' \ - -T -``` - -При успешной загрузке вы получите CID. Его можно использовать для скачивания файла с любого узла в сети. - -> [!TIP] -> Вы на [сервере Discord Codex](https://discord.gg/codex-storage)? Опубликуйте ваш CID в канале [# :wireless: | share-cids](https://discord.com/channels/895609329053474826/1278383098102284369), посмотрите, смогут ли другие его скачать. Codex пока не предоставляет метаданные файлов, поэтому если вы хотите, чтобы другие могли открыть ваш файл, скажите им, какое расширение ему дать. - -### Скачивание файла -Когда у вас есть CID данных, которые вы хотите скачать, вы можете использовать следующие команды: - -```shell -# вставьте ваш CID из предыдущего шага между кавычками -CID="..." -``` - -```shell -curl "http://localhost:8080/api/codex/v1/data/${CID}/network/stream" \ - -o "${CID}.png" -``` - -Пожалуйста, используйте правильное расширение для скачанного файла, потому что Codex пока не хранит информацию о типе содержимого или расширении. - -### Локальные данные -Вы можете просмотреть, какие наборы данных в настоящее время хранятся вашим узлом: - -```shell -curl http://localhost:8080/api/codex/v1/data \ - -w '\n' -``` - -### Создание доступности хранилища -> [!WARNING] -> Этот шаг требует, чтобы Codex был запущен с опцией [`prover`](/learn/run#codex-storage-node). - -Чтобы начать продавать пространство для хранения в сети, вы должны настроить ваш узел с помощью следующей команды. После настройки узел будет отслеживать запросы на хранение в блокчейне и автоматически вступать в контракты, соответствующие этим спецификациям. Для вступления и поддержания контрактов на хранение ваш узел должен предоставлять доказательства хранения с нулевым разглашением. Расчет этих доказательств увеличит использование CPU и RAM Codex. - -```shell -curl -X POST \ - http://localhost:8080/api/codex/v1/sales/availability \ - -H 'Content-Type: application/json' \ - -w '\n' \ - -d '{ - "totalSize": "8000000", - "duration": "7200", - "minPricePerBytePerSecond": "1000", - "totalCollateral": "80000000" - }' -``` - -Для описания каждого параметра, пожалуйста, просмотрите [спецификацию](https://api.codex.storage/#tag/Marketplace/operation/offerStorage). - -### Покупка хранилища -Чтобы купить пространство для хранения в сети, сначала вы должны загрузить ваши данные. После получения CID используйте следующее для создания запроса на хранение. - -Установите ваш CID: - -```shell -# вставьте ваш CID из предыдущего шага между кавычками -CID="..." -echo "CID: ${CID}" -``` - -Затем вы можете выполнить: - -```shell -curl -X POST \ - "http://localhost:8080/api/codex/v1/storage/request/${CID}" \ - -w '\n' \ - -d '{ - "duration": "3600", - "pricePerBytePerSecond": "2000", - "proofProbability": "5", - "expiry": "1200", - "nodes": 5, - "tolerance": 2, - "collateralPerByte": "1" - }' -``` - -Для описания каждого параметра, пожалуйста, просмотрите [спецификацию](https://api.codex.storage/#tag/Marketplace/operation/createStorageRequest). - -При успешном выполнении этот запрос вернет Purchase-ID. - -### Просмотр статуса покупки -Используя Purchase-ID, вы можете проверить статус вашего контракта на хранение: - -```shell -# вставьте ваш PURCHASE_ID из предыдущего шага между кавычками -PURCHASE_ID="..." -``` - -Затем: - -```shell -curl "http://localhost:8080/api/codex/v1/storage/purchases/${PURCHASE_ID}" \ - -w '\n' -``` - -Это отобразит информацию о состоянии и ошибках для вашей покупки. -| Состояние | Описание | -|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Pending | Запрос ожидает подтверждения в блокчейне. | -| Submitted | Запрос находится в блокчейне. Хосты теперь могут попытаться скачать данные. | -| Started | Хосты скачали данные и предоставили доказательство хранения. | -| Failed | Запрос был начат, но (слишком много) хостов не смогли предоставить доказательство хранения вовремя. Хотя данные все еще могут быть доступны в сети, для целей покупки они считаются утерянными. | -| Finished | Запрос был успешно начат, и срок действия истек. | -| Expired | (Недостаточно) хостов предоставили доказательство хранения до истечения срока действия запроса. | -| Errored | Неудачное состояние. Поле 'error' должно рассказать больше. | - -## Windows - -### Обзор {#overview-windows} -1. [Отладка](#debug-windows) -2. [Загрузка файла](#upload-a-file-windows) -3. [Скачивание файла](#download-a-file-windows) -4. [Локальные данные](#local-data-windows) -5. [Создание доступности хранилища](#create-storage-availability-windows) -6. [Покупка хранилища](#purchase-storage-windows) -7. [Просмотр статуса покупки](#view-purchase-status-windows) - -### Отладка {#debug-windows} -Простой способ проверить, что ваш узел запущен и работает: - -```batch -curl http://localhost:8080/api/codex/v1/debug/info -``` - -Это вернет JSON-структуру с множеством информации о вашем локальном узле. Она содержит информацию о пирах, которая может быть полезна при устранении проблем с подключением. - -### Загрузка файла {#upload-a-file-windows} -> [!Warning] -> После загрузки файла в Codex другие узлы в сети могут его скачать. Пожалуйста, не загружайте ничего, что вы не хотите, чтобы другие видели, или правильно зашифруйте ваши данные *перед загрузкой*. - -```batch -curl -X POST ^ - http://localhost:8080/api/codex/v1/data ^ - -H "Content-Type: application/octet-stream" ^ - -T -``` - -При успешной загрузке вы получите CID. Его можно использовать для скачивания файла с любого узла в сети. - -> [!TIP] -> Вы на [сервере Discord Codex](https://discord.gg/codex-storage)? Опубликуйте ваш CID в канале [# :wireless: | share-cids](https://discord.com/channels/895609329053474826/1278383098102284369), посмотрите, смогут ли другие его скачать. Codex пока не предоставляет метаданные файлов, поэтому если вы хотите, чтобы другие могли открыть ваш файл, скажите им, какое расширение ему дать. - -### Скачивание файла {#download-a-file-windows} -Когда у вас есть CID данных, которые вы хотите скачать, вы можете использовать следующие команды: - -```batch -:: вставьте ваш CID из предыдущего шага между кавычками -set CID="..." -``` - -```batch -curl "http://localhost:8080/api/codex/v1/data/%CID%/network/stream" ^ - -o "%CID%.png" -``` - -Пожалуйста, используйте правильное расширение для скачанного файла, потому что Codex пока не хранит информацию о типе содержимого или расширении. - -### Локальные данные {#local-data-windows} -Вы можете просмотреть, какие наборы данных в настоящее время хранятся вашим узлом: - -```batch -curl http://localhost:8080/api/codex/v1/data -``` - -### Создание доступности хранилища {#create-storage-availability-windows} -> [!WARNING] -> Этот шаг требует, чтобы Codex был запущен с опцией [`prover`](/learn/run#codex-storage-node). - -Чтобы начать продавать пространство для хранения в сети, вы должны настроить ваш узел с помощью следующей команды. После настройки узел будет отслеживать запросы на хранение в блокчейне и автоматически вступать в контракты, соответствующие этим спецификациям. Для вступления и поддержания контрактов на хранение ваш узел должен предоставлять доказательства хранения с нулевым разглашением. Расчет этих доказательств увеличит использование CPU и RAM Codex. - -```batch -curl -X POST ^ - http://localhost:8080/api/codex/v1/sales/availability ^ - -H "Content-Type: application/json" ^ - -d "{""totalSize"": ""8000000"", ""duration"": ""7200"", ""minPricePerBytePerSecond"": ""1000"", ""totalCollateral"": ""80000000""}" -``` - -Для описания каждого параметра, пожалуйста, просмотрите [спецификацию](https://api.codex.storage/#tag/Marketplace/operation/offerStorage). - -### Покупка хранилища {#purchase-storage-windows} -Чтобы купить пространство для хранения в сети, сначала вы должны загрузить ваши данные. После получения CID используйте следующее для создания запроса на хранение. - -Установите ваш CID: - -```batch -:: вставьте ваш CID из предыдущего шага между кавычками -set CID="..." -echo CID: %CID% -``` - -Затем вы можете выполнить: - -```batch -curl -X POST ^ - "http://localhost:8080/api/codex/v1/storage/request/%CID%" ^ - -H "Content-Type: application/json" ^ - -d "{""duration"": ""3600"",""pricePerBytePerSecond"": ""2000"", ""proofProbability"": ""5"", ""expiry"": ""1200"", ""nodes"": 5, ""tolerance"": 2, ""**collateralPerByte**"": ""1""}" -``` - -Для описания каждого параметра, пожалуйста, просмотрите [спецификацию](https://api.codex.storage/#tag/Marketplace/operation/createStorageRequest). - -При успешном выполнении этот запрос вернет Purchase-ID. - -### Просмотр статуса покупки {#view-purchase-status-windows} -Используя Purchase-ID, вы можете проверить статус вашего контракта на хранение: - -```batch -:: вставьте ваш PURCHASE_ID из предыдущего шага между кавычками -set PURCHASE_ID="..." -``` - -Затем: - -```batch -curl "http://localhost:8080/api/codex/v1/storage/purchases/%PURCHASE_ID%" -``` - -Это отобразит информацию о состоянии и ошибках для вашей покупки. -| Состояние | Описание | -|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Pending | Запрос ожидает подтверждения в блокчейне. | -| Submitted | Запрос находится в блокчейне. Хосты теперь могут попытаться скачать данные. | -| Started | Хосты скачали данные и предоставили доказательство хранения. | -| Failed | Запрос был начат, но (слишком много) хостов не смогли предоставить доказательство хранения вовремя. Хотя данные все еще могут быть доступны в сети, для целей покупки они считаются утерянными. | -| Finished | Запрос был успешно начат, и срок действия истек. | -| Expired | (Недостаточно) хостов предоставили доказательство хранения до истечения срока действия запроса. | -| Errored | Неудачное состояние. Поле 'error' должно рассказать больше. | - -## Known issues -1. We add a new line to the API calls to get more readable output, please check [[rest] Add line ending on responses #771](https://github.com/codex-storage/nim-codex/issues/771) for more details. diff --git a/ru/learn/what-is-codex.md b/ru/learn/what-is-codex.md deleted file mode 100644 index f45c8f0..0000000 --- a/ru/learn/what-is-codex.md +++ /dev/null @@ -1,39 +0,0 @@ -# Что такое Codex? - -Codex - это децентрализованный протокол хранения данных. Его основные особенности - сильная устойчивость к цензуре и гарантии долговечности. Он имеет эталонную реализацию с тем же названием, написанную на nim. Он служит слоем хранения в стеке технологий [Logos](https://logos.co/). Наряду с уровнем бездоверительных соглашений [Nomos](http://nomos.tech) и уровнем коммуникаций [Waku](http://waku.org), он является одним из фундаментальных проектов Logos Collective. - -
- -

- -### Мотивация - -Ландшафт удаленного хранения данных доминируется все меньшим числом интернет-гигантов - Google, Microsoft, Amazon и т.д. Хотя эти сервисы получают высокие оценки с точки зрения пользовательского опыта и удобства, централизованное облачное хранение данных страдает от следующих недостатков: - -- Цензура - -- Отсутствие владения данными - -- Утечки и простои - -- Высокая стоимость - -Централизованные провайдеры облачного хранения имеют устоявшуюся историю цензурирования данных и, как де-факто владельцы этих данных, имеют право делать это согласно своим собственным стандартам. Более того, централизованные платформы неоднократно становились жертвами крупных утечек данных и простоев сервисов. - -Такие инциденты создали пробел на рынке для децентрализованной, устойчивой к цензуре альтернативы. Существующие одноранговые сети хранения и обмена файлами решают некоторые из этих проблем - такие как устойчивость к сбоям сети и желаемая устойчивость к цензуре. Однако без адекватных стимулов и сильных гарантий долговечности данных они не подходят в качестве основы для создания действительно неостановимых приложений. - -Существующие децентрализованные решения для хранения данных претендуют на улучшение ранних P2P-платформ обмена файлами, таких как eDonkey и Gnutella. Однако рынку все еще не хватает децентрализованного решения для хранения, которое было бы эффективным с точки зрения использования хранилища и пропускной способности, при этом предлагая гарантии производительности и долговечности, сопоставимые с существующими решениями. - -
- -### Децентрализация хранения данных - -Codex был создан в 2021 году для удовлетворения потребности в долговечном, децентрализованном уровне хранения для стека технологий web3. - -Название "Codex" отсылает к древней форме книги - намек на чрезвычайно надежные - 99,99% - гарантии долговечности механизма хранения данных. - -Codex был объявлен как основной протокол Logos Collective в июне 2023 года. - -### Тестовая сеть - -Codex в настоящее время находится в фазе тестовой сети. Клиентская реализация является свободным и открытым программным обеспечением. Если вы заинтересованы, мы призываем вас попробовать Codex, подключиться к тестовой сети и поэкспериментировать с его функциями. [Начните здесь](./quick-start.md) diff --git a/ru/learn/whitepaper.md b/ru/learn/whitepaper.md deleted file mode 100644 index 8b5958b..0000000 --- a/ru/learn/whitepaper.md +++ /dev/null @@ -1,236 +0,0 @@ -
- -**Аннотация** -
- -
-
-Интернет становится все более централизованным. По мере того как компании и частные лица все больше полагаются на централизованных облачных провайдеров для хранения данных, возрастает озабоченность по поводу конфиденциальности, цензуры и контроля пользователей, а также концентрации экономической власти в руках небольшого числа субъектов. - -Хотя было несколько попыток предоставить альтернативы, современные децентрализованные сети хранения данных (DSN) часто не соответствуют базовым аспектам, таким как наличие надежных гарантий долговечности, эффективность работы или возможность масштабируемых доказательств хранения. Это, в свою очередь, приводит к решениям, которые либо: _i)_ бесполезны, так как могут потерять данные; _ii)_ не дружелюбны к децентрализации, так как требуют специализированного или дорогого оборудования, либо; _iii)_ экономически нецелесообразны, так как обременяют провайдеров слишком большими затратами помимо затрат на само оборудование для хранения. - -В этой статье мы представляем Codex, новую децентрализованную сеть хранения данных с кодированием стирания, которая пытается решить эти проблемы. Codex использует кодирование стирания как часть механизмов избыточности и доказательств хранения, сочетая его с доказательствами с нулевым разглашением и ленивым восстановлением для достижения настраиваемых гарантий долговечности при скромных требованиях к оборудованию и энергии. Центральным элементом Codex является концепция Движка Децентрализованной Долговечности (DDE), формализованная нами структура для систематического решения вопросов избыточности данных, удаленного аудита, восстановления, стимулов и распределения данных в децентрализованных системах хранения. - -Мы описываем архитектуру и механизмы Codex, включая его маркетплейс и системы доказательств, и предоставляем предварительный анализ надежности с использованием модели Непрерывной Временной Цепи Маркова (CTMC) для оценки гарантий долговечности. Codex представляет собой шаг к созданию децентрализованного, устойчивого и экономически жизнеспособного уровня хранения, критически важного для более широкой децентрализованной экосистемы. -
-
- -## 1. Введение -Производство данных растет ошеломляющими темпами, что имеет значительные последствия. Данные являются критическим активом для бизнеса, стимулируя принятие решений, стратегическое планирование и инновации. Люди все больше переплетают свою физическую жизнь с цифровым миром, тщательно документируя каждый аспект своей жизни, делая фотографии и видео, делясь своими взглядами и перспективами на текущие события, используя цифровые средства для общения и художественного самовыражения и т.д. Цифровые личности стали такими же важными, как и их физические аналоги, и эта тенденция только усиливается. - -Однако текущая тенденция к централизации в интернете привела к ситуации, когда пользователи имеют мало или вообще не имеют контроля над своими личными данными и тем, как они используются. Крупные корпорации собирают, анализируют и монетизируют пользовательские данные, часто без согласия или прозрачности. Этот недостаток конфиденциальности оставляет людей уязвимыми для целевой рекламы, профилирования, слежки и потенциального неправомерного использования их личной информации. - -Более того, концентрация данных и власти в руках нескольких централизованных субъектов создает значительный риск цензуры: платформы могут в одностороннем порядке решить удалить, изменить или подавить контент, который они считают нежелательным, эффективно ограничивая свободу выражения мнений пользователей и доступ к информации. Этот дисбаланс власти подрывает открытую и демократическую природу интернета, создавая эхо-камеры и ограничивая свободный обмен идеями. - -Еще одним нежелательным аспектом централизации является экономический: по мере того как доминирование крупных технологических компаний в этой сфере превращается в олигополию, все доходы попадают в руки избранных немногих, в то время как барьер для входа становится все выше и выше. - -Для решения этих проблем существует растущая потребность в децентрализованных технологиях. Децентрализованные технологии позволяют пользователям: _i)_ владеть и контролировать свои данные, предоставляя безопасные и прозрачные механизмы для хранения и обмена данными, и _ii)_ участвовать в экономике хранения в качестве провайдеров, позволяя частным лицам и организациям получать свою долю доходов. Пользователи могут выборочно делиться своими данными с доверенными сторонами, сохранять возможность отзывать доступ при необходимости и монетизировать свои данные и свое оборудование, если они того пожелают. Этот сдвиг парадигмы в сторону пользовательского контроля над данными и инфраструктурой имеет потенциал для создания более справедливой и прозрачной цифровой экосистемы. - -Несмотря на их потенциальные преимущества, однако, отсутствие эффективного и надежного децентрализованного хранения оставляет ключевой пробел, который необходимо устранить, прежде чем можно будет серьезно рассматривать любую концепцию децентрализованного технологического стека. - -В ответ на эти вызовы мы представляем Codex: новую децентрализованную сеть хранения данных с кодированием стирания, которая использует кодирование стирания для избыточности и эффективных доказательств хранения. Этот метод обеспечивает беспрецедентную надежность и позволяет хранить большие наборы данных, превышающие размер любого отдельного узла в сети, в долговечной и безопасной форме. Наши компактные и эффективные доказательства хранения могут обнаруживать и предотвращать катастрофическую потерю данных с высокой точностью, при этом требуя относительно скромных требований к оборудованию и электроэнергии - два предварительных условия для достижения истинной децентрализации. Кроме того, мы вводим и формализуем в этой статье понятие долговечности в децентрализованных сетях хранения через новую концепцию, которую мы называем _Движком Децентрализованной Долговечности_ (DDE). - -Остальная часть статьи организована следующим образом. Сначала мы обсуждаем контекст, на котором построен Codex (Раздел 2), расширяя проблемы централизованного облачного хранения и предоставляя информацию о предыдущих подходах к децентрализованным альтернативам - а именно, p2p-сетям, блокчейнам и DSN. Затем мы представляем концептуальную структуру, лежащую в основе Codex в Разделе 3 - Движок Децентрализованной Долговечности (DDE) - за которым следует более подробное описание механизмов Codex и того, как он материализуется как DDE в Разделе 4. Раздел 5 затем представляет предварительный анализ надежности, который помещает параметры хранения Codex рядом с более формальными гарантиями долговечности. Наконец, Раздел 6 предоставляет выводы и текущую работу. - -## 2. Предыстория и контекст -В этом разделе мы обсуждаем контекст, на котором построен Codex. Мы начинаем с обсуждения проблем централизованного облачного хранения, а затем переходим к обзору предыдущих подходов к децентрализованным альтернативам - а именно, p2p-сетям, блокчейнам и DSN. - -### 2.1 Проблемы централизованного облачного хранения -Централизованное облачное хранение стало доминирующей моделью для хранения данных в интернете. Крупные технологические компании, такие как Amazon, Google и Microsoft, предоставляют услуги облачного хранения, которые позволяют пользователям хранить и получать доступ к своим данным из любого места. Хотя эти услуги удобны и надежны, они также создают несколько проблем: - -1. **Конфиденциальность**: Централизованные провайдеры облачного хранения имеют доступ к данным пользователей и могут использовать их для таргетированной рекламы, профилирования и других целей. Это создает значительные риски для конфиденциальности пользователей. - -2. **Цензура**: Централизованные провайдеры могут в одностороннем порядке решить удалить или изменить контент, который они считают нежелательным. Это может привести к цензуре и ограничению свободы выражения мнений. - -3. **Экономическая концентрация**: Доминирование нескольких крупных технологических компаний в сфере облачного хранения создает олигополию, где все доходы попадают в руки избранных немногих. Это создает высокий барьер для входа и ограничивает конкуренцию. - -4. **Уязвимость к атакам**: Централизованные системы хранения являются привлекательными целями для хакеров и других злоумышленников. Одна успешная атака может привести к компрометации большого количества данных. - -### 2.2 Предыдущие подходы к децентрализованному хранению -Было несколько попыток предоставить альтернативы централизованному облачному хранению. Вот некоторые из основных подходов: - -1. **P2P-сети**: P2P-сети, такие как BitTorrent, позволяют пользователям обмениваться файлами напрямую, без необходимости в центральном сервере. Хотя это обеспечивает некоторую децентрализацию, P2P-сети часто не предоставляют надежных гарантий долговечности и могут быть уязвимы к атакам сибил. - -2. **Блокчейны**: Блокчейны, такие как Ethereum, предоставляют децентрализованную платформу для хранения данных. Однако, из-за высокой стоимости хранения данных в блокчейне, этот подход не подходит для хранения больших объемов данных. - -3. **Децентрализованные сети хранения (DSN)**: DSN, такие как IPFS и Filecoin, пытаются предоставить децентрализованное решение для хранения данных. Однако, многие из этих систем либо не предоставляют надежных гарантий долговечности, либо требуют специализированного оборудования, либо экономически нецелесообразны. - -Codex пытается решить эти проблемы, предоставляя децентрализованную сеть хранения данных с кодированием стирания, которая сочетает в себе надежность, эффективность и экономическую целесообразность. - -## 3. Движки Децентрализованной Долговечности (DDE) -В этом разделе мы представляем концепцию Движка Децентрализованной Долговечности (DDE) - структуру, которую мы разработали для систематического решения вопросов долговечности в децентрализованных системах хранения. DDE представляет собой набор механизмов, которые работают вместе для обеспечения надежного хранения данных в децентрализованной среде. - -### 3.1 Определение DDE -Движок Децентрализованной Долговечности (DDE) - это система, которая обеспечивает надежное хранение данных в децентрализованной сети. DDE состоит из следующих ключевых компонентов: - -1. **Механизмы избыточности**: DDE использует кодирование стирания для создания избыточности данных. Это позволяет системе восстанавливать данные даже при потере некоторых фрагментов. - -2. **Механизмы удаленного аудита**: DDE включает в себя протоколы для проверки того, что провайдеры хранения действительно хранят данные, которые они обещали хранить. Это достигается с помощью доказательств с нулевым разглашением. - -3. **Механизмы восстановления**: DDE включает в себя протоколы для восстановления данных в случае их потери. Это может включать в себя ленивое восстановление, где восстановление происходит только при необходимости. - -4. **Механизмы стимулов**: DDE использует криптоэкономические механизмы для стимулирования провайдеров хранения к правильному поведению. Это включает в себя награды за правильное хранение данных и штрафы за неправильное поведение. - -5. **Механизмы распределения данных**: DDE включает в себя стратегии для распределения данных по сети, чтобы минимизировать риск потери данных и максимизировать доступность. - -### 3.2 Преимущества DDE -DDE предлагает несколько преимуществ по сравнению с традиционными подходами к децентрализованному хранению: - -1. **Настраиваемые гарантии долговечности**: DDE позволяет настраивать уровень избыточности и другие параметры для достижения желаемых гарантий долговечности. - -2. **Эффективность**: DDE использует эффективные алгоритмы для кодирования стирания и доказательств хранения, что позволяет минимизировать требования к оборудованию и энергии. - -3. **Экономическая целесообразность**: DDE использует криптоэкономические механизмы для создания устойчивой экономики хранения, где провайдеры могут получать доход от предоставления услуг хранения. - -4. **Масштабируемость**: DDE может масштабироваться для хранения больших объемов данных, превышающих размер любого отдельного узла в сети. - -### 3.3 Реализация DDE в Codex -Codex реализует DDE через следующие механизмы: - -1. **Кодирование стирания**: Codex использует кодирование стирания для создания избыточности данных. Это позволяет системе восстанавливать данные даже при потере некоторых фрагментов. - -2. **Доказательства хранения**: Codex использует доказательства с нулевым разглашением для проверки того, что провайдеры хранения действительно хранят данные. - -3. **Ленивое восстановление**: Codex использует ленивое восстановление для минимизации накладных расходов на восстановление данных. - -4. **Маркетплейс**: Codex включает в себя маркетплейс для сопоставления провайдеров хранения с клиентами и управления экономикой хранения. - -5. **Распределение данных**: Codex использует стратегии для распределения данных по сети, чтобы минимизировать риск потери данных и максимизировать доступность. - -## 4. Codex: Движок Децентрализованной Долговечности -В этом разделе мы описываем, как Codex реализует концепцию DDE, представленную в предыдущем разделе. Мы начинаем с обзора архитектуры Codex, а затем переходим к более подробному описанию его механизмов. - -### 4.1 Архитектура Codex -Codex состоит из следующих основных компонентов: - -1. **Узлы хранения**: Узлы хранения отвечают за хранение данных и предоставление доказательств хранения. Они участвуют в маркетплейсе, предлагая свои услуги хранения клиентам. - -2. **Клиентские узлы**: Клиентские узлы взаимодействуют с узлами хранения для загрузки и скачивания данных. Они также участвуют в маркетплейсе, запрашивая услуги хранения. - -3. **Маркетплейс**: Маркетплейс - это смарт-контракт, который сопоставляет провайдеров хранения с клиентами и управляет экономикой хранения. - -4. **Сеть P2P**: Сеть P2P обеспечивает связь между узлами и обмен данными. - -### 4.2 Механизмы Codex -Codex реализует следующие механизмы для обеспечения надежного хранения данных: - -1. **Кодирование стирания**: Codex использует кодирование стирания для создания избыточности данных. Это позволяет системе восстанавливать данные даже при потере некоторых фрагментов. - -2. **Доказательства хранения**: Codex использует доказательства с нулевым разглашением для проверки того, что провайдеры хранения действительно хранят данные. Это включает в себя: - - **Доказательства извлекаемости**: Доказательства того, что данные могут быть извлечены из хранилища. - - **Доказательства хранения**: Доказательства того, что данные действительно хранятся в хранилище. - -3. **Ленивое восстановление**: Codex использует ленивое восстановление для минимизации накладных расходов на восстановление данных. Восстановление происходит только при необходимости, когда данные находятся под угрозой потери. - -4. **Маркетплейс**: Маркетплейс Codex включает в себя следующие компоненты: - - **Запросы на хранение**: Клиенты могут создавать запросы на хранение, указывая параметры, такие как размер данных, продолжительность хранения и награда. - - **Предложения хранения**: Провайдеры хранения могут создавать предложения, указывая параметры, такие как доступное пространство, цена и условия. - - **Сопоставление**: Маркетплейс сопоставляет запросы с предложениями на основе параметров и условий. - - **Управление**: Маркетплейс управляет жизненным циклом запросов и предложений, включая создание, выполнение и завершение. - -5. **Распределение данных**: Codex использует стратегии для распределения данных по сети, чтобы минимизировать риск потери данных и максимизировать доступность. Это включает в себя: - - **Распределение фрагментов**: Фрагменты данных распределяются по узлам хранения для минимизации корреляции отказов. - - **Балансировка нагрузки**: Нагрузка распределяется по узлам хранения для предотвращения перегрузки. - -### 4.3 Гарантии долговечности -Codex предоставляет следующие гарантии долговечности: - -1. **Настраиваемые гарантии**: Пользователи могут настраивать параметры хранения, такие как уровень избыточности и продолжительность хранения, для достижения желаемых гарантий долговечности. - -2. **Формальные гарантии**: Codex предоставляет формальные гарантии долговечности через анализ надежности, который учитывает параметры системы и вероятность отказов. - -3. **Экономические гарантии**: Codex использует криптоэкономические механизмы для обеспечения того, что провайдеры хранения имеют стимулы для правильного поведения и поддержания данных. - -## 5. Анализ надежности -В этом разделе мы представляем предварительный анализ надежности Codex, используя модель Непрерывной Временной Цепи Маркова (CTMC) для оценки гарантий долговечности. Мы начинаем с описания модели, а затем переходим к результатам анализа. - -### 5.1 Модель надежности -Мы моделируем надежность Codex с помощью CTMC, где состояния представляют собой различные конфигурации системы, а переходы между состояниями представляют собой события, такие как отказы узлов и восстановление данных. Модель учитывает следующие параметры: - -1. **Параметры узлов**: - - $\lambda$: Интенсивность отказов узлов (количество отказов в единицу времени). - - $\mu$: Интенсивность восстановления узлов (количество восстановлений в единицу времени). - -2. **Параметры данных**: - - $k$: Количество исходных фрагментов данных. - - $n$: Общее количество фрагментов после кодирования стирания. - - $m$: Минимальное количество фрагментов, необходимых для восстановления данных. - -3. **Параметры сети**: - - $N$: Общее количество узлов в сети. - - $S$: Количество узлов хранения. - -### 5.2 Результаты анализа -Наш анализ показывает, что Codex может обеспечить высокие гарантии долговечности при разумных параметрах системы. Вот некоторые из ключевых результатов: - -1. **Вероятность потери данных**: Вероятность потери данных уменьшается с увеличением уровня избыточности ($n/k$) и количества узлов хранения ($S$). - -2. **Время до потери данных**: Среднее время до потери данных увеличивается с увеличением уровня избыточности и количества узлов хранения. - -3. **Влияние параметров**: На надежность системы влияют следующие параметры: - - **Уровень избыточности**: Более высокий уровень избыточности приводит к более высокой надежности. - - **Количество узлов хранения**: Большее количество узлов хранения приводит к более высокой надежности. - - **Интенсивность отказов**: Более низкая интенсивность отказов приводит к более высокой надежности. - - **Интенсивность восстановления**: Более высокая интенсивность восстановления приводит к более высокой надежности. - -### 5.3 Практические последствия -Наш анализ имеет следующие практические последствия для проектирования и эксплуатации систем на основе Codex: - -1. **Выбор параметров**: Пользователи могут выбирать параметры системы, такие как уровень избыточности и количество узлов хранения, для достижения желаемых гарантий долговечности. - -2. **Мониторинг и обслуживание**: Системы на основе Codex должны регулярно контролироваться и обслуживаться для поддержания надежности. - -3. **Масштабирование**: Системы на основе Codex могут масштабироваться для хранения больших объемов данных при сохранении высоких гарантий долговечности. - -## 6. Выводы и будущая работа -В этой статье мы представили Codex, новую децентрализованную сеть хранения данных с кодированием стирания, которая пытается решить проблемы централизованного облачного хранения. Мы ввели концепцию Движка Децентрализованной Долговечности (DDE) как структуру для систематического решения вопросов долговечности в децентрализованных системах хранения. - -### 6.1 Основные выводы -Наши основные выводы включают: - -1. **DDE как структура**: DDE предоставляет полезную структуру для проектирования и анализа децентрализованных систем хранения, систематически решая вопросы избыточности, удаленного аудита, восстановления, стимулов и распределения данных. - -2. **Эффективность Codex**: Codex демонстрирует, что можно достичь высоких гарантий долговечности при разумных требованиях к оборудованию и энергии, используя кодирование стирания, доказательства с нулевым разглашением и ленивое восстановление. - -3. **Экономическая целесообразность**: Codex показывает, что можно создать устойчивую экономику хранения, где провайдеры могут получать доход от предоставления услуг хранения, а клиенты могут получать надежные услуги хранения по конкурентоспособным ценам. - -### 6.2 Будущая работа -Наша будущая работа будет сосредоточена на следующих направлениях: - -1. **Формальная верификация**: Мы планируем разработать формальную верификацию механизмов Codex, включая доказательства хранения и протоколы восстановления. - -2. **Оптимизация производительности**: Мы планируем исследовать способы оптимизации производительности Codex, включая улучшение алгоритмов кодирования стирания и доказательств хранения. - -3. **Расширение функциональности**: Мы планируем расширить функциональность Codex, включая поддержку дополнительных типов данных и приложений. - -4. **Интеграция с другими системами**: Мы планируем исследовать способы интеграции Codex с другими децентрализованными системами, такими как блокчейны и p2p-сети. - -### 6.3 Заключение -Codex представляет собой шаг к созданию децентрализованного, устойчивого и экономически жизнеспособного уровня хранения, критически важного для более широкой децентрализованной экосистемы. Мы надеемся, что наша работа вдохновит дальнейшие исследования и разработки в области децентрализованного хранения данных. - -## Ссылки -[^zippia_cloud_report]: Zippia. "Cloud Computing Statistics 2023". Доступно по адресу: https://www.zippia.com/advice/cloud-computing-statistics/ - -[^s3_reinvent_19]: Amazon Web Services. "AWS re:Invent 2019: Amazon S3: A Deep Dive into Durability and Availability". Доступно по адресу: https://www.youtube.com/watch?v=H0g9Qw0vH9c - -[^liu_19]: Liu, J., et al. "Understanding the Impact of Government Censorship on the Internet". ACM SIGCOMM Computer Communication Review, 2019. - -[^multicloud]: Flexera. "State of the Cloud Report 2023". Доступно по адресу: https://www.flexera.com/about-us/press-center/flexera-releases-2023-state-of-the-cloud-report.html - -[^feng_14]: Feng, X., et al. "Market Power and Pricing in Cloud Computing". Journal of Cloud Computing, 2014. - -[^cohen_01]: Cohen, B. "Incentives Build Robustness in BitTorrent". Workshop on Economics of Peer-to-Peer Systems, 2003. - -[^ipfs_website]: Protocol Labs. "IPFS - The InterPlanetary File System". Доступно по адресу: https://ipfs.io/ - -[^nakamoto_08]: Nakamoto, S. "Bitcoin: A Peer-to-Peer Electronic Cash System". 2008. - -[^buterin_13]: Buterin, V. "Ethereum: A Next-Generation Smart Contract and Decentralized Application Platform". 2013. - -[^kostamis_24]: Kostamis, D., et al. "On the Cost of Storing Data on Ethereum". IEEE Blockchain Technical Briefs, 2024. - -[^chaudhry_24]: Chaudhry, N., et al. "Cryptoeconomic Security: A Survey". IEEE Access, 2024. - -[^protocol_17]: Protocol Labs. "Filecoin: A Decentralized Storage Network". 2017. - -[^bassam_18]: Bassam, S., et al. "On the Impossibility of Proving Availability in Decentralized Storage Networks". IEEE Security & Privacy, 2018. diff --git a/ru/networks/networks.md b/ru/networks/networks.md deleted file mode 100644 index b6bb9e1..0000000 --- a/ru/networks/networks.md +++ /dev/null @@ -1,19 +0,0 @@ -# Сети Codex - -В Codex мы запускаем несколько сетей, которые используются для разных целей -| Сеть | Статус | Блокчейн | Назначение | -| ----------------- | ----------------------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| Devnet | :building_construction: | [Geth PoA](https://geth.ethereum.org/docs/fundamentals/private-network) | Предназначена для целей разработки и следует последним сборкам `master` | -| [Testnet](testnet) | :white_check_mark: | [Geth PoA](https://geth.ethereum.org/docs/fundamentals/private-network) | Публичная сеть для тестирования, следует последним релизам | -| Mainnet | :construction: | :construction: | Основная публичная сеть | - -Основные различия между сетями следующие: -- Назначение сети -- Bootstrap-узлы -- Количество узлов хранения -- Доступный объем хранения -- Сеть блокчейна -- Версия контракта маркетплейса -- Набор файлов схем для верификации доказательств - -Самый простой способ начать использовать Codex - это [Присоединиться к Testnet](testnet). diff --git a/ru/networks/testnet.md b/ru/networks/testnet.md deleted file mode 100644 index 398a34f..0000000 --- a/ru/networks/testnet.md +++ /dev/null @@ -1,203 +0,0 @@ ---- -outline: [2, 4] ---- -# Codex Testnet - -Codex Testnet запущен и готов к использованию для тестирования. - -Ваше участие в Codex Testnet регулируется [Условиями использования Codex Testnet](https://github.com/codex-storage/codex-testnet-starter/blob/master/Codex%20Testnet%20Terms%20and%20Conditions.pdf) и [Политикой конфиденциальности Codex Testnet](https://github.com/codex-storage/codex-testnet-starter/blob/master/Codex%20Testnet%20Privacy%20Policy.pdf). - -**Руководства.** У нас есть базовые руководства по настройке Storage Client, который можно использовать для загрузки и хранения файлов путем покупки хранилища в сети Codex. Мы рекомендуем начать с них. - -Запуск Storage Provider требует больше усилий и рассматривается в отдельном руководстве, которое демонстрирует сторону продажи хранилища, а также как запустить Codex с собственным локальным клиентом выполнения Ethereum. - -Руководства доступны либо в Discord в виде пошаговых интерактивных руководств, либо здесь в виде простых инструкций, которым вы можете следовать: - -- **Базовое: запуск storage client.** [[Discord](#sc-guide-discord) | [web](#sc-guide-web)] -- **Продвинутое: Запуск storage provider.** [[web](#sp-guide-web)] - -Руководства были протестированы на следующих операционных системах: - - - Linux: Ubuntu 24.04, Debian 12, Fedora 40 - - macOS: 15 - - Windows: 11, Server 2022 - -## Запуск Storage Client (версия Discord) {#sc-guide-discord} - -Вы можете присоединиться к [серверу Codex Discord](https://discord.gg/codex-storage) и перейти в канал [#:tv:|join-testnet](https://discord.com/channels/895609329053474826/1289923125928001702). - -Это в основном то же самое, что и [Веб-руководство](#sc-guide-web), но использует возможности Discord, чтобы вы могли иметь интерактивное пошаговое руководство, а также получить поддержку в канале [#:sos:|node-help](https://discord.com/channels/895609329053474826/1286205545837105224). - -## Запуск Storage Client (Веб-версия) {#sc-guide-web} - -**Предварительные требования** - - - Доступ к вашему интернет-маршрутизатору для [настройки проброса портов](#basic-common) - -Шаги для [Linux/macOS](#basic-linux-macos) и [Windows](#basic-windows) немного отличаются, поэтому используйте те, которые подходят для вашей ОС. - -
- -### Linux/macOS {#basic-linux-macos} - -1. Скачайте мастер-архив из репозитория Codex testnet starter и распакуйте его содержимое: - ```shell - curl -LO https://github.com/codex-storage/codex-testnet-starter/archive/master.tar.gz - tar xzvf master.tar.gz - rm master.tar.gz - ``` - -2. Перейдите в папку со скриптами: - ```shell - cd codex-testnet-starter-master/scripts - ``` - -3. Установите зависимости при необходимости: - ```shell - # Debian-based Linux - sudo apt update && sudo apt install libgomp1 - ``` - -4. Скачайте бинарные файлы Codex из релизов GitHub: - ```shell - ./download_online.sh - ``` - -5. Сгенерируйте пару ключей ethereum: - ```shell - ./generate.sh - ``` - Ваш приватный ключ будет сохранен в файле `eth.key`, а адрес - в файле `eth.address`. - -6. Пополните ваш адрес, показанный на экране, токенами: - - Используйте веб-краны для получения [ETH](https://faucet-eth.testnet.codex.storage) и [TST](https://faucet-tst.testnet.codex.storage) токенов. - - Мы также можем сделать это с помощью канала Discord [# bot](https://discord.com/channels/895609329053474826/1230785221553819669) - - Используйте команду `/set ethaddress` для ввода вашего сгенерированного адреса - - Используйте команду `/mint` для получения ETH и TST токенов - - Используйте команду `/balance` для проверки успешного получения тестовых токенов - -7. Запустите узел Codex: - ```shell - ./run_client.sh - ``` - -8. Настройте [проброс портов](#basic-common), и мы готовы к работе. - -### Windows {#basic-windows} - -1. Скачайте мастер-архив из репозитория Codex testnet starter и распакуйте его содержимое: - > [!WARNING] - > Антивирусное ПО Windows и встроенные брандмауэры могут вызвать сбой шагов. Мы рассмотрим некоторые возможные ошибки здесь, но всегда учитывайте проверку вашей настройки, если запросы не выполняются - в частности, если временное отключение антивируса решает проблему, то, вероятно, он является причиной. - - ```batch - curl -LO https://github.com/codex-storage/codex-testnet-starter/archive/master.tar.gz - ``` - - Если вы видите ошибку: - - ```batch - curl: (35) schannel: next InitializeSecurityContext failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012) - The revocation function was unable to check revocation for the certificate. - ``` - - Возможно, вам нужно добавить опцию `--ssl-no-revoke` к вашему вызову curl, например: - - ```batch - curl -LO --ssl-no-revoke https://github.com/codex-storage/codex-testnet-starter/archive/master.tar.gz - ``` - -1. Распакуйте содержимое tar-файла и затем удалите его: - ```batch - tar xzvf master.tar.gz - del master.tar.gz - ``` - -2. Перейдите в папку со скриптами: - ```batch - cd codex-testnet-starter-master\scripts\windows - ``` - -3. Скачайте бинарные файлы Codex из релизов GitHub: - ```batch - download-online.bat - ``` - -4. Сгенерируйте пару ключей ethereum: - ```batch - generate.bat - ``` - Ваш приватный ключ будет сохранен в файле `eth.key`, а адрес - в файле `eth.address`. - -5. Пополните ваш адрес, показанный на экране, токенами: - - Используйте веб-краны для получения [ETH](https://faucet-eth.testnet.codex.storage) и [TST](https://faucet-tst.testnet.codex.storage) токенов. - - Мы также можем сделать это с помощью канала Discord [# bot](https://discord.com/channels/895609329053474826/1230785221553819669) - - Используйте команду `/set ethaddress` для ввода вашего сгенерированного адреса - - Используйте команду `/mint` для получения ETH и TST токенов - - Используйте команду `/balance` для проверки успешного получения тестовых токенов - -6. Запустите узел Codex: - ```batch - run-client.bat - ``` - - 7. Настройте [проброс портов](#basic-common), и мы готовы к работе. - -### Все ОС {#basic-common} - -Настройте [проброс портов](https://en.wikipedia.org/wiki/Port_forwarding) на вашем интернет-маршрутизаторе -| # | Протокол | Порт | Описание | -| - | -------- | ------ | -------------- | -| 1 | `UDP` | `8090` | `Codex Discovery` | -| 2 | `TCP` | `8070` | `Codex Transport` | - -После того как ваш узел запущен и работает, вы можете использовать [Codex API](/developers/api) для взаимодействия с вашим узлом Codex, пожалуйста, ознакомьтесь с нашим [пошаговым руководством по API](/learn/using) для получения более подробной информации. - -Вы также можете использовать [Codex App UI](https://app.codex.storage) для взаимодействия с вашим локальным узлом Codex. - -Нужна помощь? Обратитесь к нам в канале [#:sos:|node-help](https://discord.com/channels/895609329053474826/1286205545837105224) или проверьте [руководство по устранению неполадок](/learn/troubleshoot.md). - -## Запуск Storage Provider (Веб-версия) {#sp-guide-web} - -В процессе разработки :construction: - -## Данные Testnet - -### Bootstrap-узлы -**Codex** -```shell -spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P -spr:CiUIAhIhAyUvcPkKoGE7-gh84RmKIPHJPdsX5Ugm_IHVJgF-Mmu_EgIDARo8CicAJQgCEiEDJS9w-QqgYTv6CHzhGYog8ck92xflSCb8gdUmAX4ya78QoemesAYaCwoJBES39Q2RAnVOKkYwRAIgLi3rouyaZFS_Uilx8k99ySdQCP1tsmLR21tDb9p8LcgCIG30o5YnEooQ1n6tgm9fCT7s53k6XlxyeSkD_uIO9mb3 -spr:CiUIAhIhAlNJ7ary8eOK5GcwQ6q4U8brR7iWjwhMwzHb8BzzmCEDEgIDARpJCicAJQgCEiECU0ntqvLx44rkZzBDqrhTxutHuJaPCEzDMdvwHPOYIQMQsZ67vgYaCwoJBK6Kf1-RAnVEGgsKCQSuin9fkQJ1RCpGMEQCIDxd6lXDvj1PcHgQYnNpHGfgCO5a7fejg3WhSjh2wTimAiB7YHsL1WZYU_zkHcNDWhRgMbkb3C5yRuvUhjBjGOYJYQ -spr:CiUIAhIhA7E4DEMer8nUOIUSaNPA4z6x0n9Xaknd28Cfw9S2-cCeEgIDARo8CicAJQgCEiEDsTgMQx6vydQ4hRJo08DjPrHSf1dqSd3bwJ_D1Lb5wJ4Qt_CesAYaCwoJBEDhWZORAnVYKkYwRAIgFNzhnftocLlVHJl1onuhbSUM7MysXPV6dawHAA0DZNsCIDRVu9gnPTH5UkcRXLtt7MLHCo4-DL-RCMyTcMxYBXL0 -spr:CiUIAhIhAzZn3JmJab46BNjadVnLNQKbhnN3eYxwqpteKYY32SbOEgIDARo8CicAJQgCEiEDNmfcmYlpvjoE2Np1Wcs1ApuGc3d5jHCqm14phjfZJs4QrvWesAYaCwoJBKpA-TaRAnViKkcwRQIhANuMmZDD2c25xzTbKSirEpkZYoxbq-FU_lpI0K0e4mIVAiBfQX4yR47h1LCnHznXgDs6xx5DLO5q3lUcicqUeaqGeg -spr:CiUIAhIhAuN-P1D0HrJdwBmrRlZZzg6dqllRNNcQyMDUMuRtg3paEgIDARpJCicAJQgCEiEC434_UPQesl3AGatGVlnODp2qWVE01xDIwNQy5G2DeloQm_L2vQYaCwoJBI_0zSiRAnVsGgsKCQSP9M0okQJ1bCpHMEUCIQDgEVjUp1RJGb59eRPs7RPYMSGAI_fo1yv70iBtnTqefQIgVoXszc87EGFVO3aaqorEYZ21OGRko5ho_Pybdyqa6AI -spr:CiUIAhIhAsi_hgxFppWjHiKRwnYPX_qkB28dLtwK9c7apnlBanFuEgIDARpJCicAJQgCEiECyL-GDEWmlaMeIpHCdg9f-qQHbx0u3Ar1ztqmeUFqcW4Q2O32vQYaCwoJBNEmoCiRAnV2GgsKCQTRJqAokQJ1dipHMEUCIQDpC1isFfdRqNmZBfz9IGoEq7etlypB6N1-9Z5zhvmRMAIgIOsleOPr5Ra_Nk7BXmXGhe-YlLosH9jo83JtfWCy3-o -``` - -**Geth** -```shell -enode://cff0c44c62ecd6e00d72131f336bb4e4968f2c1c1abeca7d4be2d35f818608b6d8688b6b65a18f1d57796eaca32fd9d08f15908a88afe18c1748997235ea6fe7@159.223.243.50:40010 -enode://ea331eaa8c5150a45b793b3d7c17db138b09f7c9dd7d881a1e2e17a053e0d2600e0a8419899188a87e6b91928d14267949a7e6ec18bfe972f3a14c5c2fe9aecb@68.183.245.13:40030 -enode://4a7303b8a72db91c7c80c8fb69df0ffb06370d7f5fe951bcdc19107a686ba61432dc5397d073571433e8fc1f8295127cabbcbfd9d8464b242b7ad0dcd35e67fc@174.138.127.95:40020 -enode://36f25e91385206300d04b95a2f8df7d7a792db0a76bd68f897ec7749241b5fdb549a4eecfab4a03c36955d1242b0316b47548b87ad8291794ab6d3fecda3e85b@64.225.89.147:40040 -enode://2e14e4a8092b67db76c90b0a02d97d88fc2bb9df0e85df1e0a96472cdfa06b83d970ea503a9bc569c4112c4c447dbd1e1f03cf68471668ba31920ac1d05f85e3@170.64.249.54:40050 -enode://6eeb3b3af8bef5634b47b573a17477ea2c4129ab3964210afe3b93774ce57da832eb110f90fbfcfa5f7adf18e55faaf2393d2e94710882d09d0204a9d7bc6dd2@143.244.205.40:40060 -enode://6ba0e8b5d968ca8eb2650dd984cdcf50acc01e4ea182350e990191aadd79897801b79455a1186060aa3818a6bc4496af07f0912f7af53995a5ddb1e53d6f31b5@209.38.160.40:40070 -``` - -### Смарт-контракты - -| Контракт | Адрес | -| ----------- | --------------------------------------------------------------------------------------------------------------------------------------- | -| Токен | [`0x34a22f3911De437307c6f4485931779670f78764`](https://explorer.testnet.codex.storage/address/0x34a22f3911De437307c6f4485931779670f78764) | -| Верификатор | [`0x02dd582726F7507D7d0F8bD8bf8053d3006F9092`](https://explorer.testnet.codex.storage/address/0x02dd582726F7507D7d0F8bD8bf8053d3006F9092) | -| Маркетплейс | [`0xfFaF679D5Cbfdd5Dbc9Be61C616ed115DFb597ed`](https://explorer.testnet.codex.storage/address/0xfFaF679D5Cbfdd5Dbc9Be61C616ed115DFb597ed) | - -### Эндпоинты - -| # | Сервис | URL | -| - | -------------- | ---------------------------------------------------------------------------- | -| 1 | Geth Public RPC | [rpc.testnet.codex.storage](https://rpc.testnet.codex.storage) | -| 2 | Обозреватель блоков | [explorer.testnet.codex.storage](https://explorer.testnet.codex.storage) | -| 3 | Кран ETH | [faucet-eth.testnet.codex.storage](https://faucet-eth.testnet.codex.storage) | -| 4 | Кран TST | [faucet-tst.testnet.codex.storage](https://faucet-tst.testnet.codex.storage) | -| 5 | Страница статуса | [status.testnet.codex.storage](https://status.testnet.codex.storage) | diff --git a/codex/about.md b/versions/0.0.1/codex/about.md similarity index 61% rename from codex/about.md rename to versions/0.0.1/codex/about.md index fc32f39..5cccde8 100644 --- a/codex/about.md +++ b/versions/0.0.1/codex/about.md @@ -1,3 +1,3 @@ -# About Codex +# (0.0.1)About Codex Work in progress :construction: diff --git a/codex/disclaimer.md b/versions/0.0.1/codex/disclaimer.md similarity index 97% rename from codex/disclaimer.md rename to versions/0.0.1/codex/disclaimer.md index dba0977..42c2277 100644 --- a/codex/disclaimer.md +++ b/versions/0.0.1/codex/disclaimer.md @@ -1,4 +1,4 @@ -# Disclaimer +# (0.0.1)Disclaimer The code and instructions provided within this repository and related repositories are provided “as-is”, without warranty of any kind, express or implied, including but not limited to the safety or correctness, or performance of the code or instructions provided. We make no assurance that the code will work as intended, and users may experience delays, failures, errors, omissions or loss of transmitted information whilst using or running Codex. diff --git a/ru/codex/installer-disclaimer.md b/versions/0.0.1/codex/installer-disclaimer.md similarity index 93% rename from ru/codex/installer-disclaimer.md rename to versions/0.0.1/codex/installer-disclaimer.md index bce86b7..9dca475 100644 --- a/ru/codex/installer-disclaimer.md +++ b/versions/0.0.1/codex/installer-disclaimer.md @@ -1,10 +1,10 @@ -# Codex Testnet Privacy Policy +# (0.0.1)Codex Testnet Privacy Policy This Privacy Policy applies exclusively when you access the Codex testnet through the Command Line Interface (CLI) installer provided by us. It is designed to inform you about the personal data we collect and process, our approach to that collection and processing, and your rights when you participate in the Codex Testnet Programme using our CLI installer. For the avoidance of doubt, your participation in the Codex Testnet Programme is subject to the [Codex Testnet Terms and Conditions](https://docs.codex.storage/networks/testnet). Before using the CLI installer to participate in the Codex Testnet Programme, please review this privacy policy carefully. By agreeing to use our CLI installer to participate in the Codex Testnet Programme, you acknowledge that this Privacy Policy is applicable to your use of the testnet through our provided CLI tool. -## Who We Are +## (0.0.1)Who We Are For the purposes of this Privacy Policy and the collection and processing of personal data as a controller, the relevant entity is **IFT Studio Pte Ltd.**, a company duly organised and registered under the laws of Singapore, having its registered office at: @@ -12,17 +12,17 @@ For the purposes of this Privacy Policy and the collection and processing of per Whenever we refer to **“IFT”**, **“we”**, **“us”**, or any other similar references, we are referring to IFT Studio Pte Ltd. -## Data Collection and Processing +## (0.0.1)Data Collection and Processing We limit the collection and processing of personal data from your participation in the Codex Testnet Programme. We only collect and process certain personal data for specific purposes and where we have the legal basis to do so under applicable data protection law, and in this case, with your explicit consent. We will not collect or process any personal data that we don’t need, and where we do store any personal data, we will only store it for the least amount of time needed for the indicated purpose. -### Personal Data We Collect +### (0.0.1)Personal Data We Collect We collect and process the following personal data as a result of your participation in the Codex Testnet Programme: -#### **Wallet Addresses** +#### (0.0.1)**Wallet Addresses** In order to provide you with Codex Testnet tokens and facilitate your participation in the Codex Testnet Programme, we may collect and process two types of blockchain addresses from you. This data processing is necessary for the performance of our contract with you to participate in the testnet. The information we collect includes: @@ -34,7 +34,7 @@ These addresses are collected through our automated CLI installer or can be manu You have the right to withdraw from the Codex testnet at any time, in which case we will cease processing this data. -#### **Node and Network Information** +#### (0.0.1)**Node and Network Information** To improve the future functionality, performance, and security of Codex, we collect and process technical information from users participating in the Codex testnet. We rely on our **legitimate interest** as the legal basis for this data processing activity. The information we collect includes: @@ -55,17 +55,17 @@ While we believe this data processing is necessary and proportionate to our legi We are committed to **data minimization** and **purpose limitation**. After the mainnet launch of Codex, all personal data collected during the testnet phase will be securely deleted. -## Third-Party Processing of Personal Data +## (0.0.1)Third-Party Processing of Personal Data In addition to our limited collection of personal data, **third parties may collect or process your personal data** as part of your participation in the Codex Testnet Programme, particularly when we use their services to facilitate your participation. When you interact with these third parties, **their respective privacy policies will govern** the collection and use of your data. We encourage you to review these privacy policies to understand how your personal data may be handled by these third parties. -## Security Measures We Take +## (0.0.1)Security Measures We Take As a general approach, we take **data security** seriously and have implemented a variety of **security measures** to maintain the safety of your personal data when you submit such information to us. -## Exporting Personal Data Outside Singapore +## (0.0.1)Exporting Personal Data Outside Singapore We are obliged to protect the privacy of personal data that you may have submitted in the unlikely event that we export your personal data outside Singapore. @@ -73,7 +73,7 @@ This means that personal data will only be processed in **countries or by partie In any event, the transmission of personal data outside Singapore will always occur in conformity with applicable data protection laws. -## Your Choices and Rights +## (0.0.1)Your Choices and Rights As explained in this Privacy Policy, we **limit our collection and processing** of your personal data wherever possible. Nonetheless, you still have certain **choices and rights** regarding the personal data we do collect and process. @@ -86,13 +86,13 @@ According to relevant privacy legislation, you have the right to: - **Object to the processing** of your personal data. - **File a complaint** with the Personal Data Protection Committee of Singapore (PDPC) if you believe your personal data has been processed unlawfully. -## This Privacy Policy Might Change +## (0.0.1)This Privacy Policy Might Change We may modify or replace any part of this Privacy Policy **at any time and without notice**. Please check the Privacy Policy periodically for any changes. > **Note:** The new Privacy Policy will be effective **immediately** upon posting. -## Contact Information +## (0.0.1)Contact Information If you have any questions about the Privacy Policy, please contact us at: diff --git a/codex/privacy-policy.md b/versions/0.0.1/codex/privacy-policy.md similarity index 90% rename from codex/privacy-policy.md rename to versions/0.0.1/codex/privacy-policy.md index 256025f..e880917 100644 --- a/codex/privacy-policy.md +++ b/versions/0.0.1/codex/privacy-policy.md @@ -1,13 +1,13 @@ --- lastUpdated: false --- -# Privacy Policy +# (0.0.1)Privacy Policy Last updated: 9 February 2024 This Privacy Policy is intended to inform users of our approach to privacy in respect of this website (**"Website"**). In this regard, if you are visiting our Website, this Privacy Policy applies to you. -### 1) Who we are +### (0.0.1)1) Who we are For the purposes of this Privacy Policy and the collection and processing of personal data as a controller, the relevant entity is the Logos Collective Association, which has its registered office in Zug and its legal domicile address at @@ -21,7 +21,7 @@ Switzerland Whenever we refer to “Logos”, “we” or other similar references, we are referring to the Logos Collective Association. -### 2) We limit the collection and processing of personal data from your use of the Website +### (0.0.1)2) We limit the collection and processing of personal data from your use of the Website We aim to limit the collection and collection and processing of personal data from users of the Website. We only collect and process certain personal data for specific purposes and where we have the legal basis to do so under applicable privacy legislation. We will not collect or process any personal data that we don’t need and where we do store any personal data, we will only store it for the least amount of time needed for the indicated purpose. @@ -29,19 +29,19 @@ In this regard, we collect and process the following personal data from your use * **IP address**: As part of such use of the Website, we briefly process your IP address but we have no way of identifying you. We however have a legitimate interest in processing such IP addresses to ensure the technical functionality and enhance the security measures of the Website. This IP address is not stored by us over time. -### 3) Third party processing of personal data +### (0.0.1)3) Third party processing of personal data In addition to our limited and collection of personal data, third parties may collect or process personal data as a result of the Website making use of certain features or to provide certain content. To the extent you interact with such third party content or features, their respective privacy policies will apply. -### 4) Security measures we take in respect of the Website +### (0.0.1)4) Security measures we take in respect of the Website As a general approach, we take data security seriously and we have implemented a variety of security measures on the Website to maintain the safety of your personal data when you submit such information to us. -### 5) Exporting data outside the European Union and Switzerland +### (0.0.1)5) Exporting data outside the European Union and Switzerland We are obliged to protect the privacy of personal data that you may have submitted in the unlikely event that we export your personal data to places outside the European Union or Switzerland. This means that personal data will only be processed in countries or by parties that provide an adequate level of protection as deemed by Switzerland or the European Commission. Otherwise, we will use other forms of protections, such as specific forms of contractual clauses to ensure such personal data is provided the same protection as required in Switzerland or Europe. In any event, the transmission of personal data outside the European Union and Switzerland will always occur in conformity with applicable privacy legislation. -### 6) Your choices and rights +### (0.0.1)6) Your choices and rights As explained in this Privacy Policy, we limit our collection and processing of your personal data wherever possible. Nonetheless, you still have certain choices and rights in respect of the personal data which we do collect and process. As laid out in relevant privacy legislation, you have the right to: @@ -57,15 +57,15 @@ As explained in this Privacy Policy, we limit our collection and processing of y * File a complaint with the Federal Data Protection and Information Commissioner (FDPIC), if you believe that your personal data has been processed unlawfully. -### 7) Third party links +### (0.0.1)7) Third party links On this Website, you may come across links to third party websites. These third party sites have separate and independent privacy policies. We therefore have no responsibility or liability for the content and activities of these third party websites. -### 8) This Privacy Policy might change +### (0.0.1)8) This Privacy Policy might change We may modify or replace any part of this Privacy Policy at any time and without notice. Please check the Website periodically for any changes. The new Privacy Policy will be effective immediately upon its posting on our Website. -### 9) Contact information +### (0.0.1)9) Contact information To the extent that you have any questions about the Privacy Policy, please contact us at legal@free.technology. diff --git a/codex/security.md b/versions/0.0.1/codex/security.md similarity index 96% rename from codex/security.md rename to versions/0.0.1/codex/security.md index 4da6ab5..c993021 100644 --- a/codex/security.md +++ b/versions/0.0.1/codex/security.md @@ -1,4 +1,4 @@ -# Security +# (0.0.1)Security We take security seriously at Codex and across the Institute of Free Technology and its affiliates. diff --git a/codex/terms-of-use.md b/versions/0.0.1/codex/terms-of-use.md similarity index 96% rename from codex/terms-of-use.md rename to versions/0.0.1/codex/terms-of-use.md index bf8472b..8c6cc01 100644 --- a/codex/terms-of-use.md +++ b/versions/0.0.1/codex/terms-of-use.md @@ -1,7 +1,7 @@ --- lastUpdated: false --- -# Terms of Use +# (0.0.1)Terms of Use Last updated: 14 February 2024 @@ -11,7 +11,7 @@ It is your responsibility to read the Website Terms of Use carefully before your If you do not agree with these Website Terms of Use, you must not access or use the Website. -### 1) Who we are +### (0.0.1)1) Who we are For the purposes of these Website Terms of Use, the relevant entity is the Logos Collective Association, which has its registered office in Zug and its legal domicile address at: @@ -25,7 +25,7 @@ Switzerland Whenever we refer to "Logos", "we", "us" or any other similar references, we are referring to the Logos Collective Association. -### 2) Disclaimers +### (0.0.1)2) Disclaimers The Website is provided by us on an ‘as is’ basis and you use the Website at your own sole discretion and risk. @@ -39,7 +39,7 @@ The information contained herein does not constitute financial, legal, tax, or o Nothing in this Website should be construed by you as an offer to buy or sell, or soliciting any offer to buy or sell any tokens or any security. -### 3) Forward looking statements +### (0.0.1)3) Forward looking statements The Website may also contain forward-looking statements that are based on current expectations, estimates, forecasts, assumptions and projections about the technology, industry and markets in general. @@ -47,31 +47,31 @@ The forward looking statements, which may include statements about the roadmap, While we aim to update our website regularly, all information, including the timeline and the specifics of each stage, is subject to change and may be amended or supplemented at any time, without notice and at our sole discretion. -### 4) Intellectual property rights +### (0.0.1)4) Intellectual property rights The Website and its contents are made available under Creative Commons Attribution 4.0 International license (CC-BY 4.0). In essence this licence allows users to copy, modify and distribute the content in any format for any purpose, including commercial use, subject to certain requirements such as attributing us. For the full terms of this licence, please refer to the following website: https://creativecommons.org/licenses/by/4.0/. -### 5) Third party website links +### (0.0.1)5) Third party website links To the extent the Website provides any links to a third party website, then their terms and conditions, including privacy policies, govern your use of those third party websites. By linking such third party websites, Status does not represent or imply that it endorses or supports such third party websites or content therein, or that it believes such third party websites and content therein to be accurate, useful or non-harmful. We have no control over such third party websites and will not be liable for your use of or activities on any third party websites accessed through the Website. If you access such third party websites through the Website, it is at your own risk and you are solely responsible for your activities on such third party websites. -### 6) Limitation of liability +### (0.0.1)6) Limitation of liability We will not be held liable to you under any contract, negligence, strict liability, or other legal or equitable theory for any lost profits, cost of procurement for substitute services, or any special, incidental, or consequential damages related to, arising from, or in any way connected with these Website Terms of Use, the Website, the content on the Website, or your use of the Website, even if we have been advised of the possibility of such damages. In any event, our aggregate liability for such claims is limited to EUR 100 (one hundred Euros). This limitation of liability will apply to the maximum extent permitted by applicable law. -### 7) Indemnity +### (0.0.1)7) Indemnity You shall indemnify us and hold us harmless from and against any and all claims, damages and expenses, including attorneys’ fees, arising from or related to your use of the Website, the content on the Website, including without limitation your violation of these Website Terms of Use. -### 8) Modifications +### (0.0.1)8) Modifications We may modify or replace any part of this Website Terms of Use at any time and without notice. You are responsible for checking the Website periodically for any changes. The new Website Terms of Use will be effective immediately upon its posting on the Website. -### 9) Governing law +### (0.0.1)9) Governing law Swiss law governs these Website Terms of Use and any disputes between you and us, whether in court or arbitration, without regard to conflict of laws provisions. -### 10) Disputes +### (0.0.1)10) Disputes In these terms, “dispute” has the broadest meaning enforceable by law and includes any claim you make against or controversy you may have in relation to these Website Terms of Use, the Website, the content on the Website, or your use of the Website. @@ -83,7 +83,7 @@ If we and you are unable to further resolve this dispute within sixty (60) calen Regardless of any applicable statute of limitations, you must bring any claims within one year after the claim arose or the time when you should have reasonably known about the claim. You also waive the right to participate in a class action lawsuit or a classwide arbitration against us. -### 11) About these Website Terms of Use +### (0.0.1)11) About these Website Terms of Use These Website Terms of Use cover the entire agreement between you and us regarding the Website and supersede all prior and contemporaneous understandings, agreements, representations and warranties, both written and oral, with respect to the Website. diff --git a/developers/api.md b/versions/0.0.1/developers/api.md similarity index 95% rename from developers/api.md rename to versions/0.0.1/developers/api.md index 4df2651..6e42c8e 100644 --- a/developers/api.md +++ b/versions/0.0.1/developers/api.md @@ -1,4 +1,4 @@ -# Codex API +# (0.0.1)Codex API Codex uses REST API to interact with the node and we can use HTTP client for interaction and configuration. diff --git a/versions/0.0.1/index.md b/versions/0.0.1/index.md new file mode 100644 index 0000000..cd87ed6 --- /dev/null +++ b/versions/0.0.1/index.md @@ -0,0 +1,6 @@ +--- +title: Codex Docs +description: 0.0.1 +--- + +# (0.0.1)Docs for Codex diff --git a/learn/architecture.md b/versions/0.0.1/learn/architecture.md similarity index 95% rename from learn/architecture.md rename to versions/0.0.1/learn/architecture.md index 5a4ea26..61aa8e5 100644 --- a/learn/architecture.md +++ b/versions/0.0.1/learn/architecture.md @@ -1,4 +1,4 @@ -# Description and architecture +# (0.0.1)Description and architecture Codex is building a durable data storage engine that is fully decentralised, providing corruption and censorship resistance to web3 applications. It innately protects network participants by giving hosts plausible deniability over the data they store, and clients provable durability guarantees—up to 99.99%—while remaining storage and bandwidth efficient. @@ -13,7 +13,7 @@ These four key features combine to differentiate Codex from existing projects in - **Incentivization:** To encourage rational behaviour, widespread network participation, and the efficient provision of finite network resources. -### Incentivized decentralisation +### (0.0.1)Incentivized decentralisation Incentivization mechanisms are one of the key pieces missing from traditional file-sharing networks. Codex believes that a robust marketplace-based incentive structure will ensure wide participation across the node types detailed below. @@ -28,7 +28,7 @@ The development of an adequate incentive structure is driven by the following go Although still to be finalised, the Codex incentive structure will involve a marketplace of participants who want to store data, and those provisioning storage posting collateral, with the latter bidding on open storage contracts. This structure aims to ensure that participants' incentives align, resulting in Codex functioning as intended. -### Network architecture +### (0.0.1)Network architecture Codex is composed of multiple node types, each taking a different role in the network's operation. Similarly, the hardware demands for each node type vary, enabling those operating resource-restricted devices to participate. @@ -51,9 +51,9 @@ If the storage node sends invalid proofs or fails to provide them in time, the n When the contract is reposted, some of the faulty node's collateral pays for the new storage node's bandwidth fees. Erasure coding complements the repair scheme by allowing the reconstruction of the missing chunks from data in other slots within the same storage contract hosted by faultless storage nodes. -![architect](/learn/architecture.png) +![architect](/public/learn/architecture.png) -### Marketplace architecture ### +### (0.0.1)Marketplace architecture ### The marketplace consists of a smart contract that is deployed on-chain, and the purchasing and sales modules that are part of the node software. The purchasing @@ -61,7 +61,7 @@ module is responsible for posting storage requests to the smart contract. The sales module is its counterpart that storage providers use to determine which storage requests they are interested in. -#### Smart contract #### +#### (0.0.1)Smart contract #### The smart contract facilitates matching between storage providers and storage clients. A storage client can request a certain amount of storage for a certain @@ -93,7 +93,7 @@ storage proof. This is not done on a fixed time interval, but determined stochastically to ensure that it is not possible for a storage provider to predict when it should provide the next storage proof. -#### Purchasing #### +#### (0.0.1)Purchasing #### The purchasing module in the node software interacts with the smart contract on behalf of the node operator. It posts storage requests, and handles any other @@ -102,7 +102,7 @@ when a request is canceled because there are not enough interested storage providers, then the purchasing module can withdraw the tokens that were associated with the request. -#### Sales #### +#### (0.0.1)Sales #### The sales module is the counterpart to the purchasing module. It monitors the smart contract to be notified of incoming storage requests. It keeps a list of the @@ -118,6 +118,6 @@ requests it is interested in. Over time, we expect more specialized strategies to emerge to cater to the needs of e.g. large providers versus providers that run a node from their home. -### Whitepaper ### +### (0.0.1)Whitepaper ### -Read the [Codex whitepaper](/learn/whitepaper) +Read the [Codex whitepaper](./whitepaper) diff --git a/es/learn/build.md b/versions/0.0.1/learn/build.md similarity index 90% rename from es/learn/build.md rename to versions/0.0.1/learn/build.md index fa5f538..708c5da 100644 --- a/es/learn/build.md +++ b/versions/0.0.1/learn/build.md @@ -1,6 +1,6 @@ -# Build Codex +# (0.0.1)Build Codex -## Table of Contents +## (0.0.1)Table of Contents - [Install developer tools](#prerequisites) - [Linux](#linux) @@ -14,7 +14,7 @@ **Optional** - [Run the tests](#tests) -## Prerequisites +## (0.0.1)Prerequisites To build nim-codex, developer tools need to be installed and accessible in the OS. @@ -22,11 +22,11 @@ Instructions below correspond roughly to environmental setups in nim-codex's [CI Other approaches may be viable. On macOS, some users may prefer [MacPorts](https://www.macports.org/) to [Homebrew](https://brew.sh/). On Windows, rather than use MSYS2, some users may prefer to install developer tools with [winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/), [Scoop](https://scoop.sh/), or [Chocolatey](https://chocolatey.org/), or download installers for e.g. Make and CMake while otherwise relying on official Windows developer tools. Community contributions to these docs and our build system are welcome! -### Rust +### (0.0.1)Rust The current implementation of Codex's zero-knowledge proving circuit requires the installation of rust v1.79.0 or greater. Be sure to install it for your OS and add it to your terminal's path such that the command `cargo --version` gives a compatible version. -### Linux +### (0.0.1)Linux > [!WARNING] > Linux builds currently require gcc $\leq$ 13. If this is not an option in your @@ -65,7 +65,7 @@ gcc --version If you get a number that starts with 14 (e.g. `14.2.0`), then you need to either downgrade, or try a workaround like [building within Docker](#building-within-docker). -### macOS +### (0.0.1)macOS Install the [Xcode Command Line Tools](https://mac.install.guide/commandlinetools/index.html) by opening a terminal and running ```shell @@ -81,11 +81,11 @@ Check that `PATH` is setup correctly ```shell which bash cmake -# /usr/local/bin/bash -# /usr/local/bin/cmake +# (0.0.1)/usr/local/bin/bash +# (0.0.1)/usr/local/bin/cmake ``` -### Windows + MSYS2 +### (0.0.1)Windows + MSYS2 *Instructions below assume the OS is 64-bit Windows and that the hardware or VM is [x86-64](https://en.wikipedia.org/wiki/X86-64) compatible.* @@ -106,11 +106,11 @@ pacman -U --noconfirm \ https://repo.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-gcc-libs-13.2.0-6-any.pkg.tar.zst ``` - + -#### Optional: VSCode Terminal integration +#### (0.0.1)Optional: VSCode Terminal integration You can link the MSYS2-UCRT64 terminal into VSCode by modifying the configuration file as shown below. File: `C:/Users//AppData/Roaming/Code/User/settings.json` @@ -135,11 +135,11 @@ File: `C:/Users//AppData/Roaming/Code/User/settings.json` } ``` -### Other +### (0.0.1)Other It is possible that nim-codex can be built and run on other platforms supported by the [Nim](https://nim-lang.org/) language: BSD family, older versions of Windows, etc. There has not been sufficient experimentation with nim-codex on such platforms, so instructions are not provided. Community contributions to these docs and our build system are welcome! -## Repository +## (0.0.1)Repository In Bash run ```shell @@ -158,7 +158,7 @@ To see more output from `make` pass `V=1`. This works for all `make` targets in make V=1 update ``` -## Executable +## (0.0.1)Executable In Bash run ```shell @@ -167,9 +167,9 @@ make The default `make` target creates the `build/codex` executable. -## Tools +## (0.0.1)Tools -### Circuit download tool +### (0.0.1)Circuit download tool To build the circuit download tool located in `tools/cirdl` run: @@ -177,28 +177,28 @@ To build the circuit download tool located in `tools/cirdl` run: make cirdl ``` -## Example usage +## (0.0.1)Example usage -See the instructions in the [Quick Start](/learn/quick-start). +See the instructions in the [Quick Start](./quick-start). -## Tests +## (0.0.1)Tests In Bash run ```shell make test ``` -### testAll +### (0.0.1)testAll -#### Prerequisites +#### (0.0.1)Prerequisites To run the integration tests, an Ethereum test node is required. Follow these instructions to set it up. -##### Windows (do this before 'All platforms') +##### (0.0.1)Windows (do this before 'All platforms') 1. Download and install Visual Studio 2017 or newer. (Not VSCode!) In the Workloads overview, enable `Desktop development with C++`. ( https://visualstudio.microsoft.com ) -##### All platforms +##### (0.0.1)All platforms 1. Install NodeJS (tested with v18.14.0), consider using NVM as a version manager. [Node Version Manager (`nvm`)](https://github.com/nvm-sh/nvm#readme) 1. Open a terminal @@ -211,7 +211,7 @@ Before the integration tests are started, you must start the Ethereum test node 1. Go to the vendor/codex-contracts-eth folder: `cd //vendor/codex-contracts-eth/` 1. `npm start` -> This should launch Hardhat, and output a number of keys and a warning message. -#### Run +#### (0.0.1)Run The `testAll` target runs the same tests as `make test` and also runs tests for nim-codex's Ethereum contracts, as well a basic suite of integration tests. @@ -222,7 +222,7 @@ Use a new terminal to run: make testAll ``` -## Building Within Docker +## (0.0.1)Building Within Docker For the specific case of Linux distributions which ship with gcc 14 and a downgrade to 13 is not possible/desirable, building within a Docker @@ -230,13 +230,13 @@ container and pulling the binaries out by copying or mounting remains an option; e.g.: ```bash= -# Clone original repo. +# (0.0.1)Clone original repo. git clone https://github.com/codex-storage/nim-codex -# Build inside docker +# (0.0.1)Build inside docker docker build -t codexstorage/nim-codex:latest -f nim-codex/docker/codex.Dockerfile nim-codex -# Extract executable +# (0.0.1)Extract executable docker create --name=codex-build codexstorage/nim-codex:latest docker cp codex-build:/usr/local/bin/codex ./codex docker cp codex-build:/usr/local/bin/cirdl ./cirdl diff --git a/es/learn/download-flow.md b/versions/0.0.1/learn/download-flow.md similarity index 96% rename from es/learn/download-flow.md rename to versions/0.0.1/learn/download-flow.md index f8dec92..62a1505 100644 --- a/es/learn/download-flow.md +++ b/versions/0.0.1/learn/download-flow.md @@ -1,7 +1,7 @@ -# Download Flow +# (0.0.1)Download Flow Sequence of interactions that result in dat blocks being transferred across the network. -## Local Store +## (0.0.1)Local Store When data is available in the local blockstore, ```mermaid @@ -21,7 +21,7 @@ Node/StoreStream->>-API: Data stream API->>Alice: Stream download of block ``` -## Network Store +## (0.0.1)Network Store When data is not found ih the local blockstore, the block-exchange engine is used to discover the location of the block within the network. Connection will be established to the node(s) that have the block, and exchange can take place. ```mermaid diff --git a/learn/installer/install-and-run.md b/versions/0.0.1/learn/installer/install-and-run.md similarity index 74% rename from learn/installer/install-and-run.md rename to versions/0.0.1/learn/installer/install-and-run.md index 133ecd9..e7f9cf0 100644 --- a/learn/installer/install-and-run.md +++ b/versions/0.0.1/learn/installer/install-and-run.md @@ -1,19 +1,19 @@ -# Quick Start +# (0.0.1)Quick Start Codex Installer is a CLI tool that simplifies the process of setting up a Codex node. It handles all the necessary steps to get your node running quickly and efficiently. -> Before we get started, please make sure to review and accept the [disclaimer](/codex/installer-disclaimer) as Codex Installer collects some of your node information to improve the user experience. +> Before we get started, please make sure to review and accept the [disclaimer](../../codex/installer-disclaimer) as Codex Installer collects some of your node information to improve the user experience.
-## Requirements +## (0.0.1)Requirements - git - npm -## Run the Codex Installer +## (0.0.1)Run the Codex Installer To start the Codex Installer, simply run the following command in your terminal : @@ -21,28 +21,28 @@ To start the Codex Installer, simply run the following command in your terminal npx codexstorage ``` -## Download and install Codex +## (0.0.1)Download and install Codex Once you run the above command, you will be seeing a command line interface with various options as below : -![InstallCodex](/learn/codex-installer.png) +![InstallCodex](/public/learn/codex-installer.png) -On selecting the `Download and install Codex` option, you will be asked to agree to the privacy disclaimer and provide an installation path to finish your installation. If you do not wish to agree to the data collection disclaimer, you can select the `Exit` option and follow the instructions [Manual setup](/learn/quick-start.md) to install Codex without using the Installer. +On selecting the `Download and install Codex` option, you will be asked to agree to the privacy disclaimer and provide an installation path to finish your installation. If you do not wish to agree to the data collection disclaimer, you can select the `Exit` option and follow the instructions [Manual setup](../quick-start.md) to install Codex without using the Installer. -## Run the Codex node +## (0.0.1)Run the Codex node Upon selecting the `Run Codex node` option, you will be asked for your Listening port (default is 8070) and discovery port (default is 8090). You can optionally provide your ERC20 public address to associate your testnet node with your wallet (Please note that Codex does not promise any incentives for running a node yet). -![RunCodex](/learn/codex-installer2.png) +![RunCodex](/public/learn/codex-installer2.png) Keep this terminal window open as closing this will terminate your node. -## Get the *ALTRUISTIC MODE* role on Codex discord +## (0.0.1)Get the *ALTRUISTIC MODE* role on Codex discord With that, your Codex node should be up and running. You can check the information and status of your node by proceeding to the third option. -![Get Role](/learn/codex-installer3.png) +![Get Role](/public/learn/codex-installer3.png) To claim the *ALTRUISTIC MODE* role, join the [Codex Discord](https://discord.gg/codex-storage) and go to the #bot channel. Run the `/node ` command where `` can be found in the Node Information menu in your Installer. -In order to keep your role, you will be required to frequently interact with the Codex testnet by running your node and/or [uploading/downloading files](/learn/installer/upload-and-download.md) using the testnet. \ No newline at end of file +In order to keep your role, you will be required to frequently interact with the Codex testnet by running your node and/or [uploading/downloading files](./upload-and-download.md) using the testnet. \ No newline at end of file diff --git a/learn/installer/requirements.md b/versions/0.0.1/learn/installer/requirements.md similarity index 87% rename from learn/installer/requirements.md rename to versions/0.0.1/learn/installer/requirements.md index 1f720a7..d96618a 100644 --- a/learn/installer/requirements.md +++ b/versions/0.0.1/learn/installer/requirements.md @@ -1,17 +1,17 @@ -# Requirements +# (0.0.1)Requirements -> **Note:** Using the Codex Installer is the recommended only if you agree to provide your node information to make the Codex experience better. If you don't agree to the disclaimer, please consider [setting up Codex manually](/learn/quick-start.md) +> **Note:** Using the Codex Installer is the recommended only if you agree to provide your node information to make the Codex experience better. If you don't agree to the disclaimer, please consider [setting up Codex manually](../quick-start.md)
To make sure that your Codex node is running smoothly, you will need to make sure that your machine has the following requirements : -## Dependencies +## (0.0.1)Dependencies - git - npm -## Port Forwarding +## (0.0.1)Port Forwarding Codex requires two ports to be open on your machine in order to function properly. However, please note that the **ports provided below are configurable** based on your preference : diff --git a/learn/installer/upload-and-download.md b/versions/0.0.1/learn/installer/upload-and-download.md similarity index 78% rename from learn/installer/upload-and-download.md rename to versions/0.0.1/learn/installer/upload-and-download.md index 04f36ff..d98e7bb 100644 --- a/learn/installer/upload-and-download.md +++ b/versions/0.0.1/learn/installer/upload-and-download.md @@ -1,27 +1,26 @@ -# Upload/Download Files in the Testnet +# (0.0.1)Upload/Download Files in the Testnet You can either upload or download files by using the Upload / Download option in the Codex Installer or by using the Codex GUI app (recommended). -## Codex Vault +## (0.0.1)Codex Vault Codex Vault is a GUI web application that can help you interact with the Codex testnet by uploading and downloading files. Once you have your Codex node running using the installer, you can access the Codex Vault by going to https://app.codex.storage -![Codex Vault](/learn/codex-vault.png) +![Codex Vault](/public/learn/codex-vault.png) Ensure that you have all the necessary conditions checked in the 'health check' section before you try uploading or downloading files. -### Uploading and Downloading Files +### (0.0.1)Uploading and Downloading Files To upload a file, you can either drag and drop the file to the upload area or click on the 'upload' button. You will be able to find a unique CID for the file once it has been uploaded. To download a file, enter the CID of the file in the 'download' section and click on the 'download' button. -![Upload and Download](/learn/upload-download.png) +![Upload and Download](/public/learn/upload-download.png) -## What's next? +## (0.0.1)What's next? Now that you know how to upload and download files in the testnet, you can try to explore some experimental features and build your own applications on top of Codex : -- [Use Codex REST API](/learn/using) -- [Running Codex with Local Marketplace support](/learn/local-marketplace) +- [Use Codex REST API](../using) - [Build applications using codex-js Library](https://github.com/codex-storage/codex-js) \ No newline at end of file diff --git a/learn/local-two-client-test.md b/versions/0.0.1/learn/local-two-client-test.md similarity index 95% rename from learn/local-two-client-test.md rename to versions/0.0.1/learn/local-two-client-test.md index 1a88f56..28724fa 100644 --- a/learn/local-two-client-test.md +++ b/versions/0.0.1/learn/local-two-client-test.md @@ -1,14 +1,14 @@ -# Codex Two-Client Test +# (0.0.1)Codex Two-Client Test The two-client test is a manual test you can perform to check your setup and familiarize yourself with the Codex API. These steps will guide you through running and connecting two nodes, in order to upload a file to one and then download that file from the other. This test also includes running a local blockchain node in order to have the Marketplace functionality available. However, running a local blockchain node is not strictly necessary, and you can skip steps marked as optional if you choose not start a local blockchain node. -## Prerequisite +## (0.0.1)Prerequisite -Make sure you have [built the client](/learn/build) or obtained [compiled binary](/learn/quick-start#get-codex-binary). +Make sure you have [built the client](./build) or obtained [compiled binary](./quick-start#get-codex-binary). -## Steps +## (0.0.1)Steps -### 1. Launch Node #1 +### (0.0.1)1. Launch Node #1 Open a terminal and run: - Mac/Linux: @@ -37,7 +37,7 @@ Open a terminal and run: Codex uses sane defaults for most of its arguments. Here we specify some explicitly for the purpose of this walk-through. -### 2. Sign of life +### (0.0.1)2. Sign of life Run the command : @@ -85,7 +85,7 @@ This GET request will return the node's debug information. The response will be | `table` | Table of nodes present in the node's DHT | | `codex` | Codex version information | -### 3. Launch Node #2 +### (0.0.1)3. Launch Node #2 We will need the signed peer record (SPR) from the first node that you got in the previous step. @@ -126,7 +126,7 @@ Notice we're using a new data-dir, and we've increased each port number by one. We're now also including the `bootstrap-node` argument. This allows us to link the new node to another one, bootstrapping our own little peer-to-peer network. SPR strings always start with `spr:`. -### 4. Connect The Two +### (0.0.1)4. Connect The Two Normally the two nodes will automatically connect. If they do not automatically connect or you want to manually connect nodes you can use the peerId to connect nodes. @@ -154,7 +154,7 @@ curl -X GET \ Notice that we are sending the "`peerId`" and the multiaddress of node 2 to the `/connect` endpoint of node 1. This provides node 1 all the information it needs to communicate with node 2. The response to this request should be `Successfully connected to peer`. -### 5. Upload The File +### (0.0.1)5. Upload The File We're now ready to upload a file to the network. In this example we'll use node 1 for uploading and node 2 for downloading. But the reverse also works. @@ -172,7 +172,7 @@ curl -X POST \ Depending on the file size this may take a moment. Codex is processing the file by cutting it into blocks and generating erasure-recovery data. When the process is finished, the request will return the content-identifier (CID) of the uploaded file. It should look something like `zdj7WVxH8HHHenKtid8Vkgv5Z5eSUbCxxr8xguTUBMCBD8F2S`. -### 6. Download The File +### (0.0.1)6. Download The File Replace `` with the identifier returned in the previous step. Replace `` with the filename where you want to store the downloaded file: @@ -184,11 +184,11 @@ curl -X GET \ Notice we are connecting to the second node in order to download the file. The CID we provide contains the information needed to locate the file within the network. -### 7. Verify The Results +### (0.0.1)7. Verify The Results If your file is downloaded and identical to the file you uploaded, then this manual test has passed. Rejoice! If on the other hand that didn't happen or you were unable to complete any of these steps, please leave us a message detailing your troubles. -## Notes +## (0.0.1)Notes When using the Ganache blockchain, there are some deviations from the expected behavior, mainly linked to how blocks are mined, which affects certain functionalities in the Sales module. Therefore, if you are manually testing processes such as payout collection after a request is finished or proof submissions, you need to mine some blocks manually for it to work correctly. You can do this by using the following curl command: diff --git a/learn/quick-start.md b/versions/0.0.1/learn/quick-start.md similarity index 83% rename from learn/quick-start.md rename to versions/0.0.1/learn/quick-start.md index aba2b7a..9aa5db6 100644 --- a/learn/quick-start.md +++ b/versions/0.0.1/learn/quick-start.md @@ -1,20 +1,20 @@ -# Quick Start +# (0.0.1)Quick Start To run Codex through this guide we would need to perform the following steps: -- [Review the disclaimer](/codex/disclaimer) +- [Review the disclaimer](../codex/disclaimer) - [Get Codex binary](#get-codex-binary) - [Run Codex](#run-codex) - [Interact with Codex](#interact-with-codex) -## Get Codex binary +## (0.0.1)Get Codex binary -For quick a start we will use precompiled binaries from [GitHub release page](https://github.com/codex-storage/nim-codex/releases). If you prefer to compile from the sources, please check [Build Codex](/learn/build). +For quick a start we will use precompiled binaries from [GitHub release page](https://github.com/codex-storage/nim-codex/releases). If you prefer to compile from the sources, please check [Build Codex](./build). Please follow the steps for your OS from the list: - [Linux/macOS](#linux-macos) - [Windows](#windows) -### Linux/macOS +### (0.0.1)Linux/macOS 1. Install latest Codex release ```shell @@ -23,7 +23,7 @@ Please follow the steps for your OS from the list: 2. Install dependencies ```shell - # Debian-based Linux + # (0.0.1)Debian-based Linux sudo apt update && sudo apt install libgomp1 ``` @@ -32,7 +32,7 @@ Please follow the steps for your OS from the list: codex --version ``` -### Windows +### (0.0.1)Windows 1. Install latest Codex release ```batch @@ -70,12 +70,12 @@ Please follow the steps for your OS from the list: codex --version ``` -## Run Codex +## (0.0.1)Run Codex -We may [run Codex in different modes](/learn/run#run), and for a quick start we will run [Codex node](/learn/run#codex-node), to be able to share files in the network. +We may [run Codex in different modes](./run#run), and for a quick start we will run [Codex node](./run#codex-node), to be able to share files in the network. 0. Obtain an SPR of the Codex network you want to join. -Go to [networks](/networks/networks) +Go to [networks](../networks/networks) 1. Run Codex @@ -130,14 +130,12 @@ Go to [networks](/networks/networks) | UDP | Discovery | `8090` | | TCP | Transport | `8070` | -If you would like to purchase or sell storage, please consider to run [Codex node with marketplace support](/learn/run#codex-node-with-marketplace-support) or [Codex storage node](/learn/run#codex-storage-node). - -## Interact with Codex +## (0.0.1)Interact with Codex When your Codex node is up and running you can interact with it using [Codex App UI](https://app.codex.storage) for files sharing. -Also, you can interact with Codex using [Codex API](/developers/api) and for a walk-through of the API, consider following the [Using Codex](/learn/using) guide. +Also, you can interact with Codex using [Codex API](../developers/api) and for a walk-through of the API, consider following the [Using Codex](./using) guide. -## Stay in touch +## (0.0.1)Stay in touch Want to stay up-date, or looking for further assistance? Try our [discord-server](https://discord.gg/codex-storage). diff --git a/learn/run.md b/versions/0.0.1/learn/run.md similarity index 93% rename from learn/run.md rename to versions/0.0.1/learn/run.md index 071d861..4cbab00 100644 --- a/learn/run.md +++ b/versions/0.0.1/learn/run.md @@ -1,7 +1,7 @@ --- outline: [2, 4] --- -# Run Codex +# (0.0.1)Run Codex As for now, Codex is implemented only in [Nim](https://nim-lang.org) and can be found in [nim-codex](https://github.com/codex-storage/nim-codex) repository. @@ -15,7 +15,7 @@ It is a command-line application which may be run in a different ways: During the run, it is required to pass [configuration](#configuration) option to the application, which can be done in a different ways. -## Configuration +## (0.0.1)Configuration It is possible to configure Codex node in several ways: 1. [CLI options](#cli-options) @@ -25,9 +25,9 @@ It is possible to configure Codex node in several ways: The order of priority is the same as above: [CLI options](#cli-options) --> [Environment variables](#environment-variables) --> [Configuration file](#configuration-file). -### Common information +### (0.0.1)Common information -#### Units +#### (0.0.1)Units For some configuration options, we can pass values in common units like following: ```shell @@ -38,7 +38,7 @@ For some configuration options, we can pass values in common units like followin --block-ttl=2s/2S/2m/2M/2h/2H/2d/2D/2w/2W ``` -#### Logging +#### (0.0.1)Logging Codex uses [Chronicles](https://github.com/status-im/nim-chronicles) logging library, which allows great flexibility in working with logs. Chronicles has the concept of topics, which categorize log entries into semantic groups. @@ -47,7 +47,7 @@ Using the `log-level` parameter, you can set the top-level log level like `--log you can set log levels for specific topics like `--log-level="info; trace: marketplace,node; error: blockexchange"`, which sets the top-level log level to `info` and then for topics `marketplace` and `node` sets the level to `trace` and so on. -### CLI options +### (0.0.1)CLI options ```shell codex --help @@ -127,7 +127,7 @@ The following options are available: --max-cell-elements The maximum number of elements in a cell [=67]. ``` -### Environment variables +### (0.0.1)Environment variables In order to set a configuration option using environment variables, first find the desired [CLI option](#cli-options) and then transform it in the following way: @@ -141,7 +141,7 @@ For example, to configure `--log-level`, use `CODEX_LOG_LEVEL` as the environmen > [!WARNING] > Some options can't be configured via environment variables for now [^multivalue-env-var] [^sub-commands]. -### Configuration file +### (0.0.1)Configuration file A [TOML](https://toml.io/en/) configuration file can also be used to set configuration values. Configuration option names and corresponding values are placed in the file, separated by `=`. Configuration option names can be obtained from the [`codex --help`](#cli-options) command, and should not include the `--` prefix. For example, a node's log level (`--log-level`) can be configured using TOML as follows: @@ -164,11 +164,11 @@ codex --config-file=/path/to/your/config.toml Please check [Run as a service in Linux](#run-as-a-service-in-linux) for a full example of configuration file. -## Run +## (0.0.1)Run -### Using binary +### (0.0.1)Using binary -#### Codex node +#### (0.0.1)Codex node We can run Codex in a simple way like following: ```shell @@ -189,7 +189,7 @@ codex \ ``` > [!IMPORTANT] -> Make sure you are using a proper value for the [network](/networks/networks) you would like to join. +> Make sure you are using a proper value for the [network](../networks/networks) you would like to join. Also, to make your Codex node accessible for other network participants, it is required to specify a public IP address which can be used to access your node: ```shell @@ -223,7 +223,7 @@ curl -s localhost:8080/api/codex/v1/debug/info | jq -r '.announceAddresses' ] ``` Basically, for P2P communication we should specify and configure two ports: -| # | Protocol | Function | CLI option | Example | +| # (0.0.1)| Protocol | Function | CLI option | Example | | - | -------- | ------------------------------------------------------------------------ | ---------------- | -------------------------------------- | | 1 | UDP | [Discovery](https://docs.libp2p.io/concepts/discovery-routing/overview/) | `--disc-port` | `--disc-port=8090` | | 2 | TCP | [Transport](https://docs.libp2p.io/concepts/transports/overview/) | `--listen-addrs` | `--listen-addrs=/ip4/0.0.0.0/tcp/8070` | @@ -241,13 +241,13 @@ codex \ --api-cors-origin="*" ``` -After node is up and running and port-forwarding configurations was done, we should be able to [Upload a file](/learn/using#upload-a-file)/[Download a file](/learn/using#download-a-file) in the network using [API](/developers/api). +After node is up and running and port-forwarding configurations was done, we should be able to [Upload a file](./using#upload-a-file)/[Download a file](./using#download-a-file) in the network using [API](../developers/api). You also can use [Codex App UI](https://app.codex.storage) for files upload/download. -#### Codex bootstrap node +#### (0.0.1)Codex bootstrap node -If you need an SPR to bootstrap your own node, go to [network](/networks/networks) and select which network you'd like to join. +If you need an SPR to bootstrap your own node, go to [network](../networks/networks) and select which network you'd like to join. Bootstrap nodes are used just to help peers with the initial nodes discovery and we need to run Codex with just some basic options: ```shell @@ -274,7 +274,7 @@ We should keep in mind some important things about SPR record (see [ENR](https:/ For bootstrap node, it is required to forward just discovery port on your Internet router. -### Run as a service in Linux +### (0.0.1)Run as a service in Linux We can run Codex as a service via [systemd](https://systemd.io) using following steps @@ -288,9 +288,9 @@ We can run Codex as a service via [systemd](https://systemd.io) using following ``` In case you would like to run commands using a created user, you could do it like following `sudo -u codex ls -la /opt/codex`. - 2. Install Codex [using a script](https://github.com/codex-storage/get-codex) or [build from sources](/learn/build) + 2. Install Codex [using a script](https://github.com/codex-storage/get-codex) or [build from sources](./build) ```shell - # codex with cirdl + # (0.0.1)codex with cirdl curl -s https://get.codex.storage/install.sh | INSTALL_DIR=/usr/local/bin CIRDL=true bash ``` @@ -324,7 +324,7 @@ We can run Codex as a service via [systemd](https://systemd.io) using following log-level = "info" ``` - Make sure to use bootstrap nodes for the [network](/networks/networks) you would like to join, update `nat` variable with a node Public IP and adjust other settings by your needs. + Make sure to use bootstrap nodes for the [network](../networks/networks) you would like to join, update `nat` variable with a node Public IP and adjust other settings by your needs. 5. Change folders ownership and permissions ```shell @@ -392,15 +392,15 @@ We can run Codex as a service via [systemd](https://systemd.io) using following tail -f /opt/codex/logs/codex.log ``` -### Run as a service in Windows +### (0.0.1)Run as a service in Windows This functionality is not supported yet :construction: -### Using Docker +### (0.0.1)Using Docker We also ship Codex in Docker containers, which can be run on `amd64` and `arm64` platforms. -#### Docker entrypoint +#### (0.0.1)Docker entrypoint [Docker entrypoint](https://github.com/codex-storage/nim-codex/blob/master/docker/docker-entrypoint.sh), supports some additional options, which can be used for easier configuration: @@ -412,7 +412,7 @@ We also ship Codex in Docker containers, which can be run on `amd64` and `arm64` - `NETWORK` - is a helper variable to simply a specific network join. It helps to automate `BOOTSTRAP_NODE_FROM_URL` variable. - `BOOTSTRAP_NODE_FROM_URL` - can be used to pass SPR nodes from an URL like [spr.codex.storage/testnet](https://spr.codex.storage/testnet). -#### Docker network +#### (0.0.1)Docker network When we are running Codex using Docker with default [bridge network](https://docs.docker.com/engine/network/drivers/bridge/), it will create a double NAT: - One on the Docker side @@ -425,7 +425,7 @@ In that case, we should consider the following solutions: - Run [Using binary](#using-binary) - Use VM/VPS in the Cloud to run Docker with bridge or host network -#### Run using Docker +#### (0.0.1)Run using Docker And we basically can use same options we [used for binary](#using-binary) and additionally it is required to mount volumes and map the ports. @@ -450,9 +450,9 @@ docker run \ ``` > [!NOTE] -> You would need to pass a bootstrap nodes based on the [network](/networks/networks) you would like to join. +> You would need to pass a bootstrap nodes based on the [network](../networks/networks) you would like to join. -### Using Docker Compose +### (0.0.1)Using Docker Compose For Docker Compose, it is more suitable to use [environment variables](#environment-variables) for Codex configuration and we can reuse commands from example above, for Docker. @@ -480,9 +480,9 @@ For Docker Compose, it is more suitable to use [environment variables](#environm - CODEX_API_PORT=8080 - CODEX_API_BINDADDR=0.0.0.0 ports: - - 8080:8080/tcp # API - - 8090:8090/udp # Discovery - - 8070:8070/tcp # Transport + - 8080:8080/tcp # (0.0.1)API + - 8090:8090/udp # (0.0.1)Discovery + - 8070:8070/tcp # (0.0.1)Transport volumes: - ./datadir:/datadir logging: @@ -498,15 +498,15 @@ For Docker Compose, it is more suitable to use [environment variables](#environm ``` > [!NOTE] -> You would need to pass a bootstrap nodes based on the [network](/networks/networks) you would like to join. +> You would need to pass a bootstrap nodes based on the [network](../networks/networks) you would like to join. -### On Kubernetes +### (0.0.1)On Kubernetes Helm chart code is available in [helm-charts](https://github.com/codex-storage/helm-charts) repository, but chart was not published yet. -## How-tos +## (0.0.1)How-tos -### NAT Configuration +### (0.0.1)NAT Configuration Use the `--nat` CLI flag to specify how your codex node should handle NAT traversal. Below are the available options: @@ -518,7 +518,7 @@ Use the `--nat` CLI flag to specify how your codex node should handle NAT traver **extIP:[Your Public IP]**:Use this option if you want to manually specify an external IP address and port for the announce address. When selecting this option, you'll need to configure **port forwarding** on your router to ensure that incoming traffic is directed to the correct internal IP and port. -### Port Forwarding +### (0.0.1)Port Forwarding If you're running on a private network, you'll need to set up port forwarding to ensure seamless communication between the codex node and its peers. It's also recommended to configure appropriate firewall rules for TCP and UDP traffic. While the specific steps required vary based on your router, they can be summarised as follows: @@ -537,7 +537,7 @@ While the specific steps required vary based on your router, they can be summari - Protocol: TCP - IP Address: Your device's private IP address -#### Determine your private IP +#### (0.0.1)Determine your private IP To determine your private IP address, run the appropriate command for your OS: @@ -556,7 +556,7 @@ ipconfig | findstr /i "IPv4 Address" ifconfig | grep "inet " | grep -v 127.0.0.1 ``` -## Known issues +## (0.0.1)Known issues [^multivalue-env-var]: Environment variables like `CODEX_BOOTSTRAP_NODE` and `CODEX_LISTEN_ADDRS` does not support multiple values. Please check [[Feature request] Support multiple SPR records via environment variable #525](https://github.com/codex-storage/nim-codex/issues/525), for more information. [^sub-commands]: Sub-commands `persistence` and `persistence prover` can't be set via environment variables. diff --git a/learn/tokenomics-litepaper.md b/versions/0.0.1/learn/tokenomics-litepaper.md similarity index 93% rename from learn/tokenomics-litepaper.md rename to versions/0.0.1/learn/tokenomics-litepaper.md index 1c6973a..bc9fb11 100644 --- a/learn/tokenomics-litepaper.md +++ b/versions/0.0.1/learn/tokenomics-litepaper.md @@ -1,11 +1,11 @@ --- outline: [1, 3] --- -# Codex Tokenomics Litepaper - Testnet Version +# (0.0.1)Codex Tokenomics Litepaper - Testnet Version **Codex: A Decentralized Storage Protocol for Durable Information** -# Legal Notices +# (0.0.1)Legal Notices *The information contained in this document is intended to be made available for informational purposes only and does not constitute a prospectus, nor an offer to buy, a solicitation or an invitation to buy, or a recommendation for any token or any security. Neither this document nor any of its content should be considered as creating any expectations or forming the basis of any contract, commitment or binding obligation. No information herein should be considered to contain or be relied upon as a promise, representation, warranty or guarantee, whether express or implied and whether as to the past, present or the future in relation to the projects and matters described herein. The information presented is a summary and does not purport to be accurate, reliable or complete. This document is under continuous legal review and may be amended or supplemented at any time without prior notice.  No responsibility will be borne for the accuracy, reliability or completeness of information contained herein. Because of the high degree of risk and uncertainty described above, undue reliance should not be placed by anyone on any matters described in this document. Any tokens referenced in this document have not been registered under any securities laws and may not be offered or sold in any jurisdiction where such offer or sale would be prohibited.* @@ -13,13 +13,13 @@ outline: [1, 3] *The information contained in this document does not constitute financial, legal, tax, investment, professional or other advice and should not be treated as such.* -# Overview +# (0.0.1)Overview -## Scope +## (0.0.1)Scope This document describes the Codex Tokenomics with elements that reflect the Testnet deployment of the Codex Protocol. -## What Codex Does +## (0.0.1)What Codex Does Codex is a state-of-the-art decentralized storage platform that offers a novel solution that enhances data durability guarantees for storing vast amounts of data while eliminating any reliance on centralized institutions that could lead to a single point of failure. @@ -27,7 +27,7 @@ While centralized storage systems such as Google Cloud tout eleven nines of dura While no system can guarantee absolute protection against data loss, through its technical architecture, economic incentives, and algorithmic encoding, Codex is designed to provide highly decentralized data storage with high durability, resiliency to cloud failures, and resistance to censorship. -## How Codex Works +## (0.0.1)How Codex Works Codex operates as a network of storage nodes, referred to herein as **Storage Providers** (SP), that store user data for the duration of a contract entered into by SPs and storage users, referred to herein simply as **Clients**. @@ -45,17 +45,17 @@ Codex is thus designed such that rational behavior for **SPs** consists of stori While Codex’s tech maximizes recoverability and durability in the event of partial data loss, Codex’s economic incentives coordinate rational actors to provide a stable and predictable environment for data storage users. At the heart of these economic incentives is the Codex utility token (CDX), which serves as the collateral to protect file durability and facilitate slot repair, and the means of payment to coordinate successful storage contracts. -# Contract Lifecycle +# (0.0.1)Contract Lifecycle The marketplace coordinates matching **Clients** who want to pay for storing files with **Storage Providers** who are offering storage space and posting collateral in order to earn payments for the contract. -## Contract Request Initiation +## (0.0.1)Contract Request Initiation As a design principle, **Clients** should post the deal terms they are looking for, and Storage Providers prioritize which deals meet their criteria and pose the best deals to take. When the contract request is created, the **Client** deposits the full price of the length of the contract at that time. This deposit acts as a spam prevention mechanism and ensures that **SP** time and resources are not wasted filling slots for deals that a **Client** does not complete payment for. -## Storage Providers Fill Requests +## (0.0.1)Storage Providers Fill Requests Ahead of matching with storage contracts, **Storage Providers** specify their aggregate availabilities for new contracts. @@ -67,7 +67,7 @@ If a **SP** matches with a storage contract and they're eligible to reserve a sl Note that a slot is not considered confirmed as filled until after an **SP** both posts associated collateral and produces a proof for the slot. -## Contract Expires Before Beginning +## (0.0.1)Contract Expires Before Beginning If there are still empty slots when the timeout/expiry for the contract request expires, the deal is terminated. @@ -75,7 +75,7 @@ The **Storage Providers** who did fill slots, if any, are compensated for the am As there is a high probability of having at least a few slots occupied, there should be no need for further penalties on the **Client** to prevent spam requests and incentivise **Clients** to submit attractive deals. -## Contract Begins +## (0.0.1)Contract Begins The contract begins if *all* slots are occupied, that is, **SPs** have downloaded the data, posted collateral, and posted proofs before the timeout/expiry for the contract request is reached. @@ -83,23 +83,23 @@ At this moment, a *protocol fee* is applied on the user’s deposit. The proceed The remaining of the client’s deposit is held by the protocol and will be used to pay **SPs** at the end of the contract. -## Contract is Running +## (0.0.1)Contract is Running **Storage Providers** must submit proofs to **Validators** according to the storage request’s proof frequency, a parameter set by the Client in the request. -### Missing Proofs +### (0.0.1)Missing Proofs If an **SP** fails to submit proofs within the rolling last periods, they are partially slashed. The penalty is a fixed percentage of the collateral. Upon provision of a proof after being partially slashed, the SP should top up the missing collateral. Should the SP be slashed enough times, their entire collateral will be slashed and confiscated, and the SP is considered to have abandoned its slot. The provision of a correct proof at this moment will not revert the start of the slot recovery mechanism. -## A Slot in the Contract is Abandoned +## (0.0.1)A Slot in the Contract is Abandoned When an **SP** fails to submit enough proofs such that they are slashed enough times, their slot is considered abandoned. In order to incentivize a new **SP** to come in and takeover the abandoned slot (slot recovery), 50% of the collateral confiscated from the **SP** which has abandoned the slot is used as an incentive to the new **SP**. The remaining confiscated collateral is burned. This helps align the economic incentive for **SPs** to take over abandoned slots before filling new deals, since they can effectively earn forfeited collateral for taking over and fulfilling abandoned slots. -## Contract Defaults +## (0.0.1)Contract Defaults If, at any time during the life of the storage contract, the number of slots currently in an abandoned state (not yet recovered), meets or exceeds the maximum number of storage slots that can be lost before the data is unrecoverable, then the entire storage deal is considered to be in a *failed* state. @@ -107,7 +107,7 @@ Each **Storage Providers** posted collateral is burned. This incentivizes **SPs* Clients also receive back any leftover from their original payment. -## Contract Ends Its Full Duration +## (0.0.1)Contract Ends Its Full Duration When a started contract reaches its pre-specified duration without having previously defaulted, the contract completes. @@ -115,13 +115,13 @@ All collateral is returned to **SPs t**hat currently fill the slots (note due to Deals can not be automatically rolled forward or extended. If a **Client** desires to continue a deal, they must create a new storage contract request. Otherwise, Clients can retrieve their data. -# CDX Testnet Tokenomics +# (0.0.1)CDX Testnet Tokenomics The CDX token does not exist in the Testnet Phase. The description below refers to the mechanics of a Testnet token and not CDX itself and will be referred to as *CDX (Testnet token)* for this purpose. For the avoidance of doubt, the *CDX (Testnet token)* are virtual items with no value of any kind and they are not convertible to any other currency, token, or any other form of property. They are solely intended to be utilised for the purposes of enabling the tokenomics and facilitating the different roles in this Testnet Phase. -## Roles +## (0.0.1)Roles The Codex protocol has two primary roles fulfilled by network participants. @@ -129,7 +129,7 @@ The Codex protocol has two primary roles fulfilled by network participants. - **Storage Providers**: post *CDX (Testnet token)* collateral to enter into storage contracts with Clients in exchange for a *CDX (Testnet token)* denominated payment. - **Validators**: post *CDX (Testnet token)* collateral to validate storage proofs in exchange for a *CDX (Testnet token)* denominated payment. -## Token Utility +## (0.0.1)Token Utility The *CDX (Testnet token)* is used as both a form of posted collateral and a means of payment in order to secure the network and access its services. @@ -137,26 +137,26 @@ Collateral is primarily used as a spam and sybil-attack prevention mechanism, li Payments are made by Clients to Providers for services rendered, such as for storing data for a certain amount of time or retrieving data. This is implemented through the Marketplace contract, which serves as an escrow. Data in a storage contract is distributed into slots where each is, ideally, hosted by a different Storage Provider. -### **For Clients** +### (0.0.1)**For Clients** - Pay storage costs and fees in *CDX (Testnet token)* for storing files. -### **For Storage Providers** +### (0.0.1)**For Storage Providers** - Post collateral in *CDX (Testnet token)* when committing to new storage contracts. This collateral is slashed if they do not fulfill their agreed upon services. - Earn *CDX (Testnet token)* from the collateral of slashed Storage Providers by participating in the slot recovery mechanism. - Earn *CDX (Testnet token)* from Clients when successfully completing the storage service. -### For Validators +### (0.0.1)For Validators - Post collateral in *CDX (Testnet token)* to operate the validation service. This collateral is slashed if they do not mark a proof as missing within a predetermined period. - Earn *CDX (Testnet token)* from the collateral of slashed Storage Providers by marking proofs as missed Figure below depicts the flow of the *CDX (Testnet token)* token within the system. -![Flow of the *CDX token within the system](/learn/tokenomics-token-flow.png) +![Flow of the *CDX token within the system](/public/learn/tokenomics-token-flow.png) -## Value Capture and Accrual Mechanisms +## (0.0.1)Value Capture and Accrual Mechanisms Codex creates *value* to participants: @@ -170,7 +170,7 @@ Storage Providers and Validators are rewarded in *CDX (Testnet token)* token and The following mechanisms describe how the value accrues to the *CDX (Testnet token)* token. -### Protocol Fee over Contracts +### (0.0.1)Protocol Fee over Contracts If the contract is canceled before it starts, Client's deposited amount is charged a small penalty and returned, aiding to prevent low quality spam deal requests. @@ -178,9 +178,9 @@ If the contract successfully initiates, the protocol collects a fee for facilita The collected fees are burned in both cases. This creates a small but constant deflationary force on the token supply, which is proportional to the product demand. -## Behavior & Motivations +## (0.0.1)Behavior & Motivations -### Clients +### (0.0.1)Clients Clients have the following rational behavior: @@ -194,7 +194,7 @@ They may also exhibit the following adversarial behavior, whether for profit dri - Requesting storage from the network but not releasing the data to specific Providers - Attacking SPs that host their data to attempt to relieve their payment obligations at the end of the contract. -### **Storage Providers** +### (0.0.1)**Storage Providers** Storage Providers have the following rational behavior: @@ -209,7 +209,7 @@ They may also exhibit the following adversarial behavior, whether for profit dri - Ceasing to provide proofs mid the lifespan of a contract - Producing proofs, but not making data available for other nodes to retrieve -### Validators +### (0.0.1)Validators Validators have the following rational behavior: @@ -222,51 +222,51 @@ They may also exhibit the following adversarial behavior, whether for profit dri - Colluding with SPs to ignore missed proofs - Observing a missed proof but do not post it onchain -## Incentive Mechanisms +## (0.0.1)Incentive Mechanisms The following mechanisms help incentivize the expected behavior of each role and mitigate the detrimental ones. -### Clients Provide Full Payment Upfront +### (0.0.1)Clients Provide Full Payment Upfront Clients must deposit the full amount in *CDX (Testnet token)* that covers the entirety of the storage contract duration upfront. This indicates their pledge to pay a certain amount for the storage contract, though the contract only begins when and if all data slots are filled by Storage Providers. -### Delayed Payment to Storage Providers +### (0.0.1)Delayed Payment to Storage Providers Storage Providers only receive payment related to the provision of services at the end of the contract duration. -### Collateral Requirement +### (0.0.1)Collateral Requirement In order to fill a data slot, Storage Providers first stake and commit the required collateral in the form of the *CDX (Testnet token)* for that slot which is then subject to slashing if they do not post a proof to confirm the slot. Validators also need to post collateral to participate in the validation service. -### Proof of Storage +### (0.0.1)Proof of Storage Contracts only start when all data slots are filled. Slots are only considered filled after a Storage Provider has posted collateral and the associated proof for its slot. Once the contract begins, Storage Providers regularly provide proof of storage. -### **Slashing for Missed Proofs of Storage** +### (0.0.1)**Slashing for Missed Proofs of Storage** At any point during the duration of the storage contract, the storage provider is slashed if it fails to provide a certain number of proof of storage in a row. Should the SP resume providing proof of storage, it needs to top up the slashed collateral. The penalty is a fixed percentage of the total collateral. -### Slot Recovery Mechanism +### (0.0.1)Slot Recovery Mechanism If a Storage Provider does not submit the required storage proofs when required, after a number of slashings their entire collateral will be seized. A portion of the confiscated collateral is used as an incentive for the new Storage Provider who recovers and starts serving the abandoned slot. The remainder of the confiscated collateral in *CDX (Testnet token)* is burned. -### Slashing Defaulted Contract +### (0.0.1)Slashing Defaulted Contract If, at any point during the duration of the storage contract, the number of data slots currently abandoned (and not yet recovered) reaches or surpasses the maximum allowable lost slots (meaning the data becomes irretrievable), then the entire storage contract is deemed to be *failed*. At this stage, collaterals of all Storage Providers serving data slots in the contract are entirely slashed. -### Client Reimbursement +### (0.0.1)Client Reimbursement If at any point during the contract, sufficient slots are abandoned such that the data is not fully recoverable, Clients receive back any leftover from their original payment. -## Token Lifecycle +## (0.0.1)Token Lifecycle -### Burning +### (0.0.1)Burning *CDX (Testnet token)* tokens are burned in these instances: diff --git a/learn/troubleshoot.md b/versions/0.0.1/learn/troubleshoot.md similarity index 92% rename from learn/troubleshoot.md rename to versions/0.0.1/learn/troubleshoot.md index d4632d7..92a3aa4 100644 --- a/learn/troubleshoot.md +++ b/versions/0.0.1/learn/troubleshoot.md @@ -1,18 +1,18 @@ --- outline: [2, 3] --- -# Troubleshoot +# (0.0.1)Troubleshoot Having trouble getting your Codex node connected? Here's a list of common Codex connection conundrums and steps to diagnose and solve them. If your troubles are not addressed here, check our open issues on Github or reach out via our Discord server. -## Some basics +## (0.0.1)Some basics You've probably already considered these. But just in case: 1. Are you using a VPN? Make sure it's configured correctly to forward the right ports, and make sure you announce your node by the public IP address where you can be reached. 1. Are you using a firewall or other security software? Make sure it's configured to allow incoming connections to Codex's discovery and peer-to-peer ports. -## Check your announce address +## (0.0.1)Check your announce address Your node announces your public address to the network, so other nodes can connect to you. A common issue is connection failure due to incorrect announce addresses. Follow these steps to check your announce address. @@ -20,7 +20,7 @@ Your node announces your public address to the network, so other nodes can conne 1. Go into your router/modem WAN settings and find the public IP address. 1. These two addresses should match. 1. If they do not, it's possible that A) you're behind a VPN. In this case, it's up to you to disable the VPN or make sure all forwarding is configured correctly. or B) Your internet-service-provider has placed your uplink behind a secondary NAT. ISPs do this to save public IP addresses. The address assigned to your router/moderm is not a 'true' public internet address. Usually this issue can be solved by your ISP. Contact customer support and ask them to give you a public address (sometimes also called Dynamic IP address). -1. Call Codex's debug/info endpoint. See the [Using Codex](/learn/using) for the details. +1. Call Codex's debug/info endpoint. See the [Using Codex](../learn/using) for the details. 1. In the JSON response, you'll find "announceAddresses". 1. The IP address listed there should match your public IP. 1. If the announce address in the JSON is incorrect, you can adjust it manually by changing Codex's CLI argument `--nat` or setting the environment variable `CODEX_NAT`. After you've changed your announce address and restarted your node, please allow some time (20-30mins) for the network to disseminate the updated address. diff --git a/learn/using.md b/versions/0.0.1/learn/using.md similarity index 73% rename from learn/using.md rename to versions/0.0.1/learn/using.md index 5e9cbd1..80137c0 100644 --- a/learn/using.md +++ b/versions/0.0.1/learn/using.md @@ -1,23 +1,23 @@ --- outline: [2, 3] --- -# Using Codex +# (0.0.1)Using Codex -We can interact with Codex using [REST API](/developers/api). This document will show you several useful examples. +We can interact with Codex using [REST API](../developers/api). This document will show you several useful examples. Also, we can check [Codex App UI](https://app.codex.storage). Command line interpreter on [Linux/macOS](#linux-macos) and [Windows](#windows) works slightly different, so please use steps for your OS. -## Linux/macOS +## (0.0.1)Linux/macOS -### Overview +### (0.0.1)Overview 1. [Debug](#debug) 2. [Upload a file](#upload-a-file) 3. [Download a file](#download-a-file) 4. [Local data](#local-data) -### Debug +### (0.0.1)Debug An easy way to check that your node is up and running is: ```shell @@ -27,7 +27,7 @@ curl http://localhost:8080/api/codex/v1/debug/info \ This will return a JSON structure with plenty of information about your local node. It contains peer information that may be useful when troubleshooting connection issues. -### Upload a file +### (0.0.1)Upload a file > [!Warning] > Once you upload a file to Codex, other nodes in the network can download it. Please do not upload anything you don't want others to access, or, properly encrypt your data *first*. @@ -42,13 +42,13 @@ curl -X POST \ On successful upload, you'll receive a CID. This can be used to download the file from any node in the network. > [!TIP] -> Are you on the [Codex Discord server](https://discord.gg/codex-storage)? Post your CID in the [# :wireless: | share-cids](https://discord.com/channels/895609329053474826/1278383098102284369) channel, see if others are able to download it. Codex does not (yet?) provide file metadata, so if you want others to be able to open your file, tell them which extension to give it. +> Are you on the [Codex Discord server](https://discord.gg/codex-storage)? Post your CID in the [# (0.0.1):wireless: | share-cids](https://discord.com/channels/895609329053474826/1278383098102284369) channel, see if others are able to download it. Codex does not (yet?) provide file metadata, so if you want others to be able to open your file, tell them which extension to give it. -### Download a file +### (0.0.1)Download a file When you have a CID of data you want to download, you can use the following commands: ```shell -# paste your CID from the previous step here between the quotes +# (0.0.1)paste your CID from the previous step here between the quotes CID="..." ``` @@ -59,7 +59,7 @@ curl "http://localhost:8080/api/codex/v1/data/${CID}/network/stream" \ Please use the correct extension for the downloaded file, because Codex does not store yet content-type or extension information. -### Local data +### (0.0.1)Local data You can view which datasets are currently being stored by your node: ```shell @@ -67,15 +67,15 @@ curl http://localhost:8080/api/codex/v1/data \ -w '\n' ``` -## Windows +## (0.0.1)Windows -### Overview {#overview-windows} +### (0.0.1)Overview {#overview-windows} 1. [Debug](#debug-windows) 2. [Upload a file](#upload-a-file-windows) 3. [Download a file](#download-a-file-windows) 4. [Local data](#local-data-windows) -### Debug {#debug-windows} +### (0.0.1)Debug {#debug-windows} An easy way to check that your node is up and running is: ```batch @@ -84,7 +84,7 @@ curl http://localhost:8080/api/codex/v1/debug/info This will return a JSON structure with plenty of information about your local node. It contains peer information that may be useful when troubleshooting connection issues. -### Upload a file {#upload-a-file-windows} +### (0.0.1)Upload a file {#upload-a-file-windows} > [!Warning] > Once you upload a file to Codex, other nodes in the network can download it. Please do not upload anything you don't want others to access, or, properly encrypt your data *first*. @@ -98,9 +98,9 @@ curl -X POST ^ On successful upload, you'll receive a CID. This can be used to download the file from any node in the network. > [!TIP] -> Are you on the [Codex Discord server](https://discord.gg/codex-storage)? Post your CID in the [# :wireless: | share-cids](https://discord.com/channels/895609329053474826/1278383098102284369) channel, see if others are able to download it. Codex does not (yet?) provide file metadata, so if you want others to be able to open your file, tell them which extension to give it. +> Are you on the [Codex Discord server](https://discord.gg/codex-storage)? Post your CID in the [# (0.0.1):wireless: | share-cids](https://discord.com/channels/895609329053474826/1278383098102284369) channel, see if others are able to download it. Codex does not (yet?) provide file metadata, so if you want others to be able to open your file, tell them which extension to give it. -### Download a file {#download-a-file-windows} +### (0.0.1)Download a file {#download-a-file-windows} When you have a CID of data you want to download, you can use the following commands: ```batch @@ -115,12 +115,12 @@ curl "http://localhost:8080/api/codex/v1/data/%CID%/network/stream" ^ Please use the correct extension for the downloaded file, because Codex does not store yet content-type or extension information. -### Local data {#local-data-windows} +### (0.0.1)Local data {#local-data-windows} You can view which datasets are currently being stored by your node: ```batch curl http://localhost:8080/api/codex/v1/data ``` -## Known issues +## (0.0.1)Known issues 1. We add a new line to the API calls to get more readable output, please check [[rest] Add line ending on responses #771](https://github.com/codex-storage/nim-codex/issues/771) for more details. diff --git a/learn/what-is-codex.md b/versions/0.0.1/learn/what-is-codex.md similarity index 96% rename from learn/what-is-codex.md rename to versions/0.0.1/learn/what-is-codex.md index d8096fd..b355176 100644 --- a/learn/what-is-codex.md +++ b/versions/0.0.1/learn/what-is-codex.md @@ -1,4 +1,4 @@ -# What is Codex? +# (0.0.1)What is Codex? Codex is a decentralised data storage protocol. Its primary features are strong censorship resistance and durability guarantees. It has a reference implementation by the same name, written in nim. It serves as the storage layer of the [Logos](https://logos.co/) tech stack. Alongside the trustless agreement layer, [Nomos](http://nomos.tech), and the communications layer, [Waku](http://waku.org), it is one of the Logos Collective's foundational projects. @@ -6,7 +6,7 @@ Codex is a decentralised data storage protocol. Its primary features are strong

-### Motive +### (0.0.1)Motive The remote storage landscape is dominated by an increasingly small number of internet powerhouses—Google, Microsoft, Amazon, etc. While these services score highly in terms of user experience and convenience, centralised cloud data storage suffers from the following drawbacks: @@ -26,7 +26,7 @@ Existing decentralised storage solutions purport to improve upon early P2P file-
-### Decentralising data storage +### (0.0.1)Decentralising data storage Codex began in 2021 to address a need for a durable, decentralised storage layer for the web3 tech stack. @@ -34,6 +34,6 @@ The name "Codex" refers to an ancient form of book—an allusion to the data sto Codex was announced as a core Logos Collective protocol in June 2023. -### Testnet +### (0.0.1)Testnet Codex is currently in the testnet phase. The client implementation is free and open software. If you're interested, we encourage you to try Codex, connect to the testnet and experiment with its features. [Get started here](./quick-start.md) diff --git a/learn/whitepaper.md b/versions/0.0.1/learn/whitepaper.md similarity index 98% rename from learn/whitepaper.md rename to versions/0.0.1/learn/whitepaper.md index 1c15969..44395a5 100644 --- a/learn/whitepaper.md +++ b/versions/0.0.1/learn/whitepaper.md @@ -15,7 +15,7 @@ We describe the architecture and mechanisms of Codex, including its marketplace -## 1. Introduction +## (0.0.1)1. Introduction Data production has been growing at an astounding pace, with significant implications. Data is a critical asset for businesses, driving decision-making, strategic planning, and innovation. Individuals increasingly intertwine their physical lives with the digital world, meticulously documenting every aspect of their lives, taking pictures and videos, sharing their views and perspectives on current events, using digital means for communication and artistic expression, etc. Digital personas have become as important as their physical counterparts, and this tendency is only increasing. Yet, the current trend towards centralization on the web has led to a situation where users have little to no control over their personal data and how it is used. Large corporations collect, analyze, and monetize user data, often without consent or transparency. This lack of privacy leaves individuals vulnerable to targeted advertising, profiling, surveillance, and potential misuse of their personal information. @@ -32,11 +32,11 @@ In response to these challenges, we introduce Codex: a novel Erasure Coded Decen The remainder of this paper is organized as follows. First, we discuss the context on which Codex is built (Sec. 2) by expanding on the issues of centralized cloud storage, and providing background on previous takes at decentralized alternatives -- namely, p2p networks, blockchains, and DSNs. Then, we introduce the conceptual framework that underpins Codex in Sec. 3 -- the Decentralized Durability Engine (DDE) -- followed by a more detailed descriptions of the mechanisms behind Codex and how it materializes as a DDE in Sec. 4. Sec. 5 then presents a preliminary reliability analysis, which places Codex's storage parameters alongside more formal durability guarantees. Finally, Sec. 6 provides conclusions and ongoing work. -## 2. Background and Context +## (0.0.1)2. Background and Context Codex aims at being a useful and decentralized alternative to centralized storage. In this section, we discuss the context in which this needs arises, as well as why past and current approaches to building and reasoning about decentralized storage were incomplete. This will set the stage for our introduction of the Decentralized Durability Engine -- our approach to reasoning about decentralized storage -- in Sec. 3. -### 2.1. Centralized Cloud Storage +### (0.0.1)2.1. Centralized Cloud Storage Over the past two decades, centralized cloud storage has become the _de facto_ approach for storage services on the internet for both individuals and companies alike. Indeed, recent research places the percentage of businesses that rely on at least one cloud provider at $94\%$[^zippia_cloud_report], while most modern smartphones will backup their contents to a cloud storage provider by default. The appeal is clear: scalable, easy-to-use elastic storage and networking coupled with a flexible pay-as-you-go model and a strong focus on durability[^s3_reinvent_19] translating to dependable infrastructure that is available immediately and at the exact scale required. @@ -45,7 +45,7 @@ Centralization, however, carries a long list of downsides, most of them due to h The final downside is economical: since very few companies can currently provide such services at the scale and quality required, the billions in customer spending gets funneled into the pockets of a handful of individuals. Oligopolies such as these can derail into an uncompetitive market which finds its equilibrium at a price point which is not necessarily in the best interest of end-users[^feng_14]. -### 2.2. Decentralized Alternatives: Past and Present +### (0.0.1)2.2. Decentralized Alternatives: Past and Present Given the downsides of centralized cloud storage, it is natural to wonder if there could be alternatives, and indeed those have been extensively researched since the early 2000's. We will not attempt to cover that entire space here, and will instead focus on what we consider to be the three main technological breakthroughs that happened in decentralized systems over these past two decades, and why they have failed to make meaningful inroads thus far: P2P networks, blockchains, and Data Storage Networks (DSNs). @@ -82,7 +82,7 @@ Such elements are of particular importance as one attempts to reason about what In the next section, we explore a construct we name Decentralized Durability Engines which, we argue, lead to a more principled approach to designing storage systems that provide utility. -## 3. Decentralized Durability Engines (DDE) +## (0.0.1)3. Decentralized Durability Engines (DDE) A Decentralized Durability Engine is a tuple $\Gamma = \text{(R, A, P, I, D)}$ where: @@ -96,13 +96,13 @@ We argue that when designing a storage system that can keep data around, none of This is a somewhat informal treatment for now, but the actual parameters that would be input into any reliability analysis of a storage system would be contingent on those choices. In a future publication, we will explore how durability is affected by the choice of each of these elements in a formal framework. -## 4. Codex: A Decentralized Durability Engine +## (0.0.1)4. Codex: A Decentralized Durability Engine This section describes how Codex actually works. The primary motivation behind Codex is to provide a scalable and robust decentralized storage solution which addresses the limitations of existing DSNs. This includes: i) enhanced durability guarantees that can be reasoned about, ii) scalability and performance and iii) decentralization and censorship resistance. We start this section by laying out key concepts required to understand how Codex works (Sec. 4.1). We then discuss the redundancy ($R$), remote auditing ($A$), and repair mechanisms ($P$) of Codex and how they combine erasure codes and zero-knowledge proofs into a system that is lightweight, efficient, and amenable to decentralization. Sec. 4.4 takes a detour onto the networking layer and provides an overview of our scalable data transfer protocols. Finally, incentives ($I$) and dispersal $(D)$ are discussed in Sec. 4.5 as part of the Codex marketplace. -### 4.1. Concepts +### (0.0.1)4.1. Concepts In the context of Codex (and of storage systems in general), two properties appear as fundamental: @@ -126,7 +126,7 @@ Ideally, we would like storage systems to be highly available and highly durable **Storage Provider (SP).** A Storage Provider is a node that participates in Codex by selling disk space to other nodes. -### 4.2. Overview +### (0.0.1)4.2. Overview At a high level, storing data in Codex works as follows. Whenever a SC wishes to store a dataset $D$ into Codex, it: @@ -144,7 +144,7 @@ The Codex marketplace (Sec. 4.5) then ensures that SPs willing to store data for Once this process completes, we say that slot $S_i$ has been **filled**. Once all slots in $D_e$ have been filled, we say that $D_e$ has been **fulfilled**. For the remainder of this section, we will dive into the architecture and mechanisms of Codex by explaining in more detail each aspect of the storage flow. -### 4.3. Erasure Coding, Repair, and Storage Proofs +### (0.0.1)4.3. Erasure Coding, Repair, and Storage Proofs Erasure coding plays two main roles in Codex: _i)_ allowing data to be recovered following loss of one or more SPs and the slots that they hold (redundancy) and _ii)_ enabling cost-effective proofs of storage. We will go through each of these aspects separately. @@ -234,7 +234,7 @@ A key aspect of the Codex proving system is that it attempts to be as lightweigh 1. both non-storage hardware; e.g. CPUs and RAM, and electricity overhead costs for proofs should be small. This leads to better margins for SPs; 2. minimal requirements are modest, which favours decentralization. -### 4.4. Publishing and Retrieving Data +### (0.0.1)4.4. Publishing and Retrieving Data Datasets stored in Codex need to be advertised over a Distributed Hash Table (DHT), which is a flavour of the Kademlia DHT[^maymounkov_02], so they can be located and retrieved by other peers. At a basic level, the Codex DHT maps _Content IDentifiers_ (CIDs)[^cid_spec], which identify data, onto _provider lists_, which identify peers holding that data. @@ -275,7 +275,7 @@ The nodes responsible for that CID will reply with a (randomized) subset of the Codex right now relies on simple incentive mechanisms to ensure that peers share blocks. There is current ongoing work on _bandwidth incentives_ and, in future versions, peers will be able to purchase block transfers from each other. -### 4.5. Codex Marketplace +### (0.0.1)4.5. Codex Marketplace The Codex marketplace is the set of components that run both on-chain, as smart contracts, and off-chain, as part of both SCs and SPs. Its main goal is to define and enforce the set of rules which together enable: _i)_ orderly selling and purchasing of storage; _ii)_ verification of storage proofs; _iii)_ rules for penalizing faulty actors (slashing) and compensating SP repairs and SC data loss; and _iv)_ various other aspects of the system's economics, which will be discussed as part of an upcoming Codex tokenomics litepaper. @@ -327,7 +327,7 @@ $$ where $t = 0$ at the moment in which the storage request for $a$ is published. In the example in Figure 8, host $b$ will be allowed to fill slot $a$ when $t \geq 2$, whereas host $c$ will only be allowed to try once $t \geq 3$. We will not attempt to formally prove this but, under relatively weak assumptions, this guarantees that the assignments of slots to SPs happens approximately uniformly at random. -## 5. Reliability Analysis +## (0.0.1)5. Reliability Analysis In this section, we provide an initial analysis of durability for Codex. The main goal is investigating the values for $p_{\text{loss}}$, our probability of losing data over a 1-year period. In particular, we are interested in understanding what sorts of parameters are required for us to obtain very high levels of reliability (e.g. $p_{\text{loss}} = 10^{-9}$, or nine nines of availability). @@ -343,7 +343,7 @@ Before discussing the state space and the rate matix of the CTMC model, lets des As before, we assume a dataset $D$ split into $k$ disjoint partitions, and encoded into a new dataset $D_e$ with $n=k+m$ slots $\{S_1, \cdots, S_k , \cdots, S_{k+m}\}$. This encoding is often characterized by it's code expansion factor $e = n/k =1+m/k$, expressing the storage overhead due to code redundancy. -### 5.1. Failure Model +### (0.0.1)5.1. Failure Model When discussing failures, we should differentiate between transient and permanent failures, as well as between catastrophic node failures (the slot data is entirely lost) and partial failures. @@ -357,7 +357,7 @@ For the sake of modeling, we also assume i.i.d. (independent and identically dis There might also be malicious nodes in the set of storage providers, e.g. withholding data when reconstruction would be required. Again, we will extend the model to these in a separate document. -### 5.2. Reconstruction Model +### (0.0.1)5.2. Reconstruction Model The next important time related parameter of the model is **MTTR** (Mean Time To Reconstruct). While we model events at the level of a single dataset, it is important to note here that a failure event most probably involves entire disks or entire nodes with multiple disks, with many datasets and a large amount of data. Therefore, in the case of reconstruction, the stochastic processes of individual datasets are not independent of each other, leading to higher and uncertain reconstruction times. @@ -370,7 +370,7 @@ The actual repair time depends on a number of factors: Overall, it is clearly not easy to come up with a reasonable distribution for the time of repair, not even the mean time of repair. While time to repair is most probably not an exponential distribution, we model it as such in a first approximation to allow Markov Chain based modeling. -### 5.3. Triggering Reconstruction +### (0.0.1)5.3. Triggering Reconstruction Reconstruction and re-allocation of slots can be triggered by the observed state, and our system "observes" state through the proving process. In our model, we assume that nodes are providing proofs according to a random process with an exponential distribution between proving times, with **MTBF** (Mean Time Between Proofs) mean, i.i.d. between nodes. Other distributions are also possible, but for the sake of modelling we start with an exponential distribution, which is also simple to implement in practice. @@ -384,7 +384,7 @@ In our model, we assume reconstruction that uses a combination of the above two Other reconstruction strategies, such as considering all the proofs from all the slots in a time window, are also possible, but we leave these for further study. -### 5.4. CTMC Model +### (0.0.1)5.4. CTMC Model We model the system using a CTMC with a multi-dimensional state space representing slot status and proof progress. To keep the description simple, we introduce the model for the case of $l_1 = 1$ here. An extension to $l_1 > 1$ is possible by increasing the dimensions of the state space to $1+l_1$. @@ -425,7 +425,7 @@ The figure also shows what $k$ and $m$ values are needed to reach a given reliab **Table 1.** Expansion, lazy repair, and required values for $k$ and $m$ to achieve $p_{\text{loss}} = 10^{-9}$ -### 5.5 Proving frequency +### (0.0.1)5.5 Proving frequency An important parameter to asses is the frequency of proofs, expressed in our model as MTBP, since it directly translates into proof generation and proof submission costs. If we could double MTBP, we could halve the associated costs. @@ -442,7 +442,7 @@ As expected, large values of MTBP (infrequent proofs) are not acceptable, the da Note however that we are still using $l_1=1$ in our model, i.e. a slot is considered lost after a single failed proof. We consider this to be too reactive, since single proofs might be missed due to temporary failures. Without going into much detail, a higher tolerance on missed proofs ($l_1 > 1$) is similar to multiplying MTBF by $l_1$ (although the model becomes more complex, with an $l_1 +1$ dimensional state space). -## 6. Conclusions and Future Work +## (0.0.1)6. Conclusions and Future Work We have presented Codex, a Decentralized Durability Engine which employs erasure coding and efficient proofs of storage to provide tunable durability guarantees and a favourable tradeoff in cost and complexity for storage providers. By having proofs that are lightweight, Codex can keep the overhead spendings on hardware and electricity to a minimal. This is important both for fostering participation, as storage provider margins can be increased while prices for clients can decrease, and decentralization, as modest requirements are more likely to encourage a more diverse set of participants ranging from hobbyist home providers to larger players. @@ -463,7 +463,7 @@ Codex has the potential to support a wide range of use cases, from personal data Ultimately, the use case for Codex is that of a durable and functional decentralized storage layer, without which no decentralized technology stack can be seriously contemplated. As the decentralized ecosystem continues to evolve, we expect Codex’s DDE-based approach to storage to play a crucial role in enabling new types of applications and services that prioritize user control, privacy, and resilience. -## References +## (0.0.1)References [^tanembaum]: A. S. Tanenbaum and M. van Steen, Distributed Systems: Principles and Paradigms, 2nd ed. Upper Saddle River, NJ, USA: Pearson Education, 2007. diff --git a/networks/devnet.md b/versions/0.0.1/networks/devnet.md similarity index 88% rename from networks/devnet.md rename to versions/0.0.1/networks/devnet.md index cc8224f..b9e256a 100644 --- a/networks/devnet.md +++ b/versions/0.0.1/networks/devnet.md @@ -1,7 +1,7 @@ --- outline: [2, 4] --- -# Codex Devnet +# (0.0.1)Codex Devnet The Codex devnet is under construction :building_construction: diff --git a/networks/networks.md b/versions/0.0.1/networks/networks.md similarity index 53% rename from networks/networks.md rename to versions/0.0.1/networks/networks.md index ba171cd..d6a9864 100644 --- a/networks/networks.md +++ b/versions/0.0.1/networks/networks.md @@ -1,7 +1,7 @@ -# Codex networks +# (0.0.1)Codex networks At Codex, we will be launching both a devnet and a testnet. | Network | Status | Purpose | | ------------------ | -------------- | ----------------------------------------------------------------------- | - | [Devnet](devnet) | :construction: | Dedicated for development purposes and following latest `master` builds | - | [Testnet](testnet) | :construction: | A public network for testing purposes, following latest releases | + | [Devnet](./devnet) | :construction: | Dedicated for development purposes and following latest `master` builds | + | [Testnet](./testnet) | :construction: | A public network for testing purposes, following latest releases | diff --git a/networks/testnet.md b/versions/0.0.1/networks/testnet.md similarity index 92% rename from networks/testnet.md rename to versions/0.0.1/networks/testnet.md index d6ebfbb..cf5023d 100644 --- a/networks/testnet.md +++ b/versions/0.0.1/networks/testnet.md @@ -1,7 +1,7 @@ --- outline: [2, 4] --- -# Codex Testnet +# (0.0.1)Codex Testnet The Codex testnet is under construction :building_construction: diff --git a/versions/0.0.1/sidebar.json b/versions/0.0.1/sidebar.json new file mode 100644 index 0000000..10e1e81 --- /dev/null +++ b/versions/0.0.1/sidebar.json @@ -0,0 +1,122 @@ +{ + "/": [ + { + "text": "0.0.1 Introduction", + "collapsed": false, + "items": [ + { + "text": "0.0.1 What is Codex?", + "link": "/learn/what-is-codex" + }, + { + "text": "0.0.1 Architecture", + "link": "/learn/architecture" + }, + { + "text": "0.0.1 Whitepaper", + "link": "/learn/whitepaper" + }, + { + "text": "0.0.1 Tokenomics Litepaper", + "link": "/learn/tokenomics-litepaper" + } + ] + }, + { + "text": "0.0.1 Setup Codex with Installer", + "collapsed": false, + "items": [ + { + "text": "0.0.1 Disclaimer", + "link": "/codex/installer-disclaimer" + }, + { + "text": "0.0.1 Requirements", + "link": "/learn/installer/requirements" + }, + { + "text": "0.0.1 Install and Run Codex", + "link": "/learn/installer/install-and-run" + }, + { + "text": "0.0.1 Upload/Download", + "link": "/learn/installer/upload-and-download" + } + ] + }, + { + "text": "0.0.1 Setup Codex Manually", + "collapsed": false, + "items": [ + { + "text": "0.0.1 Disclaimer", + "link": "/codex/disclaimer" + }, + { + "text": "0.0.1 Quick start", + "link": "/learn/quick-start" + }, + { + "text": "0.0.1 Build Codex", + "link": "/learn/build" + }, + { + "text": "0.0.1 Run Codex", + "link": "/learn/run" + }, + { + "text": "0.0.1 Using Codex", + "link": "/learn/using" + }, + { + "text": "0.0.1 Local Two Client Test", + "link": "/learn/local-two-client-test" + }, + { + "text": "0.0.1 Local Marketplace", + "link": "/learn/local-marketplace" + }, + { + "text": "0.0.1 Download Flow", + "link": "/learn/download-flow" + }, + { + "text": "0.0.1 Troubleshoot", + "link": "/learn/troubleshoot" + } + ] + }, + { + "text": "0.0.1 Developers", + "collapsed": false, + "items": [ + { + "text": "0.0.1 API", + "link": "/developers/api" + } + ] + }, + { + "text": "0.0.1 Codex", + "collapsed": false, + "items": [ + { + "text": "0.0.1 About", + "link": "/codex/about" + }, + { + "text": "0.0.1 Security", + "link": "/codex/security" + }, + { + "text": "0.0.1 Privacy Policy", + "link": "/codex/privacy-policy" + }, + { + "text": "0.0.1 Terms of Use", + "link": "/codex/terms-of-use" + } + ] + } + ] +} \ No newline at end of file diff --git a/versions/0.1.0/codex/about.md b/versions/0.1.0/codex/about.md new file mode 100644 index 0000000..6fd72eb --- /dev/null +++ b/versions/0.1.0/codex/about.md @@ -0,0 +1,3 @@ +# (0.1.0)About Codex + + Work in progress :construction: diff --git a/versions/0.1.0/codex/disclaimer.md b/versions/0.1.0/codex/disclaimer.md new file mode 100644 index 0000000..045b4a9 --- /dev/null +++ b/versions/0.1.0/codex/disclaimer.md @@ -0,0 +1,5 @@ +# (0.1.0)Disclaimer + +The code and instructions provided within this repository and related repositories are provided “as-is”, without warranty of any kind, express or implied, including but not limited to the safety or correctness, or performance of the code or instructions provided. We make no assurance that the code will work as intended, and users may experience delays, failures, errors, omissions or loss of transmitted information whilst using or running Codex. + +Running Codex is done at your own risk. As such, we are not responsible nor liable for any damage that may occur to your hardware, software, data, or network, or for any loss, claim, damage of whatever nature, or other liability arising from or in connection with the use of the provided code and instructions. diff --git a/codex/installer-disclaimer.md b/versions/0.1.0/codex/installer-disclaimer.md similarity index 93% rename from codex/installer-disclaimer.md rename to versions/0.1.0/codex/installer-disclaimer.md index bce86b7..2afdd70 100644 --- a/codex/installer-disclaimer.md +++ b/versions/0.1.0/codex/installer-disclaimer.md @@ -1,10 +1,10 @@ -# Codex Testnet Privacy Policy +# (0.1.0)Codex Testnet Privacy Policy This Privacy Policy applies exclusively when you access the Codex testnet through the Command Line Interface (CLI) installer provided by us. It is designed to inform you about the personal data we collect and process, our approach to that collection and processing, and your rights when you participate in the Codex Testnet Programme using our CLI installer. For the avoidance of doubt, your participation in the Codex Testnet Programme is subject to the [Codex Testnet Terms and Conditions](https://docs.codex.storage/networks/testnet). Before using the CLI installer to participate in the Codex Testnet Programme, please review this privacy policy carefully. By agreeing to use our CLI installer to participate in the Codex Testnet Programme, you acknowledge that this Privacy Policy is applicable to your use of the testnet through our provided CLI tool. -## Who We Are +## (0.1.0)Who We Are For the purposes of this Privacy Policy and the collection and processing of personal data as a controller, the relevant entity is **IFT Studio Pte Ltd.**, a company duly organised and registered under the laws of Singapore, having its registered office at: @@ -12,17 +12,17 @@ For the purposes of this Privacy Policy and the collection and processing of per Whenever we refer to **“IFT”**, **“we”**, **“us”**, or any other similar references, we are referring to IFT Studio Pte Ltd. -## Data Collection and Processing +## (0.1.0)Data Collection and Processing We limit the collection and processing of personal data from your participation in the Codex Testnet Programme. We only collect and process certain personal data for specific purposes and where we have the legal basis to do so under applicable data protection law, and in this case, with your explicit consent. We will not collect or process any personal data that we don’t need, and where we do store any personal data, we will only store it for the least amount of time needed for the indicated purpose. -### Personal Data We Collect +### (0.1.0)Personal Data We Collect We collect and process the following personal data as a result of your participation in the Codex Testnet Programme: -#### **Wallet Addresses** +#### (0.1.0)**Wallet Addresses** In order to provide you with Codex Testnet tokens and facilitate your participation in the Codex Testnet Programme, we may collect and process two types of blockchain addresses from you. This data processing is necessary for the performance of our contract with you to participate in the testnet. The information we collect includes: @@ -34,7 +34,7 @@ These addresses are collected through our automated CLI installer or can be manu You have the right to withdraw from the Codex testnet at any time, in which case we will cease processing this data. -#### **Node and Network Information** +#### (0.1.0)**Node and Network Information** To improve the future functionality, performance, and security of Codex, we collect and process technical information from users participating in the Codex testnet. We rely on our **legitimate interest** as the legal basis for this data processing activity. The information we collect includes: @@ -55,17 +55,17 @@ While we believe this data processing is necessary and proportionate to our legi We are committed to **data minimization** and **purpose limitation**. After the mainnet launch of Codex, all personal data collected during the testnet phase will be securely deleted. -## Third-Party Processing of Personal Data +## (0.1.0)Third-Party Processing of Personal Data In addition to our limited collection of personal data, **third parties may collect or process your personal data** as part of your participation in the Codex Testnet Programme, particularly when we use their services to facilitate your participation. When you interact with these third parties, **their respective privacy policies will govern** the collection and use of your data. We encourage you to review these privacy policies to understand how your personal data may be handled by these third parties. -## Security Measures We Take +## (0.1.0)Security Measures We Take As a general approach, we take **data security** seriously and have implemented a variety of **security measures** to maintain the safety of your personal data when you submit such information to us. -## Exporting Personal Data Outside Singapore +## (0.1.0)Exporting Personal Data Outside Singapore We are obliged to protect the privacy of personal data that you may have submitted in the unlikely event that we export your personal data outside Singapore. @@ -73,7 +73,7 @@ This means that personal data will only be processed in **countries or by partie In any event, the transmission of personal data outside Singapore will always occur in conformity with applicable data protection laws. -## Your Choices and Rights +## (0.1.0)Your Choices and Rights As explained in this Privacy Policy, we **limit our collection and processing** of your personal data wherever possible. Nonetheless, you still have certain **choices and rights** regarding the personal data we do collect and process. @@ -86,13 +86,13 @@ According to relevant privacy legislation, you have the right to: - **Object to the processing** of your personal data. - **File a complaint** with the Personal Data Protection Committee of Singapore (PDPC) if you believe your personal data has been processed unlawfully. -## This Privacy Policy Might Change +## (0.1.0)This Privacy Policy Might Change We may modify or replace any part of this Privacy Policy **at any time and without notice**. Please check the Privacy Policy periodically for any changes. > **Note:** The new Privacy Policy will be effective **immediately** upon posting. -## Contact Information +## (0.1.0)Contact Information If you have any questions about the Privacy Policy, please contact us at: diff --git a/ko/codex/privacy-policy.md b/versions/0.1.0/codex/privacy-policy.md similarity index 75% rename from ko/codex/privacy-policy.md rename to versions/0.1.0/codex/privacy-policy.md index 02d0110..dc116b7 100644 --- a/ko/codex/privacy-policy.md +++ b/versions/0.1.0/codex/privacy-policy.md @@ -1,13 +1,13 @@ --- lastUpdated: false --- -# 개인정보 처리방침 +# (0.1.0)Privacy Policy -최종 업데이트: 2024년 2월 9일 +Last updated: 9 February 2024 -본 개인정보 처리방침은 이 웹사이트("**웹사이트**")와 관련하여 사용자에게 당사의 개인정보 보호 접근 방식을 알리기 위한 것입니다. 이와 관련하여, 귀하가 당사의 웹사이트를 방문하는 경우 본 개인정보 처리방침이 적용됩니다. +This Privacy Policy is intended to inform users of our approach to privacy in respect of this website (**"Website"**). In this regard, if you are visiting our Website, this Privacy Policy applies to you. -### 1) Who we are +### (0.1.0)1) Who we are For the purposes of this Privacy Policy and the collection and processing of personal data as a controller, the relevant entity is the Logos Collective Association, which has its registered office in Zug and its legal domicile address at @@ -19,29 +19,29 @@ Baarerstrasse 10 Switzerland ``` -Whenever we refer to "Logos", "we" or other similar references, we are referring to the Logos Collective Association. +Whenever we refer to “Logos”, “we” or other similar references, we are referring to the Logos Collective Association. -### 2) We limit the collection and processing of personal data from your use of the Website +### (0.1.0)2) We limit the collection and processing of personal data from your use of the Website -We aim to limit the collection and collection and processing of personal data from users of the Website. We only collect and process certain personal data for specific purposes and where we have the legal basis to do so under applicable privacy legislation. We will not collect or process any personal data that we don't need and where we do store any personal data, we will only store it for the least amount of time needed for the indicated purpose. +We aim to limit the collection and collection and processing of personal data from users of the Website. We only collect and process certain personal data for specific purposes and where we have the legal basis to do so under applicable privacy legislation. We will not collect or process any personal data that we don’t need and where we do store any personal data, we will only store it for the least amount of time needed for the indicated purpose. In this regard, we collect and process the following personal data from your use of the Website: * **IP address**: As part of such use of the Website, we briefly process your IP address but we have no way of identifying you. We however have a legitimate interest in processing such IP addresses to ensure the technical functionality and enhance the security measures of the Website. This IP address is not stored by us over time. -### 3) Third party processing of personal data +### (0.1.0)3) Third party processing of personal data In addition to our limited and collection of personal data, third parties may collect or process personal data as a result of the Website making use of certain features or to provide certain content. To the extent you interact with such third party content or features, their respective privacy policies will apply. -### 4) Security measures we take in respect of the Website +### (0.1.0)4) Security measures we take in respect of the Website As a general approach, we take data security seriously and we have implemented a variety of security measures on the Website to maintain the safety of your personal data when you submit such information to us. -### 5) Exporting data outside the European Union and Switzerland +### (0.1.0)5) Exporting data outside the European Union and Switzerland We are obliged to protect the privacy of personal data that you may have submitted in the unlikely event that we export your personal data to places outside the European Union or Switzerland. This means that personal data will only be processed in countries or by parties that provide an adequate level of protection as deemed by Switzerland or the European Commission. Otherwise, we will use other forms of protections, such as specific forms of contractual clauses to ensure such personal data is provided the same protection as required in Switzerland or Europe. In any event, the transmission of personal data outside the European Union and Switzerland will always occur in conformity with applicable privacy legislation. -### 6) Your choices and rights +### (0.1.0)6) Your choices and rights As explained in this Privacy Policy, we limit our collection and processing of your personal data wherever possible. Nonetheless, you still have certain choices and rights in respect of the personal data which we do collect and process. As laid out in relevant privacy legislation, you have the right to: @@ -51,21 +51,21 @@ As explained in this Privacy Policy, we limit our collection and processing of y * Ask us for a copy of your personal data, which may also be transferred to another data controller at your request; -* Withdraw your consent to process your personal data (only if consent was asked for a processing activity), which only affects processing activities that are based on your consent and doesn't affect the validity of such processing activities before you have withdrawn your consent; +* Withdraw your consent to process your personal data (only if consent was asked for a processing activity), which only affects processing activities that are based on your consent and doesn’t affect the validity of such processing activities before you have withdrawn your consent; * Object to the processing of your personal data; and * File a complaint with the Federal Data Protection and Information Commissioner (FDPIC), if you believe that your personal data has been processed unlawfully. -### 7) Third party links +### (0.1.0)7) Third party links On this Website, you may come across links to third party websites. These third party sites have separate and independent privacy policies. We therefore have no responsibility or liability for the content and activities of these third party websites. -### 8) This Privacy Policy might change +### (0.1.0)8) This Privacy Policy might change We may modify or replace any part of this Privacy Policy at any time and without notice. Please check the Website periodically for any changes. The new Privacy Policy will be effective immediately upon its posting on our Website. -### 9) Contact information +### (0.1.0)9) Contact information To the extent that you have any questions about the Privacy Policy, please contact us at legal@free.technology. diff --git a/versions/0.1.0/codex/security.md b/versions/0.1.0/codex/security.md new file mode 100644 index 0000000..05c8f28 --- /dev/null +++ b/versions/0.1.0/codex/security.md @@ -0,0 +1,7 @@ +# (0.1.0)Security + +We take security seriously at Codex and across the Institute of Free Technology and its affiliates. + +Please report any security incidents via security@free.technology. + +Please report any discovered vulnerabilities in our bounty programme at HackenProof to help ensure our protocols and software remain secure. diff --git a/es/codex/terms-of-use.md b/versions/0.1.0/codex/terms-of-use.md similarity index 96% rename from es/codex/terms-of-use.md rename to versions/0.1.0/codex/terms-of-use.md index bf8472b..ac99b3e 100644 --- a/es/codex/terms-of-use.md +++ b/versions/0.1.0/codex/terms-of-use.md @@ -1,7 +1,7 @@ --- lastUpdated: false --- -# Terms of Use +# (0.1.0)Terms of Use Last updated: 14 February 2024 @@ -11,7 +11,7 @@ It is your responsibility to read the Website Terms of Use carefully before your If you do not agree with these Website Terms of Use, you must not access or use the Website. -### 1) Who we are +### (0.1.0)1) Who we are For the purposes of these Website Terms of Use, the relevant entity is the Logos Collective Association, which has its registered office in Zug and its legal domicile address at: @@ -25,7 +25,7 @@ Switzerland Whenever we refer to "Logos", "we", "us" or any other similar references, we are referring to the Logos Collective Association. -### 2) Disclaimers +### (0.1.0)2) Disclaimers The Website is provided by us on an ‘as is’ basis and you use the Website at your own sole discretion and risk. @@ -39,7 +39,7 @@ The information contained herein does not constitute financial, legal, tax, or o Nothing in this Website should be construed by you as an offer to buy or sell, or soliciting any offer to buy or sell any tokens or any security. -### 3) Forward looking statements +### (0.1.0)3) Forward looking statements The Website may also contain forward-looking statements that are based on current expectations, estimates, forecasts, assumptions and projections about the technology, industry and markets in general. @@ -47,31 +47,31 @@ The forward looking statements, which may include statements about the roadmap, While we aim to update our website regularly, all information, including the timeline and the specifics of each stage, is subject to change and may be amended or supplemented at any time, without notice and at our sole discretion. -### 4) Intellectual property rights +### (0.1.0)4) Intellectual property rights The Website and its contents are made available under Creative Commons Attribution 4.0 International license (CC-BY 4.0). In essence this licence allows users to copy, modify and distribute the content in any format for any purpose, including commercial use, subject to certain requirements such as attributing us. For the full terms of this licence, please refer to the following website: https://creativecommons.org/licenses/by/4.0/. -### 5) Third party website links +### (0.1.0)5) Third party website links To the extent the Website provides any links to a third party website, then their terms and conditions, including privacy policies, govern your use of those third party websites. By linking such third party websites, Status does not represent or imply that it endorses or supports such third party websites or content therein, or that it believes such third party websites and content therein to be accurate, useful or non-harmful. We have no control over such third party websites and will not be liable for your use of or activities on any third party websites accessed through the Website. If you access such third party websites through the Website, it is at your own risk and you are solely responsible for your activities on such third party websites. -### 6) Limitation of liability +### (0.1.0)6) Limitation of liability We will not be held liable to you under any contract, negligence, strict liability, or other legal or equitable theory for any lost profits, cost of procurement for substitute services, or any special, incidental, or consequential damages related to, arising from, or in any way connected with these Website Terms of Use, the Website, the content on the Website, or your use of the Website, even if we have been advised of the possibility of such damages. In any event, our aggregate liability for such claims is limited to EUR 100 (one hundred Euros). This limitation of liability will apply to the maximum extent permitted by applicable law. -### 7) Indemnity +### (0.1.0)7) Indemnity You shall indemnify us and hold us harmless from and against any and all claims, damages and expenses, including attorneys’ fees, arising from or related to your use of the Website, the content on the Website, including without limitation your violation of these Website Terms of Use. -### 8) Modifications +### (0.1.0)8) Modifications We may modify or replace any part of this Website Terms of Use at any time and without notice. You are responsible for checking the Website periodically for any changes. The new Website Terms of Use will be effective immediately upon its posting on the Website. -### 9) Governing law +### (0.1.0)9) Governing law Swiss law governs these Website Terms of Use and any disputes between you and us, whether in court or arbitration, without regard to conflict of laws provisions. -### 10) Disputes +### (0.1.0)10) Disputes In these terms, “dispute” has the broadest meaning enforceable by law and includes any claim you make against or controversy you may have in relation to these Website Terms of Use, the Website, the content on the Website, or your use of the Website. @@ -83,7 +83,7 @@ If we and you are unable to further resolve this dispute within sixty (60) calen Regardless of any applicable statute of limitations, you must bring any claims within one year after the claim arose or the time when you should have reasonably known about the claim. You also waive the right to participate in a class action lawsuit or a classwide arbitration against us. -### 11) About these Website Terms of Use +### (0.1.0)11) About these Website Terms of Use These Website Terms of Use cover the entire agreement between you and us regarding the Website and supersede all prior and contemporaneous understandings, agreements, representations and warranties, both written and oral, with respect to the Website. diff --git a/versions/0.1.0/developers/api.md b/versions/0.1.0/developers/api.md new file mode 100644 index 0000000..506a76b --- /dev/null +++ b/versions/0.1.0/developers/api.md @@ -0,0 +1,5 @@ +# (0.1.0)Codex API + + Codex uses REST API to interact with the node and we can use HTTP client for interaction and configuration. + + API specification can be found on the [api.codex.storage](https://api.codex.storage) and it is generated based on [openapi.yaml](https://github.com/codex-storage/nim-codex/blob/master/openapi.yaml). We also generate a [Postman Collection](https://api.codex.storage/postman.json). diff --git a/versions/0.1.0/index.md b/versions/0.1.0/index.md new file mode 100644 index 0000000..7d70a46 --- /dev/null +++ b/versions/0.1.0/index.md @@ -0,0 +1,6 @@ +--- +title: Codex Docs +description: 0.1.0 +--- + +# (0.1.0)Docs for Codex diff --git a/versions/0.1.0/learn/architecture.md b/versions/0.1.0/learn/architecture.md new file mode 100644 index 0000000..946e21a --- /dev/null +++ b/versions/0.1.0/learn/architecture.md @@ -0,0 +1,123 @@ +# (0.1.0)Description and architecture + +Codex is building a durable data storage engine that is fully decentralised, providing corruption and censorship resistance to web3 applications. It innately protects network participants by giving hosts plausible deniability over the data they store, and clients provable durability guarantees—up to 99.99%—while remaining storage and bandwidth efficient. + +These four key features combine to differentiate Codex from existing projects in the decentralised storage niche: + +- **Erasure coding:** Provides efficient data redundancy, which increases data durability guarantees. + +- **ZK-based proof-of-retrievability:** For lightweight data durability assurances. + +- **Lazy repair mechanism:** For efficient data reconstruction and loss prevention. + +- **Incentivization:** To encourage rational behaviour, widespread network participation, and the efficient provision of finite network resources. + + +### (0.1.0)Incentivized decentralisation + +Incentivization mechanisms are one of the key pieces missing from traditional file-sharing networks. Codex believes that a robust marketplace-based incentive structure will ensure wide participation across the node types detailed below. + +The development of an adequate incentive structure is driven by the following goals: + +- Supply and demand to encourage optimum network resource usage. + +- Increase participation by enabling nodes to utilise their competitive advantages to maximise profits. + +- Prevent spam and discourage malicious participation. + +Although still to be finalised, the Codex incentive structure will involve a marketplace of participants who want to store data, and those provisioning storage posting collateral, with the latter bidding on open storage contracts. This structure aims to ensure that participants' incentives align, resulting in Codex functioning as intended. + + +### (0.1.0)Network architecture + +Codex is composed of multiple node types, each taking a different role in the network's operation. Similarly, the hardware demands for each node type vary, enabling those operating resource-restricted devices to participate. + +**Storage nodes** + +As Codex's long-term reliable storage providers, storage nodes stake collateral based on the collateral posted on the request side of contracts, and the number of slots that a contract has. This is tied to the durability demanded by the user. Failure to provide periodic proof of data possession results in slashing penalties. + +**Aggregator Node** + +A method for off-loading erasure coding, proof generation and proof aggregation by a client node with low-resources, currently a WIP and will be part of subsequent Codex release Q2/Q4 next year. + +**Client nodes** + +Client nodes make requests for other nodes to store, find, and retrieve data. Most of the Codex network will be Client nodes, and these participants can double as caching nodes to offset the cost of the network resources they consume. + +When a node commits to a storage contract and a user uploads data, the network will proactively verify that the storage node is online and that the data is retrievable. Storage nodes are then randomly queried to broadcast proofs of data possession over an interval corresponding to the contract duration and 9's of retrievability guarantee the protocol provides. + +If the storage node sends invalid proofs or fails to provide them in time, the network evicts the storage node from the slot, and the slot will become available for the first node that generates a valid proof for that slot. + +When the contract is reposted, some of the faulty node's collateral pays for the new storage node's bandwidth fees. Erasure coding complements the repair scheme by allowing the reconstruction of the missing chunks from data in other slots within the same storage contract hosted by faultless storage nodes. + + +![architect](/public/learn/architecture.png) + +### (0.1.0)Marketplace architecture ### + +The marketplace consists of a smart contract that is deployed on-chain, and the +purchasing and sales modules that are part of the node software. The purchasing +module is responsible for posting storage requests to the smart contract. The +sales module is its counterpart that storage providers use to determine which +storage requests they are interested in. + +#### (0.1.0)Smart contract #### + +The smart contract facilitates matching between storage providers and storage +clients. A storage client can request a certain amount of storage for a certain +duration. This request is then posted on-chain, so that storage providers can +see it, and decide whether they want to fill a slot in the request. + +The main parameters of a storage request are: +- the amount of bytes of storage that is requested +- a content identifier (CID) of the data that should be stored +- the duration for which the data should be stored +- the number of slots (based on the erasure coding parameters) +- an amount of tokens to pay for the storage + +At the protocol level a storage client is free to determine these parameters as +it sees fit, so that it can choose a level of durability that is suitable for +the data, and adjust for changing storage prices. Applications built on Codex +can provide guidance to their users for picking the correct parameters, +analogous to how Ethereum wallets help with determining gas fees. + +The smart contract also checks that storage providers keep their promises. +Storage providers post collateral when they promise to fill a slot of a storage +request. They are expected to post periodic storage proofs to the contract, +either directly or through an aggregator. If they fail to do so repeatedly, then +their collateral can be forfeited. Their slot is then awarded to another storage +provider. + +The smart contract indicates when a certain storage provider has to provide a +storage proof. This is not done on a fixed time interval, but determined +stochastically to ensure that it is not possible for a storage provider to +predict when it should provide the next storage proof. + +#### (0.1.0)Purchasing #### + +The purchasing module in the node software interacts with the smart contract on +behalf of the node operator. It posts storage requests, and handles any other +interactions that are required during the lifetime of the request. For instance, +when a request is canceled because there are not enough interested storage +providers, then the purchasing module can withdraw the tokens that were +associated with the request. + +#### (0.1.0)Sales #### + +The sales module is the counterpart to the purchasing module. It monitors the smart +contract to be notified of incoming storage requests. It keeps a list of the +most promising requests that it can fulfill. It will favor those requests that +have a high reward and low collateral. As soon as it finds a suitable request, +it will then try to first reserve and then fill a slot by downloading the +associated data, creating a storage proof, and posting it to the smart contract. +It will then continue to monitor the smart contract to provide it with storage +proofs when they are required. + +The sales module contains a best effort strategy for determining which storage +requests it is interested in. Over time, we expect more specialized strategies +to emerge to cater to the needs of e.g. large providers versus providers that +run a node from their home. + +### (0.1.0)Whitepaper ### + +Read the [Codex whitepaper](./whitepaper) diff --git a/learn/build.md b/versions/0.1.0/learn/build.md similarity index 90% rename from learn/build.md rename to versions/0.1.0/learn/build.md index fa5f538..aa8ed9f 100644 --- a/learn/build.md +++ b/versions/0.1.0/learn/build.md @@ -1,6 +1,6 @@ -# Build Codex +# (0.1.0)Build Codex -## Table of Contents +## (0.1.0)Table of Contents - [Install developer tools](#prerequisites) - [Linux](#linux) @@ -14,7 +14,7 @@ **Optional** - [Run the tests](#tests) -## Prerequisites +## (0.1.0)Prerequisites To build nim-codex, developer tools need to be installed and accessible in the OS. @@ -22,11 +22,11 @@ Instructions below correspond roughly to environmental setups in nim-codex's [CI Other approaches may be viable. On macOS, some users may prefer [MacPorts](https://www.macports.org/) to [Homebrew](https://brew.sh/). On Windows, rather than use MSYS2, some users may prefer to install developer tools with [winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/), [Scoop](https://scoop.sh/), or [Chocolatey](https://chocolatey.org/), or download installers for e.g. Make and CMake while otherwise relying on official Windows developer tools. Community contributions to these docs and our build system are welcome! -### Rust +### (0.1.0)Rust The current implementation of Codex's zero-knowledge proving circuit requires the installation of rust v1.79.0 or greater. Be sure to install it for your OS and add it to your terminal's path such that the command `cargo --version` gives a compatible version. -### Linux +### (0.1.0)Linux > [!WARNING] > Linux builds currently require gcc $\leq$ 13. If this is not an option in your @@ -65,7 +65,7 @@ gcc --version If you get a number that starts with 14 (e.g. `14.2.0`), then you need to either downgrade, or try a workaround like [building within Docker](#building-within-docker). -### macOS +### (0.1.0)macOS Install the [Xcode Command Line Tools](https://mac.install.guide/commandlinetools/index.html) by opening a terminal and running ```shell @@ -81,11 +81,11 @@ Check that `PATH` is setup correctly ```shell which bash cmake -# /usr/local/bin/bash -# /usr/local/bin/cmake +# (0.1.0)/usr/local/bin/bash +# (0.1.0)/usr/local/bin/cmake ``` -### Windows + MSYS2 +### (0.1.0)Windows + MSYS2 *Instructions below assume the OS is 64-bit Windows and that the hardware or VM is [x86-64](https://en.wikipedia.org/wiki/X86-64) compatible.* @@ -106,11 +106,11 @@ pacman -U --noconfirm \ https://repo.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-gcc-libs-13.2.0-6-any.pkg.tar.zst ``` - + -#### Optional: VSCode Terminal integration +#### (0.1.0)Optional: VSCode Terminal integration You can link the MSYS2-UCRT64 terminal into VSCode by modifying the configuration file as shown below. File: `C:/Users//AppData/Roaming/Code/User/settings.json` @@ -135,11 +135,11 @@ File: `C:/Users//AppData/Roaming/Code/User/settings.json` } ``` -### Other +### (0.1.0)Other It is possible that nim-codex can be built and run on other platforms supported by the [Nim](https://nim-lang.org/) language: BSD family, older versions of Windows, etc. There has not been sufficient experimentation with nim-codex on such platforms, so instructions are not provided. Community contributions to these docs and our build system are welcome! -## Repository +## (0.1.0)Repository In Bash run ```shell @@ -158,7 +158,7 @@ To see more output from `make` pass `V=1`. This works for all `make` targets in make V=1 update ``` -## Executable +## (0.1.0)Executable In Bash run ```shell @@ -167,9 +167,9 @@ make The default `make` target creates the `build/codex` executable. -## Tools +## (0.1.0)Tools -### Circuit download tool +### (0.1.0)Circuit download tool To build the circuit download tool located in `tools/cirdl` run: @@ -177,28 +177,28 @@ To build the circuit download tool located in `tools/cirdl` run: make cirdl ``` -## Example usage +## (0.1.0)Example usage -See the instructions in the [Quick Start](/learn/quick-start). +See the instructions in the [Quick Start](./quick-start). -## Tests +## (0.1.0)Tests In Bash run ```shell make test ``` -### testAll +### (0.1.0)testAll -#### Prerequisites +#### (0.1.0)Prerequisites To run the integration tests, an Ethereum test node is required. Follow these instructions to set it up. -##### Windows (do this before 'All platforms') +##### (0.1.0)Windows (do this before 'All platforms') 1. Download and install Visual Studio 2017 or newer. (Not VSCode!) In the Workloads overview, enable `Desktop development with C++`. ( https://visualstudio.microsoft.com ) -##### All platforms +##### (0.1.0)All platforms 1. Install NodeJS (tested with v18.14.0), consider using NVM as a version manager. [Node Version Manager (`nvm`)](https://github.com/nvm-sh/nvm#readme) 1. Open a terminal @@ -211,7 +211,7 @@ Before the integration tests are started, you must start the Ethereum test node 1. Go to the vendor/codex-contracts-eth folder: `cd //vendor/codex-contracts-eth/` 1. `npm start` -> This should launch Hardhat, and output a number of keys and a warning message. -#### Run +#### (0.1.0)Run The `testAll` target runs the same tests as `make test` and also runs tests for nim-codex's Ethereum contracts, as well a basic suite of integration tests. @@ -222,7 +222,7 @@ Use a new terminal to run: make testAll ``` -## Building Within Docker +## (0.1.0)Building Within Docker For the specific case of Linux distributions which ship with gcc 14 and a downgrade to 13 is not possible/desirable, building within a Docker @@ -230,13 +230,13 @@ container and pulling the binaries out by copying or mounting remains an option; e.g.: ```bash= -# Clone original repo. +# (0.1.0)Clone original repo. git clone https://github.com/codex-storage/nim-codex -# Build inside docker +# (0.1.0)Build inside docker docker build -t codexstorage/nim-codex:latest -f nim-codex/docker/codex.Dockerfile nim-codex -# Extract executable +# (0.1.0)Extract executable docker create --name=codex-build codexstorage/nim-codex:latest docker cp codex-build:/usr/local/bin/codex ./codex docker cp codex-build:/usr/local/bin/cirdl ./cirdl diff --git a/learn/download-flow.md b/versions/0.1.0/learn/download-flow.md similarity index 96% rename from learn/download-flow.md rename to versions/0.1.0/learn/download-flow.md index f8dec92..04b339b 100644 --- a/learn/download-flow.md +++ b/versions/0.1.0/learn/download-flow.md @@ -1,7 +1,7 @@ -# Download Flow +# (0.1.0)Download Flow Sequence of interactions that result in dat blocks being transferred across the network. -## Local Store +## (0.1.0)Local Store When data is available in the local blockstore, ```mermaid @@ -21,7 +21,7 @@ Node/StoreStream->>-API: Data stream API->>Alice: Stream download of block ``` -## Network Store +## (0.1.0)Network Store When data is not found ih the local blockstore, the block-exchange engine is used to discover the location of the block within the network. Connection will be established to the node(s) that have the block, and exchange can take place. ```mermaid diff --git a/versions/0.1.0/learn/installer/install-and-run.md b/versions/0.1.0/learn/installer/install-and-run.md new file mode 100644 index 0000000..ae64c59 --- /dev/null +++ b/versions/0.1.0/learn/installer/install-and-run.md @@ -0,0 +1,48 @@ +# (0.1.0)Quick Start + +Codex Installer is a CLI tool that simplifies the process of setting up a Codex node. It handles all the necessary steps to get your node running quickly and efficiently. + +> Before we get started, please make sure to review and accept the [disclaimer](../../codex/installer-disclaimer) as Codex Installer collects some of your node information to improve the user experience. + +
+ + + +## (0.1.0)Requirements + +- git +- npm + +## (0.1.0)Run the Codex Installer + +To start the Codex Installer, simply run the following command in your terminal : + +```bash +npx codexstorage +``` + +## (0.1.0)Download and install Codex + +Once you run the above command, you will be seeing a command line interface with various options as below : + +![InstallCodex](/public/learn/codex-installer.png) + +On selecting the `Download and install Codex` option, you will be asked to agree to the privacy disclaimer and provide an installation path to finish your installation. If you do not wish to agree to the data collection disclaimer, you can select the `Exit` option and follow the instructions [Manual setup](../quick-start.md) to install Codex without using the Installer. + +## (0.1.0)Run the Codex node + +Upon selecting the `Run Codex node` option, you will be asked for your Listening port (default is 8070) and discovery port (default is 8090). You can optionally provide your ERC20 public address to associate your testnet node with your wallet (Please note that Codex does not promise any incentives for running a node yet). + +![RunCodex](/public/learn/codex-installer2.png) + +Keep this terminal window open as closing this will terminate your node. + +## (0.1.0)Get the *ALTRUISTIC MODE* role on Codex discord + +With that, your Codex node should be up and running. You can check the information and status of your node by proceeding to the third option. + +![Get Role](/public/learn/codex-installer3.png) + +To claim the *ALTRUISTIC MODE* role, join the [Codex Discord](https://discord.gg/codex-storage) and go to the #bot channel. Run the `/node ` command where `` can be found in the Node Information menu in your Installer. + +In order to keep your role, you will be required to frequently interact with the Codex testnet by running your node and/or [uploading/downloading files](./upload-and-download.md) using the testnet. \ No newline at end of file diff --git a/versions/0.1.0/learn/installer/requirements.md b/versions/0.1.0/learn/installer/requirements.md new file mode 100644 index 0000000..fc5d19d --- /dev/null +++ b/versions/0.1.0/learn/installer/requirements.md @@ -0,0 +1,23 @@ +# (0.1.0)Requirements + +> **Note:** Using the Codex Installer is the recommended only if you agree to provide your node information to make the Codex experience better. If you don't agree to the disclaimer, please consider [setting up Codex manually](../quick-start.md) + +
+ +To make sure that your Codex node is running smoothly, you will need to make sure that your machine has the following requirements : + +## (0.1.0)Dependencies + +- git +- npm + +## (0.1.0)Port Forwarding + +Codex requires two ports to be open on your machine in order to function properly. However, please note that the **ports provided below are configurable** based on your preference : + + | Protocol | Service | Port | + | -------- | --------- | ------ | + | UDP | Discovery | Default : `8090` | + | TCP | Transport | Default : `8070` | + +If you are not familiar with port forwarding, you can follow the instructions [here](https://www.noip.com/support/knowledgebase/general-port-forwarding-guide/). \ No newline at end of file diff --git a/versions/0.1.0/learn/installer/upload-and-download.md b/versions/0.1.0/learn/installer/upload-and-download.md new file mode 100644 index 0000000..1ca16f8 --- /dev/null +++ b/versions/0.1.0/learn/installer/upload-and-download.md @@ -0,0 +1,26 @@ +# (0.1.0)Upload/Download Files in the Testnet + +You can either upload or download files by using the Upload / Download option in the Codex Installer or by using the Codex GUI app (recommended). + +## (0.1.0)Codex Vault + +Codex Vault is a GUI web application that can help you interact with the Codex testnet by uploading and downloading files. Once you have your Codex node running using the installer, you can access the Codex Vault by going to https://app.codex.storage + +![Codex Vault](/public/learn/codex-vault.png) + +Ensure that you have all the necessary conditions checked in the 'health check' section before you try uploading or downloading files. + +### (0.1.0)Uploading and Downloading Files + +To upload a file, you can either drag and drop the file to the upload area or click on the 'upload' button. You will be able to find a unique CID for the file once it has been uploaded. + +To download a file, enter the CID of the file in the 'download' section and click on the 'download' button. + +![Upload and Download](/public/learn/upload-download.png) + +## (0.1.0)What's next? + +Now that you know how to upload and download files in the testnet, you can try to explore some experimental features and build your own applications on top of Codex : + +- [Use Codex REST API](../using) +- [Build applications using codex-js Library](https://github.com/codex-storage/codex-js) \ No newline at end of file diff --git a/es/learn/local-two-client-test.md b/versions/0.1.0/learn/local-two-client-test.md similarity index 87% rename from es/learn/local-two-client-test.md rename to versions/0.1.0/learn/local-two-client-test.md index 31c8efd..6c9a14a 100644 --- a/es/learn/local-two-client-test.md +++ b/versions/0.1.0/learn/local-two-client-test.md @@ -1,26 +1,14 @@ -# Codex Two-Client Test +# (0.1.0)Codex Two-Client Test The two-client test is a manual test you can perform to check your setup and familiarize yourself with the Codex API. These steps will guide you through running and connecting two nodes, in order to upload a file to one and then download that file from the other. This test also includes running a local blockchain node in order to have the Marketplace functionality available. However, running a local blockchain node is not strictly necessary, and you can skip steps marked as optional if you choose not start a local blockchain node. -## Prerequisite +## (0.1.0)Prerequisite -Make sure you have [built the client](/learn/build) or obtained [compiled binary](/learn/quick-start#get-codex-binary). +Make sure you have [built the client](./build) or obtained [compiled binary](./quick-start#get-codex-binary). -## Steps +## (0.1.0)Steps -### 0. Setup blockchain node (optional) - -You need to have installed NodeJS and npm in order to spinup a local blockchain node. - -Go to directory `vendor/codex-contracts-eth` and run these two commands: -``` -npm ci -npm start -``` - -This will launch a local Ganache blockchain. - -### 1. Launch Node #1 +### (0.1.0)1. Launch Node #1 Open a terminal and run: - Mac/Linux: @@ -40,27 +28,16 @@ Open a terminal and run: --listen-addrs="/ip4/127.0.0.1/tcp/8070" ``` -Optionally, if you want to use the Marketplace blockchain functionality, you need to also include these flags: `--persistence --eth-account=`, where `account` can be one following: - - - `0x70997970C51812dc3A010C7d01b50e0d17dc79C8` - - `0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC` - - `0x90F79bf6EB2c4f870365E785982E1f101E93b906` - - `0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65` - -**For each node use a different account!** - | Argument | Description | |----------------|-----------------------------------------------------------------------| | `data-dir` | We specify a relative path where the node will store its data. | | `listen-addrs` | Multiaddress where the node will accept connections from other nodes. | | `api-port` | Port on localhost where the node will expose its API. | | `disc-port` | Port the node will use for its discovery service. | -| `persistence` | Enables Marketplace functionality. Requires a blockchain connection. | -| `eth-account` | Defines which blockchain account the node should use. | Codex uses sane defaults for most of its arguments. Here we specify some explicitly for the purpose of this walk-through. -### 2. Sign of life +### (0.1.0)2. Sign of life Run the command : @@ -108,7 +85,7 @@ This GET request will return the node's debug information. The response will be | `table` | Table of nodes present in the node's DHT | | `codex` | Codex version information | -### 3. Launch Node #2 +### (0.1.0)3. Launch Node #2 We will need the signed peer record (SPR) from the first node that you got in the previous step. @@ -149,7 +126,7 @@ Notice we're using a new data-dir, and we've increased each port number by one. We're now also including the `bootstrap-node` argument. This allows us to link the new node to another one, bootstrapping our own little peer-to-peer network. SPR strings always start with `spr:`. -### 4. Connect The Two +### (0.1.0)4. Connect The Two Normally the two nodes will automatically connect. If they do not automatically connect or you want to manually connect nodes you can use the peerId to connect nodes. @@ -177,7 +154,7 @@ curl -X GET \ Notice that we are sending the "`peerId`" and the multiaddress of node 2 to the `/connect` endpoint of node 1. This provides node 1 all the information it needs to communicate with node 2. The response to this request should be `Successfully connected to peer`. -### 5. Upload The File +### (0.1.0)5. Upload The File We're now ready to upload a file to the network. In this example we'll use node 1 for uploading and node 2 for downloading. But the reverse also works. @@ -195,7 +172,7 @@ curl -X POST \ Depending on the file size this may take a moment. Codex is processing the file by cutting it into blocks and generating erasure-recovery data. When the process is finished, the request will return the content-identifier (CID) of the uploaded file. It should look something like `zdj7WVxH8HHHenKtid8Vkgv5Z5eSUbCxxr8xguTUBMCBD8F2S`. -### 6. Download The File +### (0.1.0)6. Download The File Replace `` with the identifier returned in the previous step. Replace `` with the filename where you want to store the downloaded file: @@ -207,11 +184,11 @@ curl -X GET \ Notice we are connecting to the second node in order to download the file. The CID we provide contains the information needed to locate the file within the network. -### 7. Verify The Results +### (0.1.0)7. Verify The Results If your file is downloaded and identical to the file you uploaded, then this manual test has passed. Rejoice! If on the other hand that didn't happen or you were unable to complete any of these steps, please leave us a message detailing your troubles. -## Notes +## (0.1.0)Notes When using the Ganache blockchain, there are some deviations from the expected behavior, mainly linked to how blocks are mined, which affects certain functionalities in the Sales module. Therefore, if you are manually testing processes such as payout collection after a request is finished or proof submissions, you need to mine some blocks manually for it to work correctly. You can do this by using the following curl command: diff --git a/es/learn/quick-start.md b/versions/0.1.0/learn/quick-start.md similarity index 65% rename from es/learn/quick-start.md rename to versions/0.1.0/learn/quick-start.md index dd3027f..c6445a8 100644 --- a/es/learn/quick-start.md +++ b/versions/0.1.0/learn/quick-start.md @@ -1,20 +1,20 @@ -# Quick Start +# (0.1.0)Quick Start To run Codex through this guide we would need to perform the following steps: -- [Review the disclaimer](/codex/disclaimer) +- [Review the disclaimer](../codex/disclaimer) - [Get Codex binary](#get-codex-binary) - [Run Codex](#run-codex) - [Interact with Codex](#interact-with-codex) -## Get Codex binary +## (0.1.0)Get Codex binary -For quick a start we will use precompiled binaries from [GitHub release page](https://github.com/codex-storage/nim-codex/releases). If you prefer to compile from the sources, please check [Build Codex](/learn/build). +For quick a start we will use precompiled binaries from [GitHub release page](https://github.com/codex-storage/nim-codex/releases). If you prefer to compile from the sources, please check [Build Codex](./build). Please follow the steps for your OS from the list: - [Linux/macOS](#linux-macos) - [Windows](#windows) -### Linux/macOS +### (0.1.0)Linux/macOS 1. Install latest Codex release ```shell @@ -23,7 +23,7 @@ Please follow the steps for your OS from the list: 2. Install dependencies ```shell - # Debian-based Linux + # (0.1.0)Debian-based Linux sudo apt update && sudo apt install libgomp1 ``` @@ -32,7 +32,7 @@ Please follow the steps for your OS from the list: codex --version ``` -### Windows +### (0.1.0)Windows 1. Install latest Codex release ```batch @@ -70,9 +70,12 @@ Please follow the steps for your OS from the list: codex --version ``` -## Run Codex +## (0.1.0)Run Codex -We may [run Codex in different modes](/learn/run#run), and for a quick start we will run [Codex node](/learn/run#codex-node), to be able to share files in the network. +We may [run Codex in different modes](./run#run), and for a quick start we will run [Codex node](./run#codex-node), to be able to share files in the network. + +0. Obtain an SPR of the Codex network you want to join. +Go to [networks](../networks/networks) 1. Run Codex @@ -82,9 +85,9 @@ We may [run Codex in different modes](/learn/run#run), and for a quick start we --data-dir=datadir \ --disc-port=8090 \ --listen-addrs=/ip4/0.0.0.0/tcp/8070 \ - --nat=`curl -s https://ip.codex.storage` \ + --nat=any \ --api-cors-origin="*" \ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P + --bootstrap-node= ``` **Windows** @@ -111,38 +114,28 @@ We may [run Codex in different modes](/learn/run#run), and for a quick start we ```batch - :: Get Public IP - for /f "delims=" %a in ('curl -s --ssl-reqd ip.codex.storage') do set nat=%a - :: Run Codex codex ^ --data-dir=datadir ^ --disc-port=8090 ^ --listen-addrs=/ip4/0.0.0.0/tcp/8070 ^ - --nat=%nat% ^ + --nat=any ^ --api-cors-origin="*" ^ - --bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P + --bootstrap-node= ``` - > [!TIP] - > In the example above we use [Codex Testnet](/networks/testnet#bootstrap-nodes) bootstrap nodes and thus we join Testnet. If you would like to join a different network, please use [appropriate value](/networks/networks). - 2. Configure port-forwarding for the TCP/UDP ports on your Internet router | Protocol | Service | Port | | -------- | --------- | ------ | | UDP | Discovery | `8090` | | TCP | Transport | `8070` | -If you would like to purchase or sell storage, please consider to run [Codex node with marketplace support](/learn/run#codex-node-with-marketplace-support) or [Codex storage node](/learn/run#codex-storage-node). - -## Interact with Codex +## (0.1.0)Interact with Codex When your Codex node is up and running you can interact with it using [Codex App UI](https://app.codex.storage) for files sharing. -Also, you can interact with Codex using [Codex API](/developers/api) and for a walk-through of the API, consider following the [Using Codex](/learn/using) guide. +Also, you can interact with Codex using [Codex API](../developers/api) and for a walk-through of the API, consider following the [Using Codex](./using) guide. -## Stay in touch +## (0.1.0)Stay in touch Want to stay up-date, or looking for further assistance? Try our [discord-server](https://discord.gg/codex-storage). - -If you want to run Codex locally without joining the Testnet, consider trying the [Codex Two-Client Test](/learn/local-two-client-test) or the [Running a Local Codex Network with Marketplace Support](/learn/local-marketplace). diff --git a/es/learn/run.md b/versions/0.1.0/learn/run.md similarity index 93% rename from es/learn/run.md rename to versions/0.1.0/learn/run.md index 071d861..8ae5171 100644 --- a/es/learn/run.md +++ b/versions/0.1.0/learn/run.md @@ -1,7 +1,7 @@ --- outline: [2, 4] --- -# Run Codex +# (0.1.0)Run Codex As for now, Codex is implemented only in [Nim](https://nim-lang.org) and can be found in [nim-codex](https://github.com/codex-storage/nim-codex) repository. @@ -15,7 +15,7 @@ It is a command-line application which may be run in a different ways: During the run, it is required to pass [configuration](#configuration) option to the application, which can be done in a different ways. -## Configuration +## (0.1.0)Configuration It is possible to configure Codex node in several ways: 1. [CLI options](#cli-options) @@ -25,9 +25,9 @@ It is possible to configure Codex node in several ways: The order of priority is the same as above: [CLI options](#cli-options) --> [Environment variables](#environment-variables) --> [Configuration file](#configuration-file). -### Common information +### (0.1.0)Common information -#### Units +#### (0.1.0)Units For some configuration options, we can pass values in common units like following: ```shell @@ -38,7 +38,7 @@ For some configuration options, we can pass values in common units like followin --block-ttl=2s/2S/2m/2M/2h/2H/2d/2D/2w/2W ``` -#### Logging +#### (0.1.0)Logging Codex uses [Chronicles](https://github.com/status-im/nim-chronicles) logging library, which allows great flexibility in working with logs. Chronicles has the concept of topics, which categorize log entries into semantic groups. @@ -47,7 +47,7 @@ Using the `log-level` parameter, you can set the top-level log level like `--log you can set log levels for specific topics like `--log-level="info; trace: marketplace,node; error: blockexchange"`, which sets the top-level log level to `info` and then for topics `marketplace` and `node` sets the level to `trace` and so on. -### CLI options +### (0.1.0)CLI options ```shell codex --help @@ -127,7 +127,7 @@ The following options are available: --max-cell-elements The maximum number of elements in a cell [=67]. ``` -### Environment variables +### (0.1.0)Environment variables In order to set a configuration option using environment variables, first find the desired [CLI option](#cli-options) and then transform it in the following way: @@ -141,7 +141,7 @@ For example, to configure `--log-level`, use `CODEX_LOG_LEVEL` as the environmen > [!WARNING] > Some options can't be configured via environment variables for now [^multivalue-env-var] [^sub-commands]. -### Configuration file +### (0.1.0)Configuration file A [TOML](https://toml.io/en/) configuration file can also be used to set configuration values. Configuration option names and corresponding values are placed in the file, separated by `=`. Configuration option names can be obtained from the [`codex --help`](#cli-options) command, and should not include the `--` prefix. For example, a node's log level (`--log-level`) can be configured using TOML as follows: @@ -164,11 +164,11 @@ codex --config-file=/path/to/your/config.toml Please check [Run as a service in Linux](#run-as-a-service-in-linux) for a full example of configuration file. -## Run +## (0.1.0)Run -### Using binary +### (0.1.0)Using binary -#### Codex node +#### (0.1.0)Codex node We can run Codex in a simple way like following: ```shell @@ -189,7 +189,7 @@ codex \ ``` > [!IMPORTANT] -> Make sure you are using a proper value for the [network](/networks/networks) you would like to join. +> Make sure you are using a proper value for the [network](../networks/networks) you would like to join. Also, to make your Codex node accessible for other network participants, it is required to specify a public IP address which can be used to access your node: ```shell @@ -223,7 +223,7 @@ curl -s localhost:8080/api/codex/v1/debug/info | jq -r '.announceAddresses' ] ``` Basically, for P2P communication we should specify and configure two ports: -| # | Protocol | Function | CLI option | Example | +| # (0.1.0)| Protocol | Function | CLI option | Example | | - | -------- | ------------------------------------------------------------------------ | ---------------- | -------------------------------------- | | 1 | UDP | [Discovery](https://docs.libp2p.io/concepts/discovery-routing/overview/) | `--disc-port` | `--disc-port=8090` | | 2 | TCP | [Transport](https://docs.libp2p.io/concepts/transports/overview/) | `--listen-addrs` | `--listen-addrs=/ip4/0.0.0.0/tcp/8070` | @@ -241,13 +241,13 @@ codex \ --api-cors-origin="*" ``` -After node is up and running and port-forwarding configurations was done, we should be able to [Upload a file](/learn/using#upload-a-file)/[Download a file](/learn/using#download-a-file) in the network using [API](/developers/api). +After node is up and running and port-forwarding configurations was done, we should be able to [Upload a file](./using#upload-a-file)/[Download a file](./using#download-a-file) in the network using [API](../developers/api). You also can use [Codex App UI](https://app.codex.storage) for files upload/download. -#### Codex bootstrap node +#### (0.1.0)Codex bootstrap node -If you need an SPR to bootstrap your own node, go to [network](/networks/networks) and select which network you'd like to join. +If you need an SPR to bootstrap your own node, go to [network](../networks/networks) and select which network you'd like to join. Bootstrap nodes are used just to help peers with the initial nodes discovery and we need to run Codex with just some basic options: ```shell @@ -274,7 +274,7 @@ We should keep in mind some important things about SPR record (see [ENR](https:/ For bootstrap node, it is required to forward just discovery port on your Internet router. -### Run as a service in Linux +### (0.1.0)Run as a service in Linux We can run Codex as a service via [systemd](https://systemd.io) using following steps @@ -288,9 +288,9 @@ We can run Codex as a service via [systemd](https://systemd.io) using following ``` In case you would like to run commands using a created user, you could do it like following `sudo -u codex ls -la /opt/codex`. - 2. Install Codex [using a script](https://github.com/codex-storage/get-codex) or [build from sources](/learn/build) + 2. Install Codex [using a script](https://github.com/codex-storage/get-codex) or [build from sources](./build) ```shell - # codex with cirdl + # (0.1.0)codex with cirdl curl -s https://get.codex.storage/install.sh | INSTALL_DIR=/usr/local/bin CIRDL=true bash ``` @@ -324,7 +324,7 @@ We can run Codex as a service via [systemd](https://systemd.io) using following log-level = "info" ``` - Make sure to use bootstrap nodes for the [network](/networks/networks) you would like to join, update `nat` variable with a node Public IP and adjust other settings by your needs. + Make sure to use bootstrap nodes for the [network](../networks/networks) you would like to join, update `nat` variable with a node Public IP and adjust other settings by your needs. 5. Change folders ownership and permissions ```shell @@ -392,15 +392,15 @@ We can run Codex as a service via [systemd](https://systemd.io) using following tail -f /opt/codex/logs/codex.log ``` -### Run as a service in Windows +### (0.1.0)Run as a service in Windows This functionality is not supported yet :construction: -### Using Docker +### (0.1.0)Using Docker We also ship Codex in Docker containers, which can be run on `amd64` and `arm64` platforms. -#### Docker entrypoint +#### (0.1.0)Docker entrypoint [Docker entrypoint](https://github.com/codex-storage/nim-codex/blob/master/docker/docker-entrypoint.sh), supports some additional options, which can be used for easier configuration: @@ -412,7 +412,7 @@ We also ship Codex in Docker containers, which can be run on `amd64` and `arm64` - `NETWORK` - is a helper variable to simply a specific network join. It helps to automate `BOOTSTRAP_NODE_FROM_URL` variable. - `BOOTSTRAP_NODE_FROM_URL` - can be used to pass SPR nodes from an URL like [spr.codex.storage/testnet](https://spr.codex.storage/testnet). -#### Docker network +#### (0.1.0)Docker network When we are running Codex using Docker with default [bridge network](https://docs.docker.com/engine/network/drivers/bridge/), it will create a double NAT: - One on the Docker side @@ -425,7 +425,7 @@ In that case, we should consider the following solutions: - Run [Using binary](#using-binary) - Use VM/VPS in the Cloud to run Docker with bridge or host network -#### Run using Docker +#### (0.1.0)Run using Docker And we basically can use same options we [used for binary](#using-binary) and additionally it is required to mount volumes and map the ports. @@ -450,9 +450,9 @@ docker run \ ``` > [!NOTE] -> You would need to pass a bootstrap nodes based on the [network](/networks/networks) you would like to join. +> You would need to pass a bootstrap nodes based on the [network](../networks/networks) you would like to join. -### Using Docker Compose +### (0.1.0)Using Docker Compose For Docker Compose, it is more suitable to use [environment variables](#environment-variables) for Codex configuration and we can reuse commands from example above, for Docker. @@ -480,9 +480,9 @@ For Docker Compose, it is more suitable to use [environment variables](#environm - CODEX_API_PORT=8080 - CODEX_API_BINDADDR=0.0.0.0 ports: - - 8080:8080/tcp # API - - 8090:8090/udp # Discovery - - 8070:8070/tcp # Transport + - 8080:8080/tcp # (0.1.0)API + - 8090:8090/udp # (0.1.0)Discovery + - 8070:8070/tcp # (0.1.0)Transport volumes: - ./datadir:/datadir logging: @@ -498,15 +498,15 @@ For Docker Compose, it is more suitable to use [environment variables](#environm ``` > [!NOTE] -> You would need to pass a bootstrap nodes based on the [network](/networks/networks) you would like to join. +> You would need to pass a bootstrap nodes based on the [network](../networks/networks) you would like to join. -### On Kubernetes +### (0.1.0)On Kubernetes Helm chart code is available in [helm-charts](https://github.com/codex-storage/helm-charts) repository, but chart was not published yet. -## How-tos +## (0.1.0)How-tos -### NAT Configuration +### (0.1.0)NAT Configuration Use the `--nat` CLI flag to specify how your codex node should handle NAT traversal. Below are the available options: @@ -518,7 +518,7 @@ Use the `--nat` CLI flag to specify how your codex node should handle NAT traver **extIP:[Your Public IP]**:Use this option if you want to manually specify an external IP address and port for the announce address. When selecting this option, you'll need to configure **port forwarding** on your router to ensure that incoming traffic is directed to the correct internal IP and port. -### Port Forwarding +### (0.1.0)Port Forwarding If you're running on a private network, you'll need to set up port forwarding to ensure seamless communication between the codex node and its peers. It's also recommended to configure appropriate firewall rules for TCP and UDP traffic. While the specific steps required vary based on your router, they can be summarised as follows: @@ -537,7 +537,7 @@ While the specific steps required vary based on your router, they can be summari - Protocol: TCP - IP Address: Your device's private IP address -#### Determine your private IP +#### (0.1.0)Determine your private IP To determine your private IP address, run the appropriate command for your OS: @@ -556,7 +556,7 @@ ipconfig | findstr /i "IPv4 Address" ifconfig | grep "inet " | grep -v 127.0.0.1 ``` -## Known issues +## (0.1.0)Known issues [^multivalue-env-var]: Environment variables like `CODEX_BOOTSTRAP_NODE` and `CODEX_LISTEN_ADDRS` does not support multiple values. Please check [[Feature request] Support multiple SPR records via environment variable #525](https://github.com/codex-storage/nim-codex/issues/525), for more information. [^sub-commands]: Sub-commands `persistence` and `persistence prover` can't be set via environment variables. diff --git a/es/learn/tokenomics-litepaper.md b/versions/0.1.0/learn/tokenomics-litepaper.md similarity index 93% rename from es/learn/tokenomics-litepaper.md rename to versions/0.1.0/learn/tokenomics-litepaper.md index 1c6973a..9d86fee 100644 --- a/es/learn/tokenomics-litepaper.md +++ b/versions/0.1.0/learn/tokenomics-litepaper.md @@ -1,11 +1,11 @@ --- outline: [1, 3] --- -# Codex Tokenomics Litepaper - Testnet Version +# (0.1.0)Codex Tokenomics Litepaper - Testnet Version **Codex: A Decentralized Storage Protocol for Durable Information** -# Legal Notices +# (0.1.0)Legal Notices *The information contained in this document is intended to be made available for informational purposes only and does not constitute a prospectus, nor an offer to buy, a solicitation or an invitation to buy, or a recommendation for any token or any security. Neither this document nor any of its content should be considered as creating any expectations or forming the basis of any contract, commitment or binding obligation. No information herein should be considered to contain or be relied upon as a promise, representation, warranty or guarantee, whether express or implied and whether as to the past, present or the future in relation to the projects and matters described herein. The information presented is a summary and does not purport to be accurate, reliable or complete. This document is under continuous legal review and may be amended or supplemented at any time without prior notice.  No responsibility will be borne for the accuracy, reliability or completeness of information contained herein. Because of the high degree of risk and uncertainty described above, undue reliance should not be placed by anyone on any matters described in this document. Any tokens referenced in this document have not been registered under any securities laws and may not be offered or sold in any jurisdiction where such offer or sale would be prohibited.* @@ -13,13 +13,13 @@ outline: [1, 3] *The information contained in this document does not constitute financial, legal, tax, investment, professional or other advice and should not be treated as such.* -# Overview +# (0.1.0)Overview -## Scope +## (0.1.0)Scope This document describes the Codex Tokenomics with elements that reflect the Testnet deployment of the Codex Protocol. -## What Codex Does +## (0.1.0)What Codex Does Codex is a state-of-the-art decentralized storage platform that offers a novel solution that enhances data durability guarantees for storing vast amounts of data while eliminating any reliance on centralized institutions that could lead to a single point of failure. @@ -27,7 +27,7 @@ While centralized storage systems such as Google Cloud tout eleven nines of dura While no system can guarantee absolute protection against data loss, through its technical architecture, economic incentives, and algorithmic encoding, Codex is designed to provide highly decentralized data storage with high durability, resiliency to cloud failures, and resistance to censorship. -## How Codex Works +## (0.1.0)How Codex Works Codex operates as a network of storage nodes, referred to herein as **Storage Providers** (SP), that store user data for the duration of a contract entered into by SPs and storage users, referred to herein simply as **Clients**. @@ -45,17 +45,17 @@ Codex is thus designed such that rational behavior for **SPs** consists of stori While Codex’s tech maximizes recoverability and durability in the event of partial data loss, Codex’s economic incentives coordinate rational actors to provide a stable and predictable environment for data storage users. At the heart of these economic incentives is the Codex utility token (CDX), which serves as the collateral to protect file durability and facilitate slot repair, and the means of payment to coordinate successful storage contracts. -# Contract Lifecycle +# (0.1.0)Contract Lifecycle The marketplace coordinates matching **Clients** who want to pay for storing files with **Storage Providers** who are offering storage space and posting collateral in order to earn payments for the contract. -## Contract Request Initiation +## (0.1.0)Contract Request Initiation As a design principle, **Clients** should post the deal terms they are looking for, and Storage Providers prioritize which deals meet their criteria and pose the best deals to take. When the contract request is created, the **Client** deposits the full price of the length of the contract at that time. This deposit acts as a spam prevention mechanism and ensures that **SP** time and resources are not wasted filling slots for deals that a **Client** does not complete payment for. -## Storage Providers Fill Requests +## (0.1.0)Storage Providers Fill Requests Ahead of matching with storage contracts, **Storage Providers** specify their aggregate availabilities for new contracts. @@ -67,7 +67,7 @@ If a **SP** matches with a storage contract and they're eligible to reserve a sl Note that a slot is not considered confirmed as filled until after an **SP** both posts associated collateral and produces a proof for the slot. -## Contract Expires Before Beginning +## (0.1.0)Contract Expires Before Beginning If there are still empty slots when the timeout/expiry for the contract request expires, the deal is terminated. @@ -75,7 +75,7 @@ The **Storage Providers** who did fill slots, if any, are compensated for the am As there is a high probability of having at least a few slots occupied, there should be no need for further penalties on the **Client** to prevent spam requests and incentivise **Clients** to submit attractive deals. -## Contract Begins +## (0.1.0)Contract Begins The contract begins if *all* slots are occupied, that is, **SPs** have downloaded the data, posted collateral, and posted proofs before the timeout/expiry for the contract request is reached. @@ -83,23 +83,23 @@ At this moment, a *protocol fee* is applied on the user’s deposit. The proceed The remaining of the client’s deposit is held by the protocol and will be used to pay **SPs** at the end of the contract. -## Contract is Running +## (0.1.0)Contract is Running **Storage Providers** must submit proofs to **Validators** according to the storage request’s proof frequency, a parameter set by the Client in the request. -### Missing Proofs +### (0.1.0)Missing Proofs If an **SP** fails to submit proofs within the rolling last periods, they are partially slashed. The penalty is a fixed percentage of the collateral. Upon provision of a proof after being partially slashed, the SP should top up the missing collateral. Should the SP be slashed enough times, their entire collateral will be slashed and confiscated, and the SP is considered to have abandoned its slot. The provision of a correct proof at this moment will not revert the start of the slot recovery mechanism. -## A Slot in the Contract is Abandoned +## (0.1.0)A Slot in the Contract is Abandoned When an **SP** fails to submit enough proofs such that they are slashed enough times, their slot is considered abandoned. In order to incentivize a new **SP** to come in and takeover the abandoned slot (slot recovery), 50% of the collateral confiscated from the **SP** which has abandoned the slot is used as an incentive to the new **SP**. The remaining confiscated collateral is burned. This helps align the economic incentive for **SPs** to take over abandoned slots before filling new deals, since they can effectively earn forfeited collateral for taking over and fulfilling abandoned slots. -## Contract Defaults +## (0.1.0)Contract Defaults If, at any time during the life of the storage contract, the number of slots currently in an abandoned state (not yet recovered), meets or exceeds the maximum number of storage slots that can be lost before the data is unrecoverable, then the entire storage deal is considered to be in a *failed* state. @@ -107,7 +107,7 @@ Each **Storage Providers** posted collateral is burned. This incentivizes **SPs* Clients also receive back any leftover from their original payment. -## Contract Ends Its Full Duration +## (0.1.0)Contract Ends Its Full Duration When a started contract reaches its pre-specified duration without having previously defaulted, the contract completes. @@ -115,13 +115,13 @@ All collateral is returned to **SPs t**hat currently fill the slots (note due to Deals can not be automatically rolled forward or extended. If a **Client** desires to continue a deal, they must create a new storage contract request. Otherwise, Clients can retrieve their data. -# CDX Testnet Tokenomics +# (0.1.0)CDX Testnet Tokenomics The CDX token does not exist in the Testnet Phase. The description below refers to the mechanics of a Testnet token and not CDX itself and will be referred to as *CDX (Testnet token)* for this purpose. For the avoidance of doubt, the *CDX (Testnet token)* are virtual items with no value of any kind and they are not convertible to any other currency, token, or any other form of property. They are solely intended to be utilised for the purposes of enabling the tokenomics and facilitating the different roles in this Testnet Phase. -## Roles +## (0.1.0)Roles The Codex protocol has two primary roles fulfilled by network participants. @@ -129,7 +129,7 @@ The Codex protocol has two primary roles fulfilled by network participants. - **Storage Providers**: post *CDX (Testnet token)* collateral to enter into storage contracts with Clients in exchange for a *CDX (Testnet token)* denominated payment. - **Validators**: post *CDX (Testnet token)* collateral to validate storage proofs in exchange for a *CDX (Testnet token)* denominated payment. -## Token Utility +## (0.1.0)Token Utility The *CDX (Testnet token)* is used as both a form of posted collateral and a means of payment in order to secure the network and access its services. @@ -137,26 +137,26 @@ Collateral is primarily used as a spam and sybil-attack prevention mechanism, li Payments are made by Clients to Providers for services rendered, such as for storing data for a certain amount of time or retrieving data. This is implemented through the Marketplace contract, which serves as an escrow. Data in a storage contract is distributed into slots where each is, ideally, hosted by a different Storage Provider. -### **For Clients** +### (0.1.0)**For Clients** - Pay storage costs and fees in *CDX (Testnet token)* for storing files. -### **For Storage Providers** +### (0.1.0)**For Storage Providers** - Post collateral in *CDX (Testnet token)* when committing to new storage contracts. This collateral is slashed if they do not fulfill their agreed upon services. - Earn *CDX (Testnet token)* from the collateral of slashed Storage Providers by participating in the slot recovery mechanism. - Earn *CDX (Testnet token)* from Clients when successfully completing the storage service. -### For Validators +### (0.1.0)For Validators - Post collateral in *CDX (Testnet token)* to operate the validation service. This collateral is slashed if they do not mark a proof as missing within a predetermined period. - Earn *CDX (Testnet token)* from the collateral of slashed Storage Providers by marking proofs as missed Figure below depicts the flow of the *CDX (Testnet token)* token within the system. -![Flow of the *CDX token within the system](/learn/tokenomics-token-flow.png) +![Flow of the *CDX token within the system](/public/learn/tokenomics-token-flow.png) -## Value Capture and Accrual Mechanisms +## (0.1.0)Value Capture and Accrual Mechanisms Codex creates *value* to participants: @@ -170,7 +170,7 @@ Storage Providers and Validators are rewarded in *CDX (Testnet token)* token and The following mechanisms describe how the value accrues to the *CDX (Testnet token)* token. -### Protocol Fee over Contracts +### (0.1.0)Protocol Fee over Contracts If the contract is canceled before it starts, Client's deposited amount is charged a small penalty and returned, aiding to prevent low quality spam deal requests. @@ -178,9 +178,9 @@ If the contract successfully initiates, the protocol collects a fee for facilita The collected fees are burned in both cases. This creates a small but constant deflationary force on the token supply, which is proportional to the product demand. -## Behavior & Motivations +## (0.1.0)Behavior & Motivations -### Clients +### (0.1.0)Clients Clients have the following rational behavior: @@ -194,7 +194,7 @@ They may also exhibit the following adversarial behavior, whether for profit dri - Requesting storage from the network but not releasing the data to specific Providers - Attacking SPs that host their data to attempt to relieve their payment obligations at the end of the contract. -### **Storage Providers** +### (0.1.0)**Storage Providers** Storage Providers have the following rational behavior: @@ -209,7 +209,7 @@ They may also exhibit the following adversarial behavior, whether for profit dri - Ceasing to provide proofs mid the lifespan of a contract - Producing proofs, but not making data available for other nodes to retrieve -### Validators +### (0.1.0)Validators Validators have the following rational behavior: @@ -222,51 +222,51 @@ They may also exhibit the following adversarial behavior, whether for profit dri - Colluding with SPs to ignore missed proofs - Observing a missed proof but do not post it onchain -## Incentive Mechanisms +## (0.1.0)Incentive Mechanisms The following mechanisms help incentivize the expected behavior of each role and mitigate the detrimental ones. -### Clients Provide Full Payment Upfront +### (0.1.0)Clients Provide Full Payment Upfront Clients must deposit the full amount in *CDX (Testnet token)* that covers the entirety of the storage contract duration upfront. This indicates their pledge to pay a certain amount for the storage contract, though the contract only begins when and if all data slots are filled by Storage Providers. -### Delayed Payment to Storage Providers +### (0.1.0)Delayed Payment to Storage Providers Storage Providers only receive payment related to the provision of services at the end of the contract duration. -### Collateral Requirement +### (0.1.0)Collateral Requirement In order to fill a data slot, Storage Providers first stake and commit the required collateral in the form of the *CDX (Testnet token)* for that slot which is then subject to slashing if they do not post a proof to confirm the slot. Validators also need to post collateral to participate in the validation service. -### Proof of Storage +### (0.1.0)Proof of Storage Contracts only start when all data slots are filled. Slots are only considered filled after a Storage Provider has posted collateral and the associated proof for its slot. Once the contract begins, Storage Providers regularly provide proof of storage. -### **Slashing for Missed Proofs of Storage** +### (0.1.0)**Slashing for Missed Proofs of Storage** At any point during the duration of the storage contract, the storage provider is slashed if it fails to provide a certain number of proof of storage in a row. Should the SP resume providing proof of storage, it needs to top up the slashed collateral. The penalty is a fixed percentage of the total collateral. -### Slot Recovery Mechanism +### (0.1.0)Slot Recovery Mechanism If a Storage Provider does not submit the required storage proofs when required, after a number of slashings their entire collateral will be seized. A portion of the confiscated collateral is used as an incentive for the new Storage Provider who recovers and starts serving the abandoned slot. The remainder of the confiscated collateral in *CDX (Testnet token)* is burned. -### Slashing Defaulted Contract +### (0.1.0)Slashing Defaulted Contract If, at any point during the duration of the storage contract, the number of data slots currently abandoned (and not yet recovered) reaches or surpasses the maximum allowable lost slots (meaning the data becomes irretrievable), then the entire storage contract is deemed to be *failed*. At this stage, collaterals of all Storage Providers serving data slots in the contract are entirely slashed. -### Client Reimbursement +### (0.1.0)Client Reimbursement If at any point during the contract, sufficient slots are abandoned such that the data is not fully recoverable, Clients receive back any leftover from their original payment. -## Token Lifecycle +## (0.1.0)Token Lifecycle -### Burning +### (0.1.0)Burning *CDX (Testnet token)* tokens are burned in these instances: diff --git a/es/learn/troubleshoot.md b/versions/0.1.0/learn/troubleshoot.md similarity index 81% rename from es/learn/troubleshoot.md rename to versions/0.1.0/learn/troubleshoot.md index a9e0eee..d5563c7 100644 --- a/es/learn/troubleshoot.md +++ b/versions/0.1.0/learn/troubleshoot.md @@ -1,18 +1,18 @@ --- outline: [2, 3] --- -# Troubleshoot +# (0.1.0)Troubleshoot -Having trouble getting your Codex node connected to the testnet? Here's a list of common Codex connection conundrums and steps to diagnose and solve them. If your troubles are not addressed here, check our open issues on Github or reach out via our Discord server. +Having trouble getting your Codex node connected? Here's a list of common Codex connection conundrums and steps to diagnose and solve them. If your troubles are not addressed here, check our open issues on Github or reach out via our Discord server. -## Some basics +## (0.1.0)Some basics You've probably already considered these. But just in case: 1. Are you using a VPN? Make sure it's configured correctly to forward the right ports, and make sure you announce your node by the public IP address where you can be reached. 1. Are you using a firewall or other security software? Make sure it's configured to allow incoming connections to Codex's discovery and peer-to-peer ports. -## Check your announce address +## (0.1.0)Check your announce address Your node announces your public address to the network, so other nodes can connect to you. A common issue is connection failure due to incorrect announce addresses. Follow these steps to check your announce address. @@ -20,7 +20,7 @@ Your node announces your public address to the network, so other nodes can conne 1. Go into your router/modem WAN settings and find the public IP address. 1. These two addresses should match. 1. If they do not, it's possible that A) you're behind a VPN. In this case, it's up to you to disable the VPN or make sure all forwarding is configured correctly. or B) Your internet-service-provider has placed your uplink behind a secondary NAT. ISPs do this to save public IP addresses. The address assigned to your router/moderm is not a 'true' public internet address. Usually this issue can be solved by your ISP. Contact customer support and ask them to give you a public address (sometimes also called Dynamic IP address). -1. Call Codex's debug/info endpoint. See the [Using Codex](/learn/using) for the details. +1. Call Codex's debug/info endpoint. See the [Using Codex](../learn/using) for the details. 1. In the JSON response, you'll find "announceAddresses". 1. The IP address listed there should match your public IP. 1. If the announce address in the JSON is incorrect, you can adjust it manually by changing Codex's CLI argument `--nat` or setting the environment variable `CODEX_NAT`. After you've changed your announce address and restarted your node, please allow some time (20-30mins) for the network to disseminate the updated address. diff --git a/versions/0.1.0/learn/using.md b/versions/0.1.0/learn/using.md new file mode 100644 index 0000000..c17cc12 --- /dev/null +++ b/versions/0.1.0/learn/using.md @@ -0,0 +1,126 @@ +--- +outline: [2, 3] +--- +# (0.1.0)Using Codex + +We can interact with Codex using [REST API](../developers/api). This document will show you several useful examples. + +Also, we can check [Codex App UI](https://app.codex.storage). + +Command line interpreter on [Linux/macOS](#linux-macos) and [Windows](#windows) works slightly different, so please use steps for your OS. + +## (0.1.0)Linux/macOS + +### (0.1.0)Overview +1. [Debug](#debug) +2. [Upload a file](#upload-a-file) +3. [Download a file](#download-a-file) +4. [Local data](#local-data) + +### (0.1.0)Debug +An easy way to check that your node is up and running is: + +```shell +curl http://localhost:8080/api/codex/v1/debug/info \ + -w '\n' +``` + +This will return a JSON structure with plenty of information about your local node. It contains peer information that may be useful when troubleshooting connection issues. + +### (0.1.0)Upload a file +> [!Warning] +> Once you upload a file to Codex, other nodes in the network can download it. Please do not upload anything you don't want others to access, or, properly encrypt your data *first*. + +```shell +curl -X POST \ + http://localhost:8080/api/codex/v1/data \ + -H 'Content-Type: application/octet-stream' \ + -w '\n' \ + -T +``` + +On successful upload, you'll receive a CID. This can be used to download the file from any node in the network. + +> [!TIP] +> Are you on the [Codex Discord server](https://discord.gg/codex-storage)? Post your CID in the [# (0.1.0):wireless: | share-cids](https://discord.com/channels/895609329053474826/1278383098102284369) channel, see if others are able to download it. Codex does not (yet?) provide file metadata, so if you want others to be able to open your file, tell them which extension to give it. + +### (0.1.0)Download a file +When you have a CID of data you want to download, you can use the following commands: + +```shell +# (0.1.0)paste your CID from the previous step here between the quotes +CID="..." +``` + +```shell +curl "http://localhost:8080/api/codex/v1/data/${CID}/network/stream" \ + -o "${CID}.png" +``` + +Please use the correct extension for the downloaded file, because Codex does not store yet content-type or extension information. + +### (0.1.0)Local data +You can view which datasets are currently being stored by your node: + +```shell +curl http://localhost:8080/api/codex/v1/data \ + -w '\n' +``` + +## (0.1.0)Windows + +### (0.1.0)Overview {#overview-windows} +1. [Debug](#debug-windows) +2. [Upload a file](#upload-a-file-windows) +3. [Download a file](#download-a-file-windows) +4. [Local data](#local-data-windows) + +### (0.1.0)Debug {#debug-windows} +An easy way to check that your node is up and running is: + +```batch +curl http://localhost:8080/api/codex/v1/debug/info +``` + +This will return a JSON structure with plenty of information about your local node. It contains peer information that may be useful when troubleshooting connection issues. + +### (0.1.0)Upload a file {#upload-a-file-windows} +> [!Warning] +> Once you upload a file to Codex, other nodes in the network can download it. Please do not upload anything you don't want others to access, or, properly encrypt your data *first*. + +```batch +curl -X POST ^ + http://localhost:8080/api/codex/v1/data ^ + -H "Content-Type: application/octet-stream" ^ + -T +``` + +On successful upload, you'll receive a CID. This can be used to download the file from any node in the network. + +> [!TIP] +> Are you on the [Codex Discord server](https://discord.gg/codex-storage)? Post your CID in the [# (0.1.0):wireless: | share-cids](https://discord.com/channels/895609329053474826/1278383098102284369) channel, see if others are able to download it. Codex does not (yet?) provide file metadata, so if you want others to be able to open your file, tell them which extension to give it. + +### (0.1.0)Download a file {#download-a-file-windows} +When you have a CID of data you want to download, you can use the following commands: + +```batch +:: paste your CID from the previous step here between the quotes +set CID="..." +``` + +```batch +curl "http://localhost:8080/api/codex/v1/data/%CID%/network/stream" ^ + -o "%CID%.png" +``` + +Please use the correct extension for the downloaded file, because Codex does not store yet content-type or extension information. + +### (0.1.0)Local data {#local-data-windows} +You can view which datasets are currently being stored by your node: + +```batch +curl http://localhost:8080/api/codex/v1/data +``` + +## (0.1.0)Known issues +1. We add a new line to the API calls to get more readable output, please check [[rest] Add line ending on responses #771](https://github.com/codex-storage/nim-codex/issues/771) for more details. diff --git a/versions/0.1.0/learn/what-is-codex.md b/versions/0.1.0/learn/what-is-codex.md new file mode 100644 index 0000000..ddada55 --- /dev/null +++ b/versions/0.1.0/learn/what-is-codex.md @@ -0,0 +1,39 @@ +# (0.1.0)What is Codex? + +Codex is a decentralised data storage protocol. Its primary features are strong censorship resistance and durability guarantees. It has a reference implementation by the same name, written in nim. It serves as the storage layer of the [Logos](https://logos.co/) tech stack. Alongside the trustless agreement layer, [Nomos](http://nomos.tech), and the communications layer, [Waku](http://waku.org), it is one of the Logos Collective's foundational projects. + +
+ +

+ +### (0.1.0)Motive + +The remote storage landscape is dominated by an increasingly small number of internet powerhouses—Google, Microsoft, Amazon, etc. While these services score highly in terms of user experience and convenience, centralised cloud data storage suffers from the following drawbacks: + +- Censorship + +- Lack of data ownership + +- Breaches and outages + +- High cost + +Centralised cloud storage providers have an established history of censoring data and, as de facto owners of said data, have the power to do so according to their own standards. Furthermore, centralised platforms have fallen victim to major data breaches and service outages on numerous occasions. + +Such incidents have created a gap in the market for a decentralised, censorship-resistant alternative. Existing peer-to-peer storage and file-sharing networks address some of these issues—such as robustness in the face of network disruptions, and desirable resistance to censorship. Yet without adequate incentives and strong data durability guarantees, they make for unsuitable foundations upon which to build truly unstoppable applications. + +Existing decentralised storage solutions purport to improve upon early P2P file-sharing platforms like eDonkey and Gnutella. However, the market still lacks a decentralised storage solution that is efficient in terms of storage and bandwidth usage, while offering performance and durability guarantees comparable to incumbents. + +
+ +### (0.1.0)Decentralising data storage + +Codex began in 2021 to address a need for a durable, decentralised storage layer for the web3 tech stack. + +The name "Codex" refers to an ancient form of book—an allusion to the data storage engine's extremely robust—99.99%—durability guarantees. + +Codex was announced as a core Logos Collective protocol in June 2023. + +### (0.1.0)Testnet + +Codex is currently in the testnet phase. The client implementation is free and open software. If you're interested, we encourage you to try Codex, connect to the testnet and experiment with its features. [Get started here](./quick-start.md) diff --git a/es/learn/whitepaper.md b/versions/0.1.0/learn/whitepaper.md similarity index 98% rename from es/learn/whitepaper.md rename to versions/0.1.0/learn/whitepaper.md index 7ee3688..9f3370d 100644 --- a/es/learn/whitepaper.md +++ b/versions/0.1.0/learn/whitepaper.md @@ -15,7 +15,7 @@ We describe the architecture and mechanisms of Codex, including its marketplace -## 1. Introduction +## (0.1.0)1. Introduction Data production has been growing at an astounding pace, with significant implications. Data is a critical asset for businesses, driving decision-making, strategic planning, and innovation. Individuals increasingly intertwine their physical lives with the digital world, meticulously documenting every aspect of their lives, taking pictures and videos, sharing their views and perspectives on current events, using digital means for communication and artistic expression, etc. Digital personas have become as important as their physical counterparts, and this tendency is only increasing. Yet, the current trend towards centralization on the web has led to a situation where users have little to no control over their personal data and how it is used. Large corporations collect, analyze, and monetize user data, often without consent or transparency. This lack of privacy leaves individuals vulnerable to targeted advertising, profiling, surveillance, and potential misuse of their personal information. @@ -32,11 +32,11 @@ In response to these challenges, we introduce Codex: a novel Erasure Coded Decen The remainder of this paper is organized as follows. First, we discuss the context on which Codex is built (Sec. 2) by expanding on the issues of centralized cloud storage, and providing background on previous takes at decentralized alternatives -- namely, p2p networks, blockchains, and DSNs. Then, we introduce the conceptual framework that underpins Codex in Sec. 3 -- the Decentralized Durability Engine (DDE) -- followed by a more detailed descriptions of the mechanisms behind Codex and how it materializes as a DDE in Sec. 4. Sec. 5 then presents a preliminary reliability analysis, which places Codex's storage parameters alongside more formal durability guarantees. Finally, Sec. 6 provides conclusions and ongoing work. -## 2. Background and Context +## (0.1.0)2. Background and Context Codex aims at being a useful and decentralized alternative to centralized storage. In this section, we discuss the context in which this needs arises, as well as why past and current approaches to building and reasoning about decentralized storage were incomplete. This will set the stage for our introduction of the Decentralized Durability Engine -- our approach to reasoning about decentralized storage -- in Sec. 3. -### 2.1. Centralized Cloud Storage +### (0.1.0)2.1. Centralized Cloud Storage Over the past two decades, centralized cloud storage has become the _de facto_ approach for storage services on the internet for both individuals and companies alike. Indeed, recent research places the percentage of businesses that rely on at least one cloud provider at $94\%$[^zippia_cloud_report], while most modern smartphones will backup their contents to a cloud storage provider by default. The appeal is clear: scalable, easy-to-use elastic storage and networking coupled with a flexible pay-as-you-go model and a strong focus on durability[^s3_reinvent_19] translating to dependable infrastructure that is available immediately and at the exact scale required. @@ -45,7 +45,7 @@ Centralization, however, carries a long list of downsides, most of them due to h The final downside is economical: since very few companies can currently provide such services at the scale and quality required, the billions in customer spending gets funneled into the pockets of a handful of individuals. Oligopolies such as these can derail into an uncompetitive market which finds its equilibrium at a price point which is not necessarily in the best interest of end-users[^feng_14]. -### 2.2. Decentralized Alternatives: Past and Present +### (0.1.0)2.2. Decentralized Alternatives: Past and Present Given the downsides of centralized cloud storage, it is natural to wonder if there could be alternatives, and indeed those have been extensively researched since the early 2000's. We will not attempt to cover that entire space here, and will instead focus on what we consider to be the three main technological breakthroughs that happened in decentralized systems over these past two decades, and why they have failed to make meaningful inroads thus far: P2P networks, blockchains, and Data Storage Networks (DSNs). @@ -82,7 +82,7 @@ Such elements are of particular importance as one attempts to reason about what In the next section, we explore a construct we name Decentralized Durability Engines which, we argue, lead to a more principled approach to designing storage systems that provide utility. -## 3. Decentralized Durability Engines (DDE) +## (0.1.0)3. Decentralized Durability Engines (DDE) A Decentralized Durability Engine is a tuple $\Gamma = \text{(R, A, P, I, D)}$ where: @@ -96,13 +96,13 @@ We argue that when designing a storage system that can keep data around, none of This is a somewhat informal treatment for now, but the actual parameters that would be input into any reliability analysis of a storage system would be contingent on those choices. In a future publication, we will explore how durability is affected by the choice of each of these elements in a formal framework. -## 4. Codex: A Decentralized Durability Engine +## (0.1.0)4. Codex: A Decentralized Durability Engine This section describes how Codex actually works. The primary motivation behind Codex is to provide a scalable and robust decentralized storage solution which addresses the limitations of existing DSNs. This includes: i) enhanced durability guarantees that can be reasoned about, ii) scalability and performance and iii) decentralization and censorship resistance. We start this section by laying out key concepts required to understand how Codex works (Sec. 4.1). We then discuss the redundancy ($R$), remote auditing ($A$), and repair mechanisms ($P$) of Codex and how they combine erasure codes and zero-knowledge proofs into a system that is lightweight, efficient, and amenable to decentralization. Sec. 4.4 takes a detour onto the networking layer and provides an overview of our scalable data transfer protocols. Finally, incentives ($I$) and dispersal $(D)$ are discussed in Sec. 4.5 as part of the Codex marketplace. -### 4.1. Concepts +### (0.1.0)4.1. Concepts In the context of Codex (and of storage systems in general), two properties appear as fundamental: @@ -126,7 +126,7 @@ Ideally, we would like storage systems to be highly available and highly durable **Storage Provider (SP).** A Storage Provider is a node that participates in Codex by selling disk space to other nodes. -### 4.2. Overview +### (0.1.0)4.2. Overview At a high level, storing data in Codex works as follows. Whenever a SC wishes to store a dataset $D$ into Codex, it: @@ -144,7 +144,7 @@ The Codex marketplace (Sec. 4.5) then ensures that SPs willing to store data for Once this process completes, we say that slot $S_i$ has been **filled**. Once all slots in $D_e$ have been filled, we say that $D_e$ has been **fulfilled**. For the remainder of this section, we will dive into the architecture and mechanisms of Codex by explaining in more detail each aspect of the storage flow. -### 4.3. Erasure Coding, Repair, and Storage Proofs +### (0.1.0)4.3. Erasure Coding, Repair, and Storage Proofs Erasure coding plays two main roles in Codex: _i)_ allowing data to be recovered following loss of one or more SPs and the slots that they hold (redundancy) and _ii)_ enabling cost-effective proofs of storage. We will go through each of these aspects separately. @@ -234,7 +234,7 @@ A key aspect of the Codex proving system is that it attempts to be as lightweigh 1. both non-storage hardware; e.g. CPUs and RAM, and electricity overhead costs for proofs should be small. This leads to better margins for SPs; 2. minimal requirements are modest, which favours decentralization. -### 4.4. Publishing and Retrieving Data +### (0.1.0)4.4. Publishing and Retrieving Data Datasets stored in Codex need to be advertised over a Distributed Hash Table (DHT), which is a flavour of the Kademlia DHT[^maymounkov_02], so they can be located and retrieved by other peers. At a basic level, the Codex DHT maps _Content IDentifiers_ (CIDs)[^cid_spec], which identify data, onto _provider lists_, which identify peers holding that data. @@ -275,7 +275,7 @@ The nodes responsible for that CID will reply with a (randomized) subset of the Codex right now relies on simple incentive mechanisms to ensure that peers share blocks. There is current ongoing work on _bandwidth incentives_ and, in future versions, peers will be able to purchase block transfers from each other. -### 4.5. Codex Marketplace +### (0.1.0)4.5. Codex Marketplace The Codex marketplace is the set of components that run both on-chain, as smart contracts, and off-chain, as part of both SCs and SPs. Its main goal is to define and enforce the set of rules which together enable: _i)_ orderly selling and purchasing of storage; _ii)_ verification of storage proofs; _iii)_ rules for penalizing faulty actors (slashing) and compensating SP repairs and SC data loss; and _iv)_ various other aspects of the system's economics, which will be discussed as part of an upcoming Codex tokenomics litepaper. @@ -327,7 +327,7 @@ $$ where $t = 0$ at the moment in which the storage request for $a$ is published. In the example in Figure 8, host $b$ will be allowed to fill slot $a$ when $t \geq 2$, whereas host $c$ will only be allowed to try once $t \geq 3$. We will not attempt to formally prove this but, under relatively weak assumptions, this guarantees that the assignments of slots to SPs happens approximately uniformly at random. -## 5. Reliability Analysis +## (0.1.0)5. Reliability Analysis In this section, we provide an initial analysis of durability for Codex. The main goal is investigating the values for $p_{\text{loss}}$, our probability of losing data over a 1-year period. In particular, we are interested in understanding what sorts of parameters are required for us to obtain very high levels of reliability (e.g. $p_{\text{loss}} = 10^{-9}$, or nine nines of availability). @@ -343,7 +343,7 @@ Before discussing the state space and the rate matix of the CTMC model, lets des As before, we assume a dataset $D$ split into $k$ disjoint partitions, and encoded into a new dataset $D_e$ with $n=k+m$ slots $\{S_1, \cdots, S_k , \cdots, S_{k+m}\}$. This encoding is often characterized by it's code expansion factor $e = n/k =1+m/k$, expressing the storage overhead due to code redundancy. -### 5.1. Failure Model +### (0.1.0)5.1. Failure Model When discussing failures, we should differentiate between transient and permanent failures, as well as between catastrophic node failures (the slot data is entirely lost) and partial failures. @@ -357,7 +357,7 @@ For the sake of modeling, we also assume i.i.d. (independent and identically dis There might also be malicious nodes in the set of storage providers, e.g. withholding data when reconstruction would be required. Again, we will extend the model to these in a separate document. -### 5.2. Reconstruction Model +### (0.1.0)5.2. Reconstruction Model The next important time related parameter of the model is **MTTR** (Mean Time To Reconstruct). While we model events at the level of a single dataset, it is important to note here that a failure event most probably involves entire disks or entire nodes with multiple disks, with many datasets and a large amount of data. Therefore, in the case of reconstruction, the stochastic processes of individual datasets are not independent of each other, leading to higher and uncertain reconstruction times. @@ -370,7 +370,7 @@ The actual repair time depends on a number of factors: Overall, it is clearly not easy to come up with a reasonable distribution for the time of repair, not even the mean time of repair. While time to repair is most probably not an exponential distribution, we model it as such in a first approximation to allow Markov Chain based modeling. -### 5.3. Triggering Reconstruction +### (0.1.0)5.3. Triggering Reconstruction Reconstruction and re-allocation of slots can be triggered by the observed state, and our system "observes" state through the proving process. In our model, we assume that nodes are providing proofs according to a random process with an exponential distribution between proving times, with **MTBF** (Mean Time Between Proofs) mean, i.i.d. between nodes. Other distributions are also possible, but for the sake of modelling we start with an exponential distribution, which is also simple to implement in practice. @@ -378,13 +378,13 @@ Reconstruction can be triggered based on the observed state in various ways: - if an individual node is missing a slot proof (or more generally, a series of proofs), reconstruction can start. The advantage of this option is that the consequences of failing a proof only depend on the node itself, and not on other nodes. - reconstruction can also be triggered by the observed system state, i.e. the number of nodes that have missed the last proof (or more in general some of the last proofs). In fact, thanks to the properties of RS codes, whenever a slot is being repaired, all slot's data are regenerated. As a consequence, the cost of repair is independent of the number of slots being repaired, and by triggering repair only after multiple slots are observed lost (the so called "lazy repair"), we can drastically reduce the cost of repair. -In our model, we assume reconstruction that uses a combination of the above too triggers. +In our model, we assume reconstruction that uses a combination of the above two triggers. - Reconstruction is triggered based on the observed system state, allowing for lazy repair, by triggering it when $l_0$ of the slots is considered lost. - A single slot is considered lost if it was missing the last $l_1$ proofs. Other reconstruction strategies, such as considering all the proofs from all the slots in a time window, are also possible, but we leave these for further study. -### 5.4. CTMC Model +### (0.1.0)5.4. CTMC Model We model the system using a CTMC with a multi-dimensional state space representing slot status and proof progress. To keep the description simple, we introduce the model for the case of $l_1 = 1$ here. An extension to $l_1 > 1$ is possible by increasing the dimensions of the state space to $1+l_1$. @@ -425,7 +425,7 @@ The figure also shows what $k$ and $m$ values are needed to reach a given reliab **Table 1.** Expansion, lazy repair, and required values for $k$ and $m$ to achieve $p_{\text{loss}} = 10^{-9}$ -### 5.5 Proving frequency +### (0.1.0)5.5 Proving frequency An important parameter to asses is the frequency of proofs, expressed in our model as MTBP, since it directly translates into proof generation and proof submission costs. If we could double MTBP, we could halve the associated costs. @@ -442,7 +442,7 @@ As expected, large values of MTBP (infrequent proofs) are not acceptable, the da Note however that we are still using $l_1=1$ in our model, i.e. a slot is considered lost after a single failed proof. We consider this to be too reactive, since single proofs might be missed due to temporary failures. Without going into much detail, a higher tolerance on missed proofs ($l_1 > 1$) is similar to multiplying MTBF by $l_1$ (although the model becomes more complex, with an $l_1 +1$ dimensional state space). -## 6. Conclusions and Future Work +## (0.1.0)6. Conclusions and Future Work We have presented Codex, a Decentralized Durability Engine which employs erasure coding and efficient proofs of storage to provide tunable durability guarantees and a favourable tradeoff in cost and complexity for storage providers. By having proofs that are lightweight, Codex can keep the overhead spendings on hardware and electricity to a minimal. This is important both for fostering participation, as storage provider margins can be increased while prices for clients can decrease, and decentralization, as modest requirements are more likely to encourage a more diverse set of participants ranging from hobbyist home providers to larger players. @@ -463,7 +463,7 @@ Codex has the potential to support a wide range of use cases, from personal data Ultimately, the use case for Codex is that of a durable and functional decentralized storage layer, without which no decentralized technology stack can be seriously contemplated. As the decentralized ecosystem continues to evolve, we expect Codex’s DDE-based approach to storage to play a crucial role in enabling new types of applications and services that prioritize user control, privacy, and resilience. -## References +## (0.1.0)References [^tanembaum]: A. S. Tanenbaum and M. van Steen, Distributed Systems: Principles and Paradigms, 2nd ed. Upper Saddle River, NJ, USA: Pearson Education, 2007. diff --git a/versions/0.1.0/networks/devnet.md b/versions/0.1.0/networks/devnet.md new file mode 100644 index 0000000..9d9e564 --- /dev/null +++ b/versions/0.1.0/networks/devnet.md @@ -0,0 +1,8 @@ +--- +outline: [2, 4] +--- +# (0.1.0)Codex Devnet + +The Codex devnet is under construction :building_construction: + +The Codex devnet is currently offline for a period of redesign and upgrades. diff --git a/versions/0.1.0/networks/networks.md b/versions/0.1.0/networks/networks.md new file mode 100644 index 0000000..3353012 --- /dev/null +++ b/versions/0.1.0/networks/networks.md @@ -0,0 +1,7 @@ +# (0.1.0)Codex networks + + At Codex, we will be launching both a devnet and a testnet. + | Network | Status | Purpose | + | ------------------ | -------------- | ----------------------------------------------------------------------- | + | [Devnet](./devnet) | :construction: | Dedicated for development purposes and following latest `master` builds | + | [Testnet](./testnet) | :construction: | A public network for testing purposes, following latest releases | diff --git a/versions/0.1.0/networks/testnet.md b/versions/0.1.0/networks/testnet.md new file mode 100644 index 0000000..9bdb9a7 --- /dev/null +++ b/versions/0.1.0/networks/testnet.md @@ -0,0 +1,9 @@ +--- +outline: [2, 4] +--- +# (0.1.0)Codex Testnet + +The Codex testnet is under construction :building_construction: + +The Codex testnet is currently offline for a period of redesign and upgrades. +See [Pausing Testnet for Our Next Phase of Development](https://blog.codex.storage/codex-august-updates-2/) diff --git a/versions/0.1.0/sidebar.json b/versions/0.1.0/sidebar.json new file mode 100644 index 0000000..67fa430 --- /dev/null +++ b/versions/0.1.0/sidebar.json @@ -0,0 +1,122 @@ +{ + "/": [ + { + "text": "0.1.0 Introduction", + "collapsed": false, + "items": [ + { + "text": "0.1.0 What is Codex?", + "link": "/learn/what-is-codex" + }, + { + "text": "0.1.0 Architecture", + "link": "/learn/architecture" + }, + { + "text": "0.1.0 Whitepaper", + "link": "/learn/whitepaper" + }, + { + "text": "0.1.0 Tokenomics Litepaper", + "link": "/learn/tokenomics-litepaper" + } + ] + }, + { + "text": "0.1.0 Setup Codex with Installer", + "collapsed": false, + "items": [ + { + "text": "0.1.0 Disclaimer", + "link": "/codex/installer-disclaimer" + }, + { + "text": "0.1.0 Requirements", + "link": "/learn/installer/requirements" + }, + { + "text": "0.1.0 Install and Run Codex", + "link": "/learn/installer/install-and-run" + }, + { + "text": "0.1.0 Upload/Download", + "link": "/learn/installer/upload-and-download" + } + ] + }, + { + "text": "0.1.0 Setup Codex Manually", + "collapsed": false, + "items": [ + { + "text": "0.1.0 Disclaimer", + "link": "/codex/disclaimer" + }, + { + "text": "0.1.0 Quick start", + "link": "/learn/quick-start" + }, + { + "text": "0.1.0 Build Codex", + "link": "/learn/build" + }, + { + "text": "0.1.0 Run Codex", + "link": "/learn/run" + }, + { + "text": "0.1.0 Using Codex", + "link": "/learn/using" + }, + { + "text": "0.1.0 Local Two Client Test", + "link": "/learn/local-two-client-test" + }, + { + "text": "0.1.0 Local Marketplace", + "link": "/learn/local-marketplace" + }, + { + "text": "0.1.0 Download Flow", + "link": "/learn/download-flow" + }, + { + "text": "0.1.0 Troubleshoot", + "link": "/learn/troubleshoot" + } + ] + }, + { + "text": "0.1.0 Developers", + "collapsed": false, + "items": [ + { + "text": "0.1.0 API", + "link": "/developers/api" + } + ] + }, + { + "text": "0.1.0 Codex", + "collapsed": false, + "items": [ + { + "text": "0.1.0 About", + "link": "/codex/about" + }, + { + "text": "0.1.0 Security", + "link": "/codex/security" + }, + { + "text": "0.1.0 Privacy Policy", + "link": "/codex/privacy-policy" + }, + { + "text": "0.1.0 Terms of Use", + "link": "/codex/terms-of-use" + } + ] + } + ] +} \ No newline at end of file