Adding Protocol specification to docs (WIP) #1727

Closed
g1itch wants to merge 12 commits from doc into v0.6
g1itch commented 2021-02-04 18:17:16 +01:00 (Migrated from github.com)

I am slowly formatting Protocol Specification doc. I see some typos and mistakes in the wiki, which I also hope to fix.

A quick preview

I am slowly formatting Protocol Specification doc. I see some typos and mistakes in the wiki, which I also hope to fix. [A quick preview](https://pybitmessage-test.readthedocs.io/en/doc/protocol.html)
g1itch commented 2021-03-10 22:17:54 +01:00 (Migrated from github.com)

Almost finished (: The first question is about references: there are some references to object type definition tables like var_int, var_str, var_int_list, which are incomplete; so I cannot guess how to make them properly:

  1. reference in each mentioning
  2. one reference per table
  3. only the references found in current wiki
Almost finished (: The first question is about references: there are some references to object type definition tables like var_int, var_str, var_int_list, which are incomplete; so I cannot guess how to make them properly: 1. reference in each mentioning 1. one reference per table 1. only the references found in current wiki
g1itch commented 2021-07-24 15:47:47 +02:00 (Migrated from github.com)

Another question: what addresses of version 5 has to do with extended encoding? In the section Extended encoding Specification says: "It is planned that v5 addresses will have to support this.". The v5 address is an address with compressed pubkey instead of ripe, if I recall it correctly. Unfortunately I cannot found an issue which describes it.

Another question: what addresses of version 5 has to do with extended encoding? In the section [Extended encoding](https://wiki.bitmessage.org/index.php/Extended_encoding) Specification says: "It is planned that v5 addresses will have to support this.". The v5 address is an address with compressed pubkey instead of ripe, if I recall it correctly. Unfortunately I cannot found an issue which describes it.
PeterSurda commented 2021-07-25 05:07:22 +02:00 (Migrated from github.com)

Another question: what addresses of version 5 has to do with extended encoding?

There hasn't been a decision made about this yet, only me making proposals. I'd be very happy for feedback on how to properly add new features (extended encoding, new pubkey format, ...), i.e. whether to use a new version, a flag in the bitfield, or something else.

> Another question: what addresses of version 5 has to do with extended encoding? There hasn't been a decision made about this yet, only me making proposals. I'd be very happy for feedback on how to properly add new features (extended encoding, new pubkey format, ...), i.e. whether to use a new version, a flag in the bitfield, or something else.
g1itch commented 2021-07-26 17:19:31 +02:00 (Migrated from github.com)

There hasn't been a decision made about this yet, only me making proposals.

I'm really surprised there is no ticket for addresses v5. May Bitmessage have some standards track, you know, the BIPs or BEP - in pythonic style?

I'd be very happy for feedback on how to properly add new features (extended encoding, new pubkey format, ...), i.e. whether to use a new version, a flag in the bitfield, or something else.

This reminds me #1612. I don't think that such things need any signaling in bitfield, because they don't affect the communication between nodes, e.g. don't introduce a new command like "invbloom" or "dinv".

Here I'm just asking about the text of this section in the Protocol Specification.

> There hasn't been a decision made about this yet, only me making proposals. I'm really surprised there is no ticket for addresses v5. May Bitmessage have some standards track, you know, the BIPs or BEP - in pythonic style? > I'd be very happy for feedback on how to properly add new features (extended encoding, new pubkey format, ...), i.e. whether to use a new version, a flag in the bitfield, or something else. This reminds me #1612. I don't think that such things need any signaling in bitfield, because they don't affect the communication between nodes, e.g. don't introduce a new command like "invbloom" or "dinv". Here I'm just asking about the text of this section in the Protocol Specification.
PeterSurda (Migrated from github.com) approved these changes 2021-10-05 09:02:35 +02:00
g1itch commented 2021-10-05 11:58:42 +02:00 (Migrated from github.com)

Do you want me to squash and merge as is and make changes related to links and address generation in the separate PR?

Do you want me to squash and merge as is and make changes related to links and address generation in the separate PR?
PeterSurda commented 2021-10-05 12:00:36 +02:00 (Migrated from github.com)

I leave it up to you.

I leave it up to you.
g1itch commented 2021-11-20 18:12:59 +01:00 (Migrated from github.com)

Hmm, now I'm observing a strange failure while building the docs:

reading sources... [ 26%] autodoc/pybitmessage.class_singleCleaner
WARNING: autodoc: failed to import module u'bitmessageqt' from module u'pybitmessage'; the following exception was raised:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/ext/autodoc/importer.py", line 154, in import_module
    __import__(modname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/pybitmessage/bitmessageqt/__init__.py", line 26, in <module>
    from bitmessageui import Ui_MainWindow
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/pybitmessage/bitmessageqt/bitmessageui.py", line 12, in <module>
    from foldertree import AddressBookCompleter
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/pybitmessage/bitmessageqt/foldertree.py", line 23, in <module>
    TimestampRole = QtCore.Qt.UserRole + 1
TypeError: unsupported operand type(s) for +: '_MockObject' and 'int'

...

WARNING: autodoc: failed to import module u'bitmessageqt.widgets' from module u'pybitmessage'; the following exception was raised:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/ext/autodoc/importer.py", line 154, in import_module
    __import__(modname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/pybitmessage/bitmessageqt/__init__.py", line 26, in <module>
    from bitmessageui import Ui_MainWindow
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/pybitmessage/bitmessageqt/bitmessageui.py", line 12, in <module>
    from foldertree import AddressBookCompleter
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/pybitmessage/bitmessageqt/foldertree.py", line 23, in <module>
    TimestampRole = QtCore.Qt.UserRole + 1
TypeError: unsupported operand type(s) for +: '_MockObject' and 'int'


Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/cmd/build.py", line 304, in build_main
    app.build(args.force_all, filenames)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/application.py", line 341, in build
    self.builder.build_update()
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 347, in build_update
    len(to_build))
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 360, in build
    updated_docnames = set(self.read())
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 468, in read
    self._read_serial(docnames)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 490, in _read_serial
    self.read_doc(docname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 534, in read_doc
    doctree = read_doc(self.app, self.env, self.env.doc2path(docname))
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/io.py", line 318, in read_doc
    pub.publish()
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/docutils/core.py", line 219, in publish
    self.apply_transforms()
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/docutils/core.py", line 200, in apply_transforms
    self.document.transformer.apply_transforms()
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/transforms/__init__.py", line 90, in apply_transforms
    Transformer.apply_transforms(self)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/docutils/transforms/__init__.py", line 171, in apply_transforms
    transform.apply(**kwargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/transforms/__init__.py", line 245, in apply
    apply_source_workaround(n)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/util/nodes.py", line 94, in apply_source_workaround
    for classifier in reversed(node.parent.traverse(nodes.classifier)):
TypeError: argument to reversed() must be a sequence

Exception occurred:
  File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/util/nodes.py", line 94, in apply_source_workaround
    for classifier in reversed(node.parent.traverse(nodes.classifier)):
TypeError: argument to reversed() must be a sequence
Hmm, now I'm observing a strange failure while building the docs: ``` reading sources... [ 26%] autodoc/pybitmessage.class_singleCleaner WARNING: autodoc: failed to import module u'bitmessageqt' from module u'pybitmessage'; the following exception was raised: Traceback (most recent call last): File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/ext/autodoc/importer.py", line 154, in import_module __import__(modname) File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/pybitmessage/bitmessageqt/__init__.py", line 26, in <module> from bitmessageui import Ui_MainWindow File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/pybitmessage/bitmessageqt/bitmessageui.py", line 12, in <module> from foldertree import AddressBookCompleter File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/pybitmessage/bitmessageqt/foldertree.py", line 23, in <module> TimestampRole = QtCore.Qt.UserRole + 1 TypeError: unsupported operand type(s) for +: '_MockObject' and 'int' ... WARNING: autodoc: failed to import module u'bitmessageqt.widgets' from module u'pybitmessage'; the following exception was raised: Traceback (most recent call last): File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/ext/autodoc/importer.py", line 154, in import_module __import__(modname) File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/pybitmessage/bitmessageqt/__init__.py", line 26, in <module> from bitmessageui import Ui_MainWindow File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/pybitmessage/bitmessageqt/bitmessageui.py", line 12, in <module> from foldertree import AddressBookCompleter File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/pybitmessage/bitmessageqt/foldertree.py", line 23, in <module> TimestampRole = QtCore.Qt.UserRole + 1 TypeError: unsupported operand type(s) for +: '_MockObject' and 'int' Traceback (most recent call last): File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/cmd/build.py", line 304, in build_main app.build(args.force_all, filenames) File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/application.py", line 341, in build self.builder.build_update() File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 347, in build_update len(to_build)) File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 360, in build updated_docnames = set(self.read()) File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 468, in read self._read_serial(docnames) File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 490, in _read_serial self.read_doc(docname) File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 534, in read_doc doctree = read_doc(self.app, self.env, self.env.doc2path(docname)) File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/io.py", line 318, in read_doc pub.publish() File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/docutils/core.py", line 219, in publish self.apply_transforms() File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/docutils/core.py", line 200, in apply_transforms self.document.transformer.apply_transforms() File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/transforms/__init__.py", line 90, in apply_transforms Transformer.apply_transforms(self) File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/docutils/transforms/__init__.py", line 171, in apply_transforms transform.apply(**kwargs) File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/transforms/__init__.py", line 245, in apply apply_source_workaround(n) File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/util/nodes.py", line 94, in apply_source_workaround for classifier in reversed(node.parent.traverse(nodes.classifier)): TypeError: argument to reversed() must be a sequence Exception occurred: File "/home/docs/checkouts/readthedocs.org/user_builds/pybitmessage-test/envs/doc/lib/python2.7/site-packages/sphinx/util/nodes.py", line 94, in apply_source_workaround for classifier in reversed(node.parent.traverse(nodes.classifier)): TypeError: argument to reversed() must be a sequence ```
g1itch commented 2021-11-20 21:22:56 +01:00 (Migrated from github.com)

Hmm, now I'm observing a strange failure while building the docs:

More interesting is that I'm still able to build them locally with these changes:

diff --git a/setup.py b/setup.py
index 7b4821d7..d1662b6f 100644
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,7 @@ from src.version import softwareVersion
 
 
 EXTRAS_REQUIRE = {
-    'docs': ['sphinx', 'sphinxcontrib-apidoc', 'm2r'],
+    'docs': ['sphinx', 'sphinxcontrib-apidoc', 'm2r', 'sphinx_rtd_theme'],
     'gir': ['pygobject'],
     'json': ['jsonrpclib'],
     'notify2': ['notify2'],
diff --git a/tox.ini b/tox.ini
index 211afd47..89d65d00 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = reset,py{27,37,38},stats
+envlist = reset,py{27,37,38},stats,py27-doc
 skip_missing_interpreters = true
 
 [testenv]
@@ -12,6 +12,10 @@ commands =
     coverage run -a src/bitmessagemain.py -t
     coverage run -a -m tests
 
+[testenv:py27-doc]
+deps = .[docs]
+commands = python setup.py build_sphinx
+
 [testenv:reset]
 commands = coverage erase

Using the command

tox -r -e py27-doc
> Hmm, now I'm observing a strange failure while building the docs: > More interesting is that I'm still able to build them locally with these changes: ```diff diff --git a/setup.py b/setup.py index 7b4821d7..d1662b6f 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ from src.version import softwareVersion EXTRAS_REQUIRE = { - 'docs': ['sphinx', 'sphinxcontrib-apidoc', 'm2r'], + 'docs': ['sphinx', 'sphinxcontrib-apidoc', 'm2r', 'sphinx_rtd_theme'], 'gir': ['pygobject'], 'json': ['jsonrpclib'], 'notify2': ['notify2'], diff --git a/tox.ini b/tox.ini index 211afd47..89d65d00 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = reset,py{27,37,38},stats +envlist = reset,py{27,37,38},stats,py27-doc skip_missing_interpreters = true [testenv] @@ -12,6 +12,10 @@ commands = coverage run -a src/bitmessagemain.py -t coverage run -a -m tests +[testenv:py27-doc] +deps = .[docs] +commands = python setup.py build_sphinx + [testenv:reset] commands = coverage erase ``` Using the command ``` tox -r -e py27-doc ```
This repo is archived. You cannot comment on pull requests.
No description provided.