<commit_before>Network Working Group                                       <NAME>
Request for Comments:                                      Open-UDC Team


      ==== OpenUDC Exchange Formats  ====

 === Abstract ===

 === Status of This Memo ===

 (Today 1st december 2011, it is still a draft).

 === Copyright Notice ===

 === Table of Contents ===

 1. Introduction ....................................................
 2. Conventions Used in This Document ...............................
 3. Validation Nodes act as HTTP Servers ..........................
 4. Tree Structure of Validation Nodes ............................
 5. Data expected in the tree structure .............................
    5.1 Formats used for creation sheets
    5.2 Formats used for transactions
    5.3 Formats used for authentication
    5.4 Formats encapsulation.

1.== Introduction ==

  The OpenUDC project aims to provide a open, democratic and secure
  monetary system, compatible with universal dividend.

  This document describe the MIME-types used in to described the
  different datas which need are exchanged in OpenUDC implementations.

  Only the Content-Type field is used, which permit more flexible uses:
  It make it compatible with almost all multipart media type as defined
  in section 5.1 of [RFC2046].
  But

  OpenPGP standard [RFC4880].

2.== Conventions Used in This Document ==

  The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  document are to be interpreted as described in [RFC2119].

3.== Validation Nodes Overview ==

  Validation Nodes, act as HTTP Servers.

  There in no restriction on the port number to reach a Validation
  Deamon, although port 12580 or 80 are recommanded.

  Validation Nodes MUST manage "GET" and "POST" word as specified by
  the protocol HTTP/1.0.

  Validation Nodes SHOULD manage "HEAD" word and "Range" parameter, as
  specified by the protocol HTTP/1.1, cf. [rfc2616].

  Validation Nodes MUST manage the MIME types defined in this document
  (cf sections ..) and send them them in the "Content-Type" parameter.

4.== Tree Structure of Validation Nodes

  As each Nodes act as an HTTP server, Node Ressources MUST be
  available trough such kind of URL :

    * http://NodeHostame[:port]/[Root/]...
  or
    * https://NodeIP[:port]/[Root/]...
  ...

  After a eventual Root depending on the node's configuration, in its
  URL ; a node MUST provide determined ressources at determined
  location.

  Here is an OverView of such tree structure :

http://hostname[:port]/[Root/]...
|-- udid2/
|   `-- geolist_FRA.txt.asc
`-- [CURRENCY NAME]/
    |-- authent.cgi
    |-- creation.cgi
    |-- transaction.cgi
    |-- sign.cgi
    |-- self/
    |   |-- cert.pgp
    |   `-- peers.list
    |-- c/
    |   `-- [CREATION_SHEET_NUM]/
    |       |-- [CREATION_SHEET_NUM].env
    |       |-- [CREATION_SHEET_NUM].list
    |       `-- [CREATION_SHEET_NUM].list.diff
    |-- d/
    |   `-- [CREATION_SHEET_NUM]/
    |       |-- 1.bdb
    |       |-- ...
    |       |-- 1024.bdb
    |       `-- ...
    `-- k/
        |-- 20D11AC53DAE0E19DFEEE14657A135297E9DF1BF/
        |   |-- c/
        |   |-- cert.gpg
        |   `-- t/
        |-- 1B0C7D91A7A1A833C32D4E156AEEFE2C96193F28/
        |   |-- c/
        |   |   `-- 1.sig
        |   |-- cert.gpg
        |   `-- t/
        |       |-- 1.gpg
        |       |-- ...
        |       `-- 3.gpg
        `-- 5FDA8373344F3868D24D8ED280B1DF4F7FE6695D/
            |-- c/
            |   |-- 1.sig
            |   |-- ...
            |   `-- 3.sig
            |-- cert.gpg
            `-- t/
                `-- 1.gpg


5.== Data expected in the tree structure ==

5.1= Formats used for creation sheets =
5.3= Formats used for authentication =
5.4= Formats encapsulation =

This document describe the MIME-types used in to described the
  different datas which need are exchanged in OpenUDC implementations.
cf: [RFC2046] : http://www.bortzmeyer.org/2046.html
[RFC3156] : http://www.ietf.org/rfc/rfc3156.txt
MIME types used by OpenUDC Nodes and Clients

    text/udc-report

contain status code of the transaction, and a status string.

5.2= Formats used for transactions =

    application/udc-t-cheque ("cheque")

[VERSION_FORMAT]
si VERSION_FORMAT == "d=tt2"
[CURRENCY_NAME]
[FINGERPRINT_SOURCE]
[ID_SOURCE (INCREMENTAL)]
[FINGERPRINT_DESTINATION]
[BINARY_VALUE (POWER ?)]-[CREATION_SHEET_ID]-[JOB_ID] [EXCHANGE_COUNTER]
[...]
Example:
d=tt2
test2
20D11AC53DAE0E19DFEEE1465D2662E0F300EBAD
1
5FDA8373344F3868D24D8ED280B1DF4F7FE6695D
4-3-1 1
32-2-0 1
64-2-0 1

    application/pgp-signature ("receipt of the cheque")

contain detached signature (ASCII-armored or not) of the application/udc-t-cheque content by the receipt.

    application/udc-t-validation

contain detached signature (ASCII-armored or not), signed by a validation node of :

    the application/udc-t-cheque content

    and the status code of the transaction.

    application/udc-c-env

[VERSION_FORMAT]
[CURCODE]
[SETNUM]
[ATTEMPT]
[FACTORS]
[VOTE_EXPIRATION_DATE DATE(YYYY-MM-DD)]
[URI_VPOOLS]
[NUMBER_OF_INDIVIDUALS]
Example:
d=cset3.env
unt
1
1<commit_msg>lot of thinkg, few commit. Major change: no more ID in transaction, there is already conter on bills, and one must be choosen to identifie the transaction (last or first ?)<commit_after>Network Working Group                                       <NAME>
Request for Comments:                                      Open-UDC Team


      ==== OpenUDC Exchange Formats  ====

 === Abstract ===

 === Status of This Memo ===

 (Today 1st december 2011, it is still a draft).

 === Copyright Notice ===

 === Table of Contents ===

 1. Introduction ....................................................
 2. Conventions Used in This Document ...............................
 3. Validation Nodes act as HTTP Servers ..........................
 4. Tree Structure of Validation Nodes ............................
 5. Data expected in the tree structure .............................
    5.1 Formats used for creation sheets
    5.2 Formats used for transactions
    5.3 Formats used for authentication
    5.4 Formats encapsulation.

1.== Introduction ==

  The OpenUDC project aims to provide a open, democratic and secure
  monetary system, compatible with universal dividend.

  This document describe the MIME-types used in to described the
  different datas which need are exchanged in OpenUDC implementations.

  Only the Content-Type field is used, which permit more flexible uses:
  It make it compatible with almost all multipart media type as defined
  in section 5.1 of [RFC2046].
  But

  OpenPGP standard [RFC4880].

2.== Conventions Used in This Document ==

  The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  document are to be interpreted as described in [RFC2119].

3.== Validation Nodes Overview ==

  Validation Nodes, act as HTTP Servers.

  There in no restriction on the port number to reach a Validation
  Deamon, although port 12580 or 80 are recommanded.

  Validation Nodes MUST manage "GET" and "POST" word as specified by
  the protocol HTTP/1.0.

  Validation Nodes SHOULD manage "HEAD" word and "Range" parameter, as
  specified by the protocol HTTP/1.1, cf. [rfc2616].

  Validation Nodes MUST manage the MIME types defined in this document
  (cf sections ..) and send them them in the "Content-Type" parameter.

4.== Tree Structure of Validation Nodes

  As each Nodes act as an HTTP server, Node Ressources MUST be
  available trough such kind of URL :

    * http://NodeHostame[:port]/[Root/]...
  or
    * https://NodeIP[:port]/[Root/]...
  ...

  After a eventual Root depending on the node's configuration, in its
  URL ; a node MUST provide determined ressources at determined
  location.

  Here is an OverView of such tree structure :

http[s]://Node[:port]/[Root/]...
|-- udid2/
|   `-- geolist_FRA.txt.asc
`-- [CURRENCY NAME]/
    |-- authent.in
    |-- creation.in
    |-- transaction.in
    |-- sign.in
    |-- self/
    |   |-- cert.gpg
    |   `-- peers.list
    |-- c/
    |   `-- [CREATION_SHEET_NUM]/
    |       |-- [CREATION_SHEET_NUM].env
    |       |-- [CREATION_SHEET_NUM].list
    |       `-- [CREATION_SHEET_NUM].list.diff
    |-- d/
    |   `-- [CREATION_SHEET_NUM]/
    |       |-- 1.bdb
    |       |-- ...
    |       |-- 1024.bdb
    |       `-- ...
    `-- k/
        |-- 20D11AC53DAE0E19DFEEE14657A135297E9DF1BF/
        |   |-- c/
        |   |-- cert.gpg
        |   `-- t/
        |-- 1B0C7D91A7A1A833C32D4E156AEEFE2C96193F28/
        |   |-- c/
        |   |   `-- 1.sig
        |   |-- cert.gpg
        |   `-- t/
        |       |-- 1.gpg
        |       |-- ...
        |       `-- 3.gpg
        `-- 5FDA8373344F3868D24D8ED280B1DF4F7FE6695D/
            |-- c/
            |   |-- 1.sig
            |   |-- ...
            |   `-- 3.sig
            |-- cert.gpg
            `-- t/
                `-- 1.gpg


5.== Data expected in the tree structure ==

5.1= Formats used for creation sheets =
5.3= Formats used for authentication =
5.4= Formats encapsulation =

This document describe the MIME-types used in to described the
  different datas which need are exchanged in OpenUDC implementations.
cf: [RFC2046] : http://www.bortzmeyer.org/2046.html
[RFC3156] : http://www.ietf.org/rfc/rfc3156.txt
MIME types used by OpenUDC Nodes and Clients

    text/udc-report

contain status code of the transaction, and a status string.

5.2= Formats used for transactions =

    application/udc-t-cheque ("cheque")

_VERSION_FORMAT_
si _VERSION_FORMAT_ == "d=tt2"
_CURRENCY_NAME_
_FINGERPRINT_SOURCE_
_FINGERPRINT_DESTINATION_
_BINARY_VALUE (POWER ?)_-_CREATION_SHEET_ID_-_JOB_ID_ _EXCHANGE_COUNTER_ _FINGERPRINT_PREVIOUS_OWNER_ _BINARY_VALUE (POWER ?)_-_CREATION_SHEET_ID_-_JOB_ID_ _EXCHANGE_COUNTER_ 
...
Example:
d=tt2
test2
20D11AC53DAE0E19DFEEE1465D2662E0F300EBAD
5FDA8373344F3868D24D8ED280B1DF4F7FE6695D
4-3-1 1
32-2-8 2 D8ED280B1DF4F7FE669520D11AC53DAE0E19DFE  4-1-2 3
64-2-0 1

    application/pgp-signature ("receipt of the cheque")

contain detached signature (ASCII-armored or not) of the application/udc-t-cheque content by the receipt.

    application/udc-t-validation

contain detached signature (ASCII-armored or not), signed by a validation node of :

    the application/udc-t-cheque content

    and the status code of the transaction.

    application/udc-c-env

[VERSION_FORMAT]
[CURCODE]
[SETNUM]
[ATTEMPT]
[FACTORS]
[VOTE_EXPIRATION_DATE DATE(YYYY-MM-DD)]
[URI_VPOOLS]
[NUMBER_OF_INDIVIDUALS]
Example:
d=cset3.env
unt
1
1
{'fraction_non_alphanumeric': 0.13573433115060804, 'fraction_numerical': 0.04443405051449953, 'mean_word_length': 2.2018568433662775, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4426432', 'n_tokens_mistral': 3868, 'n_tokens_neox': 3496, 'n_words': 1058}