diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..37f5eaa --- /dev/null +++ b/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'github-pages', group: :jekyll_plugins diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..17bd1bd --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,248 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (4.2.10) + i18n (~> 0.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.11.1) + colorator (1.1.0) + commonmarker (0.17.13) + ruby-enum (~> 0.5) + concurrent-ruby (1.1.4) + dnsruby (1.61.2) + addressable (~> 2.5) + em-websocket (0.5.1) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0.6.0) + ethon (0.12.0) + ffi (>= 1.3.0) + eventmachine (1.2.7) + execjs (2.7.0) + faraday (0.15.4) + multipart-post (>= 1.2, < 3) + ffi (1.10.0) + forwardable-extended (2.6.0) + gemoji (3.0.0) + github-pages (196) + activesupport (= 4.2.10) + github-pages-health-check (= 1.16.0) + jekyll (= 3.7.4) + jekyll-avatar (= 0.6.0) + jekyll-coffeescript (= 1.1.1) + jekyll-commonmark-ghpages (= 0.1.5) + jekyll-default-layout (= 0.1.4) + jekyll-feed (= 0.11.0) + jekyll-gist (= 1.5.0) + jekyll-github-metadata (= 2.12.1) + jekyll-mentions (= 1.4.1) + jekyll-optional-front-matter (= 0.3.0) + jekyll-paginate (= 1.1.0) + jekyll-readme-index (= 0.2.0) + jekyll-redirect-from (= 0.14.0) + jekyll-relative-links (= 0.6.0) + jekyll-remote-theme (= 0.3.1) + jekyll-sass-converter (= 1.5.2) + jekyll-seo-tag (= 2.5.0) + jekyll-sitemap (= 1.2.0) + jekyll-swiss (= 0.4.0) + jekyll-theme-architect (= 0.1.1) + jekyll-theme-cayman (= 0.1.1) + jekyll-theme-dinky (= 0.1.1) + jekyll-theme-hacker (= 0.1.1) + jekyll-theme-leap-day (= 0.1.1) + jekyll-theme-merlot (= 0.1.1) + jekyll-theme-midnight (= 0.1.1) + jekyll-theme-minimal (= 0.1.1) + jekyll-theme-modernist (= 0.1.1) + jekyll-theme-primer (= 0.5.3) + jekyll-theme-slate (= 0.1.1) + jekyll-theme-tactile (= 0.1.1) + jekyll-theme-time-machine (= 0.1.1) + jekyll-titles-from-headings (= 0.5.1) + jemoji (= 0.10.2) + kramdown (= 1.17.0) + liquid (= 4.0.0) + listen (= 3.1.5) + mercenary (~> 0.3) + minima (= 2.5.0) + nokogiri (>= 1.8.5, < 2.0) + rouge (= 2.2.1) + terminal-table (~> 1.4) + github-pages-health-check (1.16.0) + addressable (~> 2.3) + dnsruby (~> 1.60) + octokit (~> 4.0) + public_suffix (~> 3.0) + typhoeus (~> 1.3) + html-pipeline (2.10.0) + activesupport (>= 2) + nokogiri (>= 1.4) + http_parser.rb (0.6.0) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + jekyll (3.7.4) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 0.7) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 2.0) + kramdown (~> 1.14) + liquid (~> 4.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (>= 1.7, < 4) + safe_yaml (~> 1.0) + jekyll-avatar (0.6.0) + jekyll (~> 3.0) + jekyll-coffeescript (1.1.1) + coffee-script (~> 2.2) + coffee-script-source (~> 1.11.1) + jekyll-commonmark (1.2.0) + commonmarker (~> 0.14) + jekyll (>= 3.0, < 4.0) + jekyll-commonmark-ghpages (0.1.5) + commonmarker (~> 0.17.6) + jekyll-commonmark (~> 1) + rouge (~> 2) + jekyll-default-layout (0.1.4) + jekyll (~> 3.0) + jekyll-feed (0.11.0) + jekyll (~> 3.3) + jekyll-gist (1.5.0) + octokit (~> 4.2) + jekyll-github-metadata (2.12.1) + jekyll (~> 3.4) + octokit (~> 4.0, != 4.4.0) + jekyll-mentions (1.4.1) + html-pipeline (~> 2.3) + jekyll (~> 3.0) + jekyll-optional-front-matter (0.3.0) + jekyll (~> 3.0) + jekyll-paginate (1.1.0) + jekyll-readme-index (0.2.0) + jekyll (~> 3.0) + jekyll-redirect-from (0.14.0) + jekyll (~> 3.3) + jekyll-relative-links (0.6.0) + jekyll (~> 3.3) + jekyll-remote-theme (0.3.1) + jekyll (~> 3.5) + rubyzip (>= 1.2.1, < 3.0) + jekyll-sass-converter (1.5.2) + sass (~> 3.4) + jekyll-seo-tag (2.5.0) + jekyll (~> 3.3) + jekyll-sitemap (1.2.0) + jekyll (~> 3.3) + jekyll-swiss (0.4.0) + jekyll-theme-architect (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-cayman (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-dinky (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-hacker (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-leap-day (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-merlot (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-midnight (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-minimal (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-modernist (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-primer (0.5.3) + jekyll (~> 3.5) + jekyll-github-metadata (~> 2.9) + jekyll-seo-tag (~> 2.0) + jekyll-theme-slate (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-tactile (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-time-machine (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-titles-from-headings (0.5.1) + jekyll (~> 3.3) + jekyll-watch (2.1.2) + listen (~> 3.0) + jemoji (0.10.2) + gemoji (~> 3.0) + html-pipeline (~> 2.2) + jekyll (~> 3.0) + kramdown (1.17.0) + liquid (4.0.0) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + mercenary (0.3.6) + mini_portile2 (2.4.0) + minima (2.5.0) + jekyll (~> 3.5) + jekyll-feed (~> 0.9) + jekyll-seo-tag (~> 2.1) + minitest (5.11.3) + multipart-post (2.0.0) + nokogiri (1.10.1) + mini_portile2 (~> 2.4.0) + octokit (4.13.0) + sawyer (~> 0.8.0, >= 0.5.3) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (3.0.3) + rb-fsevent (0.10.3) + rb-inotify (0.10.0) + ffi (~> 1.0) + rouge (2.2.1) + ruby-enum (0.7.2) + i18n + ruby_dep (1.5.0) + rubyzip (1.2.2) + safe_yaml (1.0.4) + sass (3.7.3) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sawyer (0.8.1) + addressable (>= 2.3.5, < 2.6) + faraday (~> 0.8, < 1.0) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + thread_safe (0.3.6) + typhoeus (1.3.1) + ethon (>= 0.9.0) + tzinfo (1.2.5) + thread_safe (~> 0.1) + unicode-display_width (1.4.1) + +PLATFORMS + ruby + +DEPENDENCIES + github-pages + +BUNDLED WITH + 2.0.1 diff --git a/API.md b/_api/API.md similarity index 100% rename from API.md rename to _api/API.md diff --git a/API_v1/README.md b/_api/API_v1/README.md similarity index 100% rename from API_v1/README.md rename to _api/API_v1/README.md diff --git a/API_v1/accounts.md b/_api/API_v1/accounts.md similarity index 100% rename from API_v1/accounts.md rename to _api/API_v1/accounts.md diff --git a/API_v1/blocks.md b/_api/API_v1/blocks.md similarity index 100% rename from API_v1/blocks.md rename to _api/API_v1/blocks.md diff --git a/API_v1/models.md b/_api/API_v1/models.md similarity index 100% rename from API_v1/models.md rename to _api/API_v1/models.md diff --git a/API_v1/operations.md b/_api/API_v1/operations.md similarity index 100% rename from API_v1/operations.md rename to _api/API_v1/operations.md diff --git a/API_v1/paging.md b/_api/API_v1/paging.md similarity index 100% rename from API_v1/paging.md rename to _api/API_v1/paging.md diff --git a/API_v1/transactions.md b/_api/API_v1/transactions.md similarity index 100% rename from API_v1/transactions.md rename to _api/API_v1/transactions.md diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..feec532 --- /dev/null +++ b/_config.yml @@ -0,0 +1,43 @@ +# Welcome to Jekyll! +# +# This config file is meant for settings that affect your whole blog, values +# which you are expected to set up once and rarely edit after that. If you find +# yourself editing this file very often, consider using Jekyll's data files +# feature for the data you need to update frequently. +# +# For technical reasons, this file is *NOT* reloaded automatically when you use +# 'bundle exec jekyll serve'. If you change this file, please restart the server process. + +# Site settings +# These are used to personalize your new site. If you look in the HTML files, +# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. +# You can create any custom variable you would like, and they will be accessible +# in the templates via {{ site.myvariable }}. +title: BlockchainOS Devteam +email: bosdev@blockchainos.org +description: >- # this means to ignore newlines until "baseurl:" + Copyright (c) 2018 BlockchainOS.org + All Rights Reserved. +baseurl: "" # the subpath of your site, e.g. /blog +url: "https://bosnet.github.io/" # the base hostname & protocol for your site, e.g. http://example.com +twitter_username: "boscoinio" +github_username: "bosnet" + +# Build settings +markdown: kramdown +theme: minima +plugins: + - jekyll-feed +timezone: Asia/Seoul + +# Exclude from processing. +# The following items will not be processed, by default. Create a custom list +# to override the default setting. +# exclude: +# - Gemfile +# - Gemfile.lock +# - node_modules +# - vendor/bundle/ +# - vendor/cache/ +# - vendor/gems/ +# - vendor/ruby/ diff --git a/bosnet-how_to_handle_congress_voting_proposal.md b/_congressVoting/bosnet-how_to_handle_congress_voting_proposal.md similarity index 100% rename from bosnet-how_to_handle_congress_voting_proposal.md rename to _congressVoting/bosnet-how_to_handle_congress_voting_proposal.md diff --git a/api/index.html b/api/index.html new file mode 100644 index 0000000..b0ef6ef --- /dev/null +++ b/api/index.html @@ -0,0 +1,1357 @@ +Sebak Client API Back to top

Sebak Client API

SEBAK, the next BOScoin network with ISAAC consensus protocol.

+ + + +

Paging

+

Pages represent a subset of a larger collection of objects. The SEBAK HTTP API utilizes cursoring to paginate large result sets. Cursoring separates results into pages

+

Cursor

+

A cursor is a point to a specific location in resources.

+

Embedded Resources

+

A page containts an embedded set of records, regardless of the contained resource.

+

Links

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ExampleRelation
Self/transactions
Prev/transactions?cursor={cursor}&reverse=true&limit=10The previous page of results
Next/transactions?cursor={cursor}&reverse=false&limit=10The next page of results
+

Accounts

Account API

+

Account Details

In the BOScoin network, users interact by using accounts

Retrieve an account
GET/api/v1/accounts/{address}

Retrieve an account by the address

Example URI

GET https://mainnet.blockchainos.org/api/v1/accounts/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI
URI Parameters
HideShow
address
string (required) Example: GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI

a public address

+
Response  200
HideShow
Headers
Content-Type: application/hal+json; charset=utf-8
Body
{
+  "_links": {
+    "operations": {
+      "href": "/api/v1/accounts/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI/operations{?cursor,limit,order}",
+      "templated": true
+    },
+    "self": {
+      "href": "/api/v1/accounts/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI"
+    },
+    "transactions": {
+      "href": "/api/v1/accounts/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI/transactions{?cursor,limit,order}",
+      "templated": true
+    }
+  },
+  "address": "GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI",
+  "balance": "500000000000",
+  "linked": "\"\"",
+  "sequence_id": 0
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "_links": {
+      "type": "object",
+      "properties": {
+        "operations": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            },
+            "templated": {
+              "type": "boolean"
+            }
+          }
+        },
+        "self": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            }
+          }
+        },
+        "transactions": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            },
+            "templated": {
+              "type": "boolean"
+            }
+          }
+        }
+      }
+    },
+    "address": {
+      "type": "string",
+      "description": "The account’s public key encoded into a base32 string representation."
+    },
+    "balance": {
+      "type": "string",
+      "description": "GON. 1 BOS = 10,000,000 GON"
+    },
+    "linked": {
+      "type": "string",
+      "description": "linked with freezing account."
+    },
+    "sequence_id": {
+      "type": "number",
+      "description": "The Current sequence number. It needed to submitting a transaction from this account"
+    }
+  },
+  "required": [
+    "address"
+  ]
+}
Response  404
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
+  "status": 400,
+  "title": "does not exists",
+  "type": "https://boscoin.io/sebak/error/128"
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "status": {
+      "type": "number"
+    },
+    "title": {
+      "type": "string"
+    },
+    "type": {
+      "type": "string"
+    }
+  }
+}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
+  "status": 500,
+  "title": "problem error message",
+  "type": "https://boscoin.io/sebak/error/{error_code}"
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "status": {
+      "type": "number"
+    },
+    "title": {
+      "type": "string"
+    },
+    "type": {
+      "type": "string"
+    }
+  }
+}

Transactions for Account

List All Transactions for Account
GET/api/v1/accounts/{address}/transactions?limit={limit}&reverse={reverse}&cursor={cursor}

Retrieve all valid transactions that affected by the account

+

Streaming mode supported with header "Accept": "text/event-stream"

Example URI

GET https://mainnet.blockchainos.org/api/v1/accounts/GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ/transactions?limit=100&reverse=false&cursor=``
URI Parameters
HideShow
address
string (required) Example: GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ

a public address

+
limit
integer (optional) Example: 100
reverse
string (optional) Example: false
cursor
string (optional) Example: ``
Response  200
HideShow
Headers
Content-Type: application/hal+json; charset=utf-8
Body
{
+  "_embedded": {
+    "records": [
+      {
+        "_links": {
+          "account": {
+            "href": "/api/v1/accounts/GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ"
+          },
+          "operations": {
+            "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs/operations{?cursor,limit,order}",
+            "templated": "true"
+          },
+          "self": {
+            "href": "/api/v1/transactions"
+          }
+        }
+      },
+      "block: `DVVRGpX56x8wjPfNp5nGsgpW2YuhPNHGAd1g6R9g8mBQ`",
+      "created: `2018-11-02T14:09:33.019606000+09:00`",
+      "fee: 10000",
+      "hash: `7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs`",
+      "operation_count: 1",
+      {
+        "undefined": [
+          {
+            "type": "payment"
+          },
+          {
+            "target": "GCIKBR6QXYF6VLLTXC7EHKDGAPAOLSRALZTWTLZ2SANBYWMWT6AURQGG",
+            "amount": "100000"
+          }
+        ]
+      },
+      "sequence_id: 0",
+      "source: `GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ`"
+    ]
+  },
+  "_links": {
+    "next": {
+      "href": "/api/v1/account/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI/transactions?limit=100&reverse=false"
+    },
+    "prev": {
+      "href": "/api/v1/account/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI/transactions?limit=100&reverse=true"
+    },
+    "self": {
+      "href": "/api/v1/account/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI/transactions"
+    }
+  }
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "_embedded": {
+      "type": "object",
+      "properties": {
+        "records": {
+          "type": "array"
+        }
+      }
+    },
+    "_links": {
+      "type": "object",
+      "properties": {
+        "next": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            }
+          }
+        },
+        "prev": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            }
+          }
+        },
+        "self": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            }
+          }
+        }
+      }
+    }
+  }
+}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
+  "status": 500,
+  "title": "problem error message",
+  "type": "https://boscoin.io/sebak/error/{error_code}"
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "status": {
+      "type": "number"
+    },
+    "title": {
+      "type": "string"
+    },
+    "type": {
+      "type": "string"
+    }
+  }
+}

Operations for Account

Retrieve all operations that were included in valid transactions that affected by the account

+

Streaming mode supported with header "Accept": "text/event-stream"

List All Operations for Account
GET/api/v1/accounts/{address}/operations?limit={limit}&reverse={reverse}&cursor={cursor}

Example URI

GET https://mainnet.blockchainos.org/api/v1/accounts/GDVSXU343JMRBXGW3F5WLRMH6L6HFZ6IYMVMFSDUDJPNTXUGNOXC2R5Y/operations?limit=100&reverse=false&cursor=``
URI Parameters
HideShow
address
string (required) Example: GDVSXU343JMRBXGW3F5WLRMH6L6HFZ6IYMVMFSDUDJPNTXUGNOXC2R5Y

a public address

+
limit
integer (optional) Example: 100
reverse
string (optional) Example: false
cursor
string (optional) Example: ``
Response  200
HideShow
Headers
Content-Type: application/hal+json; charset=utf-8
Body
{
+  "_embedded": {
+    "records": [
+      {
+        "_links": {
+          "self": {
+            "href": "/api/v1/operations/F6SEv2QhgwZwxUARbRacxyZaufzcTxdYDXJBpvf7pNAj-7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs"
+          },
+          "transaction": {
+            "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs"
+          }
+        }
+      },
+      "block_height: 241",
+      {
+        "target": "GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI",
+        "amount": "1000000000000"
+      },
+      "confirmed: `2018-11-27T07:49:05.971799020Z`",
+      "hash: F6SEv2QhgwZwxUARbRacxyZaufzcTxdYDXJBpvf7pNAj",
+      "index: 0",
+      "proposed_time: `2018-11-27T07:49:05.942922134Z`",
+      "source: GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ",
+      "target: GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI",
+      "tx_hash: 7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs",
+      "type: `create-account`"
+    ],
+    "_links": {
+      "next": {
+        "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs/operations?limit=100&reverse=false"
+      },
+      "prev": {
+        "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs/operations?limit=100&reverse=true"
+      },
+      "self": {
+        "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs/operations"
+      }
+    }
+  }
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "_embedded": {
+      "type": "object",
+      "properties": {
+        "records": {
+          "type": "array"
+        },
+        "_links": {
+          "type": "object",
+          "properties": {
+            "next": {
+              "type": "object",
+              "properties": {
+                "href": {
+                  "type": "string"
+                }
+              }
+            },
+            "prev": {
+              "type": "object",
+              "properties": {
+                "href": {
+                  "type": "string"
+                }
+              }
+            },
+            "self": {
+              "type": "object",
+              "properties": {
+                "href": {
+                  "type": "string"
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
+  "status": 500,
+  "title": "problem error message",
+  "type": "https://boscoin.io/sebak/error/{error_code}"
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "status": {
+      "type": "number"
+    },
+    "title": {
+      "type": "string"
+    },
+    "type": {
+      "type": "string"
+    }
+  }
+}

Trasactions

Transactions API

+

Transactions

Payment transaction
POST/api/v1/transactions

    +
  • +

    You can refer this link to make transaction through sebakpy-util.

    +
  • +
  • +

    Data Body consist of 3 parts, ; T, H, B

    +
      +
    • +

      T : ‘transaction’

      +
    • +
    • +

      H : H means Header. it consists of version, hash, signature & created.

      +
        +
      • +

        Version means to transaction version. At the moment 1.

        +
      • +
      • +

        Hash means transaction hash.

        +
      • +
      • +

        signature is signed data from client.

        +
          +
        • How can you make signature?
        • +
        +

        Please check this link first.

        +

        You need 3 variables to make signature; RLPdata which is hashing, network id and source’s secret seed.

        +

        You can see that Which kinds of variables necessary.

        +

        You can use [JavaScript SDK] to make signature or [Python SDK]. Please check above SDKs.

        +
      • +
      • +

        created means to transcation created time.

        +
      • +
      +
    • +
    • +

      B : B means Body. It is RLP data. so you have to encode B data to RLP format. It contains; source , fee, sequence id, and operations.

      +
        +
      • +

        source; means that public address which will BOScoin withdraw .

        +
      • +
      • +

        fee : data type is String.

        +
      • +
      • +

        sequence id

        +
          +
        • How can you get sequence id?
        • +
        +

        When you finished account creation, you can access http(or https)😕/{IP that you set up sebak node}/api/v1/accounts/{Public address that account you created}.

        +

        Then you can see sequence_id in response.

        +
      • +
      • +

        operations: It is json array consist of H & B. H include type, which means operation type. B include target & amount.

        +
      • +
      • +

        H : type ( type should be set ‘payment’ )

        +
      • +
      • +

        B : target ( Public address you want to send.) , amount ( amount data type is String .)

        +
      • +
      +
    • +
    +
  • +
+

Example URI

POST https://mainnet.blockchainos.org/api/v1/transactions
Request
HideShow
Headers
Content-Type: application/json
Body
{
+  "T": "transaction",
+  "H": {
+    "version": "1",
+    "created": "2018-01-01T00:00:00.000000000Z",
+    "signature": "4ty1Pv7Phc3CEeGLCP8mjZfEC259VR1MBgyVHzQXTcWjuSiwxVQ2AQKxy2HjGTCDrmdE29z8ZNZ6GxuDyEay2p9M"
+  },
+  "B": {
+    "source": "GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ",
+    "fee": "10000",
+    "sequence_id": "0",
+    "operations": [
+      {
+        "H": {
+          "type": "payment"
+        },
+        "B": {
+          "target": "GDTEPFWEITKFHSUO44NQABY2XHRBBH2UBVGJ2ZJPDREIOL2F6RAEBJE4",
+          "amount": "1000000000000"
+        }
+      }
+    ]
+  }
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "T": {
+      "type": "string"
+    },
+    "H": {
+      "type": "object",
+      "properties": {
+        "version": {
+          "type": "string",
+          "description": "Transaction version"
+        },
+        "created": {
+          "type": "string",
+          "description": "Created time of the transaction."
+        },
+        "signature": {
+          "type": "string",
+          "description": "Signature signed by source account"
+        }
+      }
+    },
+    "B": {
+      "type": "object",
+      "properties": {
+        "source": {
+          "type": "string",
+          "description": "Source account"
+        },
+        "fee": {
+          "type": "string",
+          "description": "The fee paid by the source account for this transaction. Minimum is 10000 GON"
+        },
+        "sequence_id": {
+          "type": "string",
+          "description": "The last sequence number of the source account"
+        },
+        "operations": {
+          "type": "array"
+        }
+      }
+    }
+  }
+}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
+  "_links": {
+    "history": {
+      "href": "/api/v1/transactions/7mRUj4cnUPaTrpByojPsT3xoRRdwG6Q9z2eLyCMapQm6/history"
+    },
+    "self": {
+      "href": "/api/v1/transactions"
+    }
+  },
+  "hash": "7mRUj4cnUPaTrpByojPsT3xoRRdwG6Q9z2eLyCMapQm6",
+  "message": {
+    "source": "GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ",
+    "fee": "10000",
+    "sequence_id": "0",
+    "operations": [
+      {
+        "H": {
+          "type": "create-account"
+        },
+        "B": {
+          "target": "GDTEPFWEITKFHSUO44NQABY2XHRBBH2UBVGJ2ZJPDREIOL2F6RAEBJE4",
+          "amount": "1000000000000"
+        }
+      }
+    ]
+  },
+  "status": "submitted"
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "_links": {
+      "type": "object",
+      "properties": {
+        "history": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            }
+          }
+        },
+        "self": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            }
+          }
+        }
+      }
+    },
+    "hash": {
+      "type": "string",
+      "description": "Hash of transaction."
+    },
+    "message": {
+      "type": "object",
+      "properties": {
+        "source": {
+          "type": "string",
+          "description": "Source account"
+        },
+        "fee": {
+          "type": "string",
+          "description": "The fee paid by the source account for this transaction. Minimum is 10000 GON"
+        },
+        "sequence_id": {
+          "type": "string",
+          "description": "The last sequence number of the source account"
+        },
+        "operations": {
+          "type": "array"
+        }
+      }
+    },
+    "status": {
+      "type": "string",
+      "description": "three categories of status; submitted, confirmed, rejected"
+    }
+  }
+}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
+  "status": 500,
+  "title": "problem error message",
+  "type": "https://boscoin.io/sebak/error/{error_code}"
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "status": {
+      "type": "number"
+    },
+    "title": {
+      "type": "string"
+    },
+    "type": {
+      "type": "string"
+    }
+  }
+}

Transactions

Retrieve transactions
GET/api/v1/transactions?limit={limit}&reverse={reverse}&cursor={cursor}

Retrieve all valid transactions

+

Streaming mode supported with header "Accept": "text/event-stream"

Example URI

GET https://mainnet.blockchainos.org/api/v1/transactions?limit=100&reverse=false&cursor=``
URI Parameters
HideShow
limit
integer (optional) Example: 100
reverse
string (optional) Example: false
cursor
string (optional) Example: ``
Response  200
HideShow
Headers
Content-Type: application/hal+json; charset=utf-8
Body
{
+  "_embedded": {
+    "records": [
+      {
+        "_links": {
+          "account": {
+            "href": "/api/v1/accounts/GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ"
+          },
+          "operations": {
+            "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs/operations{?cursor,limit,order}",
+            "templated": "true"
+          },
+          "self": {
+            "href": "/api/v1/transactions"
+          }
+        }
+      },
+      "block: `DVVRGpX56x8wjPfNp5nGsgpW2YuhPNHGAd1g6R9g8mBQ`",
+      "created: `2018-11-02T14:09:33.019606000+09:00`",
+      "fee: 10000",
+      "hash: `7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs`",
+      "operation_count: 1",
+      {
+        "undefined": [
+          {
+            "type": "payment"
+          },
+          {
+            "target": "GCIKBR6QXYF6VLLTXC7EHKDGAPAOLSRALZTWTLZ2SANBYWMWT6AURQGG",
+            "amount": "100000"
+          }
+        ]
+      },
+      "sequence_id: 0",
+      "source: `GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ`"
+    ]
+  },
+  "_links": {
+    "next": {
+      "href": "/api/v1/account/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI/transactions?limit=100&reverse=false"
+    },
+    "prev": {
+      "href": "/api/v1/account/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI/transactions?limit=100&reverse=true"
+    },
+    "self": {
+      "href": "/api/v1/account/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI/transactions"
+    }
+  }
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "_embedded": {
+      "type": "object",
+      "properties": {
+        "records": {
+          "type": "array"
+        }
+      }
+    },
+    "_links": {
+      "type": "object",
+      "properties": {
+        "next": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            }
+          }
+        },
+        "prev": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            }
+          }
+        },
+        "self": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            }
+          }
+        }
+      }
+    }
+  }
+}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
+  "status": 500,
+  "title": "problem error message",
+  "type": "https://boscoin.io/sebak/error/{error_code}"
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "status": {
+      "type": "number"
+    },
+    "title": {
+      "type": "string"
+    },
+    "type": {
+      "type": "string"
+    }
+  }
+}

Transaction

Get Transaction
GET/api/v1/transactions/{hash}

Retrieve a transaction by transaction hash

+

Streaming mode supported with header "Accept": "text/event-stream"

Example URI

GET https://mainnet.blockchainos.org/api/v1/transactions/ghf6msRhE4jRf5DPib9UHD1msadvmZs9o53V9FQTb11
URI Parameters
HideShow
hash
string (required) Example: ghf6msRhE4jRf5DPib9UHD1msadvmZs9o53V9FQTb11

tx’s hash

+
Response  200
HideShow
Headers
Content-Type: application/hal+json; charset=utf-8
Body
{
+  "_links": {
+    "account": {
+      "href": "/api/v1/accounts/GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ"
+    },
+    "operations": {
+      "href": "/api/v1/transactions/ghf6msRhE4jRf5DPib9UHD1msadvmZs9o53V9FQTb11/operations{?cursor,limit,order}",
+      "templated": "true"
+    },
+    "self": {
+      "href": "/api/v1/transactions/"
+    }
+  },
+  "block": "241",
+  "created": "2018-09-12T09:08:35.157472400Z",
+  "fee": "10000",
+  "hash": "ghf6msRhE4jRf5DPib9UHD1msadvmZs9o53V9FQTb11",
+  "operation_count": 1,
+  "operations": [
+    {
+      "H": {
+        "type": "payment"
+      },
+      "B": {
+        "target": "GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ`",
+        "amount": "200"
+      }
+    }
+  ],
+  "sequence_id": 0,
+  "source": "GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ"
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "_links": {
+      "type": "object",
+      "properties": {
+        "account": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            }
+          }
+        },
+        "operations": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            },
+            "templated": {
+              "type": "string"
+            }
+          }
+        },
+        "self": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            }
+          }
+        }
+      }
+    },
+    "block": {
+      "type": "string"
+    },
+    "created": {
+      "type": "string",
+      "description": "Created time of the transaction. It is set by wallet"
+    },
+    "fee": {
+      "type": "string",
+      "description": "The fee paid by the source account"
+    },
+    "hash": {
+      "type": "string",
+      "description": "Hash of transaction. //TODO: link for the details"
+    },
+    "operation_count": {
+      "type": "number",
+      "description": "The number of operations in this transaction."
+    },
+    "operations": {
+      "type": "array"
+    },
+    "sequence_id": {
+      "type": "number",
+      "description": "the Sequence number of the source account."
+    },
+    "source": {
+      "type": "string"
+    }
+  },
+  "required": [
+    "hash"
+  ]
+}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
+  "status": 500,
+  "title": "problem error message",
+  "type": "https://boscoin.io/sebak/error/{error_code}"
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "status": {
+      "type": "number"
+    },
+    "title": {
+      "type": "string"
+    },
+    "type": {
+      "type": "string"
+    }
+  }
+}

Operations for Trasaction

Get operations of transaction
GET/api/v1/transactions/{hash}/operations?limit={limit}&reverse={reverse}&cursor={cursor}

Example URI

GET https://mainnet.blockchainos.org/api/v1/transactions/ghf6msRhE4jRf5DPib9UHD1msadvmZs9o53V9FQTb11/operations?limit=100&reverse=false&cursor=``
URI Parameters
HideShow
hash
string (required) Example: ghf6msRhE4jRf5DPib9UHD1msadvmZs9o53V9FQTb11

Transaction hash

+
limit
integer (optional) Example: 100
reverse
string (optional) Example: false
cursor
string (optional) Example: ``
Response  200
HideShow
Headers
Content-Type: application/hal+json; charset=utf-8
Body
{
+  "_embedded": {
+    "records": [
+      {
+        "_links": {
+          "self": {
+            "href": "/api/v1/operations/F6SEv2QhgwZwxUARbRacxyZaufzcTxdYDXJBpvf7pNAj-7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs"
+          },
+          "transaction": {
+            "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs"
+          }
+        }
+      },
+      "block_height: 241",
+      {
+        "target": "GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI",
+        "amount": "1000000000000"
+      },
+      "confirmed: `2018-11-27T07:49:05.971799020Z`",
+      "hash: F6SEv2QhgwZwxUARbRacxyZaufzcTxdYDXJBpvf7pNAj",
+      "index: 0",
+      "proposed_time: `2018-11-27T07:49:05.942922134Z`",
+      "source: GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ",
+      "target: GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI",
+      "tx_hash: 7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs",
+      "type: `create-account`"
+    ],
+    "_links": {
+      "next": {
+        "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs/operations?limit=100&reverse=false"
+      },
+      "prev": {
+        "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs/operations?limit=100&reverse=true"
+      },
+      "self": {
+        "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs/operations"
+      }
+    }
+  }
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "_embedded": {
+      "type": "object",
+      "properties": {
+        "records": {
+          "type": "array"
+        },
+        "_links": {
+          "type": "object",
+          "properties": {
+            "next": {
+              "type": "object",
+              "properties": {
+                "href": {
+                  "type": "string"
+                }
+              }
+            },
+            "prev": {
+              "type": "object",
+              "properties": {
+                "href": {
+                  "type": "string"
+                }
+              }
+            },
+            "self": {
+              "type": "object",
+              "properties": {
+                "href": {
+                  "type": "string"
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
+  "status": 500,
+  "title": "problem error message",
+  "type": "https://boscoin.io/sebak/error/{error_code}"
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "status": {
+      "type": "number"
+    },
+    "title": {
+      "type": "string"
+    },
+    "type": {
+      "type": "string"
+    }
+  }
+}

Blocks

Blocks API

+

Blocks

Retrieve blocks
GET/api/v1/blocks?cursor={cursor}&limit={limit}&reverse={reverse}

Retrieve all valid blocks

+

Streaming mode supported with header "Accept": "text/event-stream"

Example URI

GET https://mainnet.blockchainos.org/api/v1/blocks?cursor=1207&limit=100&reverse=false
URI Parameters
HideShow
cursor
string (optional) Example: 1207

a block height as cursor

+
reverse
string (optional) Example: false
limit
integer (optional) Example: 100
Response  200
HideShow
Headers
Content-Type: application/hal+json; charset=utf-8
Body
{
+  "_embedded": {
+    "records": [
+      {
+        "_links": {
+          "self": {
+            "href": "/api/v1/blocks/AcFpZMr6EhxBuCw3xADUzepa395wmh3c5fo2cyxYCi1q"
+          }
+        }
+      },
+      "confirmed: 2018",
+      "hash: `AcFpZMr6EhxBuCw3xADUzepa395wmh3c5fo2cyxYCi1q`",
+      "height: 1",
+      "prev_block_hash: `J8TQCCtsiLcRZpYtVN3ozCFByd24fjXe2BgodLkeXN7S`",
+      "proposed_time: `2018-04-17T5:07:31.000000000Z`",
+      "proposer: `GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ`",
+      "proposer_transaction: `EQNSFnhzzz3bDpaZQekWPPNtr3kmRs5fUafBYAkHGXRP`",
+      "round: 0",
+      [
+        "transactions",
+        "BivUS2tYjm1ZYXZNvKqRDa1eyBRTcE3DeuEDJVtuwNcm"
+      ],
+      "transactions_root: `BR2gsNw5WGjZ6HFPNr8fFAQPu42dqk1P7VVV7p5Efnru`",
+      "version: 0"
+    ]
+  },
+  "_links": {
+    "next": {
+      "href": "/api/v1/blocks?cursor=1&limit=100&reverse=false"
+    },
+    "prev": {
+      "href": "/api/v1/blocks?cursor=1&limit=100&reverse=true"
+    },
+    "self": {
+      "href": "/api/v1/blocks"
+    }
+  }
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "_embedded": {
+      "type": "object",
+      "properties": {
+        "records": {
+          "type": "array"
+        }
+      }
+    },
+    "_links": {
+      "type": "object",
+      "properties": {
+        "next": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            }
+          }
+        },
+        "prev": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            }
+          }
+        },
+        "self": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            }
+          }
+        }
+      }
+    }
+  }
+}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
+  "status": 500,
+  "title": "problem error message",
+  "type": "https://boscoin.io/sebak/error/{error_code}"
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "status": {
+      "type": "number"
+    },
+    "title": {
+      "type": "string"
+    },
+    "type": {
+      "type": "string"
+    }
+  }
+}

Block Details

Retrieve a block
GET/api/v1/blocks/{hashOrHeight}

Retrieve a block by the hash or height

Example URI

GET https://mainnet.blockchainos.org/api/v1/blocks/CLNes5kkg7ozgnHBhpBXHMHFtPKo7z4RF8NZpNGRUB4i
URI Parameters
HideShow
hashOrHeight
string (required) Example: CLNes5kkg7ozgnHBhpBXHMHFtPKo7z4RF8NZpNGRUB4i

a block hash or height

+
Response  200
HideShow
Headers
Content-Type: application/hal+json; charset=utf-8
Body
{
+  "_links": {
+    "self": {
+      "href": "/api/v1/blocks/AcFpZMr6EhxBuCw3xADUzepa395wmh3c5fo2cyxYCi1q"
+    }
+  },
+  "confirmed": "2018",
+  "hash": "AcFpZMr6EhxBuCw3xADUzepa395wmh3c5fo2cyxYCi1q",
+  "height": "3",
+  "prev_block_hash": "J8TQCCtsiLcRZpYtVN3ozCFByd24fjXe2BgodLkeXN7S",
+  "proposed_time": "2018-04-17T5:07:31.000000000Z",
+  "proposer": "GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ",
+  "proposer_transaction": "EQNSFnhzzz3bDpaZQekWPPNtr3kmRs5fUafBYAkHGXRP",
+  "round": "0",
+  "transactions": [
+    "BivUS2tYjm1ZYXZNvKqRDa1eyBRTcE3DeuEDJVtuwNcm"
+  ],
+  "transactions_root": "BR2gsNw5WGjZ6HFPNr8fFAQPu42dqk1P7VVV7p5Efnru",
+  "version": "0"
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "_links": {
+      "type": "object",
+      "properties": {
+        "self": {
+          "type": "object",
+          "properties": {
+            "href": {
+              "type": "string"
+            }
+          }
+        }
+      }
+    },
+    "confirmed": {
+      "type": "string",
+      "description": "11-18T18:44:47.900933000+09:00"
+    },
+    "hash": {
+      "type": "string"
+    },
+    "height": {
+      "type": "string"
+    },
+    "prev_block_hash": {
+      "type": "string"
+    },
+    "proposed_time": {
+      "type": "string"
+    },
+    "proposer": {
+      "type": "string"
+    },
+    "proposer_transaction": {
+      "type": "string"
+    },
+    "round": {
+      "type": "string"
+    },
+    "transactions": {
+      "type": "array"
+    },
+    "transactions_root": {
+      "type": "string"
+    },
+    "version": {
+      "type": "string"
+    }
+  }
+}
Response  404
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
+  "status": 400,
+  "title": "does not exists",
+  "type": "https://boscoin.io/sebak/error/128"
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "status": {
+      "type": "number"
+    },
+    "title": {
+      "type": "string"
+    },
+    "type": {
+      "type": "string"
+    }
+  }
+}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
+  "status": 500,
+  "title": "problem error message",
+  "type": "https://boscoin.io/sebak/error/{error_code}"
+}
Schema
{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "status": {
+      "type": "number"
+    },
+    "title": {
+      "type": "string"
+    },
+    "type": {
+      "type": "string"
+    }
+  }
+}

Generated by aglio on 31 Jan 2019

diff --git a/asset/01_image/isaac_flow.png b/asset/01_image/isaac_flow.png new file mode 100644 index 0000000..a1b86aa Binary files /dev/null and b/asset/01_image/isaac_flow.png differ diff --git a/introduction-issac-consensus-protocol-betterment.md b/introduction-issac-consensus-protocol-betterment.md new file mode 100644 index 0000000..a3f24fe --- /dev/null +++ b/introduction-issac-consensus-protocol-betterment.md @@ -0,0 +1,189 @@ +--- +layout: post +permalink: /introduction-isaac-consensus-protocol-betterment/ +--- +--- +# Preface + +Since the beginning of January 2018, there have been many changes in the world of cryptography and blockchain. There is a worldwide interest in what are Bitcoins and what is Blockchain? + +Despite the steep decline in Bitcoin price, the BOScoin development team has released the ISAAC consensus protocol as open source at [github](https://github.com/bosnet) and released a mobile wallet. +Recently, we are doing our best to develop MainNet on our TestNet network, SEBAK. + +At this time we are pleased to release the design of a more advanced version of the ISAAC consensus protocol. + +# Why advance the design of our ISAAC consensus protocol? + +Since the successful release of the ISAAC consensus protocol, the BOScoin development team has been working hard to improve ISAAC. + +We have been researching projects such as EOS, ONTOLOGY, TEZOS, and COSMOS, and have been thinking about improving the ISAAC consensus protocol. +We do not doubt the success of the mentioned projects, but they have not been able to give a good answer to the question of decentralization. + +Therefore, we started to improve and develop on the existing ISAAC consensus protocol, and began to think about the blockchain network structure which is considered more decentralized, faster, and more scalable. + +As a result, with the principles outlined below, we are developing a better BOScoin. + +***** + +## ISAAC's advanced design principles explanation + +***** + +### 1. Decentralization + +Ethereum's chief scientist Vitalik Buterin told us about the [meaning and necessity of decentralization of the blockchain in his blog.](https://medium.com/@VitalikButerin/the-meaning-of-decentralization-a0c92b76a274) He said; + +* Blockchains are politically decentralized and structurally decentralized, but all nodes behave like one computer for a single state. +* Resistance to network or blockchain failures, resistance to (network) attackers, and (centralized) cartel-forming tolerance within (other than network participants) is why decentralization is necessary. + +And also attempt to measure decentralization by using the Nakamoto coefficient index from ["Quantifying Decentralization"](https://news.earn.com/quantifying-decentralization-e39db233c28e) posted by Balaji.S. Srinivasan, CTO of Coinbase. + +Recently, EOS has been criticized for their use of 21 Block Producers who are responsible for the validation of the entire blockchain, distorting the value of decentralization. + +Decentralization is one of the most important factors in blockchain. Also, as the days go by, technical support and demand for decentralization of public blockchains are increasing. + +So the BOScoin development team is designing our ISAAC protocol with decentralization as a key component. + +***** + +### 2. Gradual Open membership + +Congress voting that follows Open Membership is an important part of the BOScoin ecosystem. For BOScoin, which is aiming at one-person voting, the blockchain infrastructure must be operated with stability to make the voting system work. +If the blockchain fails because of the nature of the blockchain, it should not roll-back or terminate the network. + +Therefore, to increase the number of network nodes gradually in order to access the desired goal in a reliable and verifiable way, the principle of ensuring sufficient operational stability by constructing a quorum, which is a set of nodes, We've been working on this design. + +***** + +### 3. Network robustness - Safety + +Let's assume that nodes have different blocks each other in the blockchain network, Can we trust this blockchain system? + +Safety, terms in blockchain, means that nodes will not reach consensus based on different results. And Liveness means node will make consensus based on a single value no matter how much takes time. ( [You can find more detail informations through previous AA](https://boscoin.io/introduction-of-isaac-consensus-protocol-for-bosnet/) .) +Liveness & Safety are essential factors for blockchain network robustness. Especially, Safety have to be existed for network dispatch prevention( a.k.a Hardfork ). + +Consensus protocol of the bitcoin is concerned on liveness among safety and liveness. Accordingly, bitcoin network can't avoid hardfork to bitcoin-cash, bitcoin gold and etc. + +In other words, BOScoin dev team thought that blockchain network should have safety for its sound blockchain network. + +As a result, BOScoin dev team  apply safety factor on ISAAC consensus protocol design for keeping network robustness. This decision will help block's finality and prevent blockchain network dispatch. + +***** +***** + +# Now, Era of ISAAC consensus protocol. + +## Feature of ISAAC consensus protocol + +Assumptions: Transactions are sent by clients before consensus is started, and stored temporarily in the transaction pool of BOScoin network nodes. + +![ISAAC FLOW](../asset/01_image/isaac_flow.png) + +***** + +## How the consensus protocol works + +### ISAAC protocol for consensus based on ballot. + +* Ballot : set of valid transactions +* Four states make nodes reach agreement + * INIT -  node will propose or receive a ballot. + * SIGN - node will be checking ballot is valid by node itself. + * ACCEPT - node will be checking ballot is valid by validators. + * ALL CONFIRM - node will confirm block with transactions in ballot. +* Process + * **Network start** + * At the beginning of the network, the genesis block saved with block . It's height is 1 and round number is 0. + * The node start with INIT state, height 2 and round 0. + * **Init** + * Timer sets up TIMEOUT_INIT. + * The steps to propose ballot are as follows. + * If node is proposer of this round broadcasts a ballot (INIT, YES), + * Ballot includes valid transactions (only hashes) or empty transaction. + * When it broadcasts ballot, node goes to the next state. + * If node is not proposer, it waits for and receives ballot (INIT, YES). + * When it receives the ballot, node goes to the next state. + * When timer ends, node goes to the next state. + * **SIGN** + * Timer resets and sets up again TIMEOUT_SIGN + * Node checks proposed ballot is valid. + * Each node receives ballots and when number of B(SIGN, YES/NO) is greater than or equal to 2/3 of validators, the node broadcasts B(ACCEPT, YES/NO). + * it is not possible to satisfy above two conditions, node broadcasts B(ACCEPT, EXP). + * When the timer expires, node broadcasts B(ACCEPT, EXP). + * Node goes to the next state. + * **ACCEPT** + * Timer resets and sets up again TIMEOUT_ACCEPT. + * Each node receives ballots and moves to the same process with SIGN. + * **ALL-CONFIRM** + * Node confirms and saves the block with proposed transactions, ballot, even though it is empty. + * Node filters invalid transactions in the transaction pool. + * Node waits for TIMEOUT_ALLCONFIRM. + * It goes to INIT state with height + 1 and round 0. + +### Transaction Protocol for sharing transactions to all nodes in the network + +* All nodes must validate the transactions in the proposed ballot by itself and vote with the result. +* Increasing efficiency, only hash of the transaction is included in ballot. +* Process + * A client sends a message, that it has a transaction, to the node. + * Node receives the message and goes to the next process with the transaction inside of the message. + * Node checks the format of the transactions whether they are well formed or not. + * If the same transaction is already in the transaction pool, nodes stops this process. + * Node validates transaction and checks whether transaction is valid or not. + * Node broadcasts the message to all nodes except the sender. + +### How to select Proposer + +* Proposer will be selected from the algorithm based on block height and round. +* Block height is last confirm block. +* Round : A variable used within one block generation process. When some nodes run abnormally, the round needed to select intact node as proposer. +* Proposer selection process + * Sorting validators in a validator's address by alphabetical order. + * n = (block height + round number) mod len(validators) + * The proposer is n'th validator. +* Proposer selection method + +```golang + +func CalculateProposer(blockHeight int, roundNumber int) string { + candidates := sort.StringSlice(nr.connectionManager.RoundCandidates()) + candidates.Sort() + + return candidates[(blockHeight + roundNumber)%len(candidates)] +} +``` + +***** + +## Which specific features has there been progress? + +### **1. Improve Hard-fork resist & decentralization** + +The blockchain projects, which use POW and emphasize liveness, are Bitcoin and Ethereum. These projects have huge support from the community, but nonetheless Bitcoin and Ethereum could not avoid Hardforking. + +Under the principle that BOScoin network maintains safety, each node that participates in the network can prevent a hard fork and raise the decentralization factor through an algorithm that ensure each node is fairly elected to Proposer. + +Let's compare it to existing cryptocurrency projects. For example, EOS is a DPOS algorithm, so it has hard fork resistance, but it is relatively insufficient for consensus participated as independent node. Stellar has successfully implemented decentralization and hard fork resistance through SCP, but it is difficult for new nodes to participate in the consensus due to the node network topology. + +The BOScoin development team expects that the Proposer algorithm implemented in ISAAC will allow nodes to participate in fair settlement based on round number and block height. + +### **2. Improve expanding open-source developer's ecosystem & concurrency performance** + +Cryptocurrency projects have used many different languages for their implementation depending on the specification and background of the project. +The performance of the blockchain is also important, but the public blockchain should also focus on creating the developer ecosystem. + +On September 6, 2018, the top 100 projects by market cap used c ++ (23) implementation languages ​​and the second most used language was Golang (18). +Golang has provided a variety of libraries for cryptocurrency projects and we decided that the syntax was simple enough to make the developer ecosystem relatively easy. + +We have expanded the open-source global development ecosystem through Golang to encourage the participation of developers from around the world. +Golang also has the advantage of being able to handle concurrent programming with goroutine and handle many transactions. + +### **3.Expansion improvement** + +Trust contracts and Congress voting are currently under active development. +At this time, ISAAC development consideration is based on scalability to smoothly drive Trust Contract and Voting. +The current ISAAC consensus protocol supports transactions only, this next version will extending functionality to Trust Contracts and Congress voting. + +## Future work + +Next posting will show you about what is our plan for completion of the proposer election process, and what is the plan to make a testing enviroment for quality control on the BOScoin nework. diff --git a/isaac/how_to_calculate_block_time_buffer.md b/isaac/how_to_calculate_block_time_buffer.md deleted file mode 100644 index 64500e4..0000000 --- a/isaac/how_to_calculate_block_time_buffer.md +++ /dev/null @@ -1,57 +0,0 @@ -# How To Calculate Block Time Buffer - -## Background -The `SEBAK` should have an average block confirmation time of 5 seconds (configurable). Because the BOScoin blockchain has to issue a certain amount of coins periodically according to the white paper, such as the Bitcoin blockchain, and the criterion is block height. Therefore, if the average time for confirming a block is not constant, then various problems arise because the coins are not issued constantly. - -## Solution -To make the average block time be constant, the node sets an interval of block time buffer after consensus and then the block is confirmed and saved. - -### Block Time Buffer -There are two purpose of block time buffer. One is to make the block time be constant as described above, and the other is to put a interval to gather transactions before suggesting the next block. -I will briefly explain how block time buffer is calculated, for example. -Assume that the system needs to have a block confirm time of 5 seconds. If the average block generation time is longer than 5 seconds, the node should decrease this block generation time by making this variable as small as possible. If it is shorter than 5 seconds, the node should increase it. - -### In detail -If you do not want to know the details, you can skip the following information. -```go -func calculateBlockTimeBuffer(goal, average, untilNow, delta) Duration { - epsilon = 20 microseconds - if average >= goal { - if average-goal < epsilon { - result = goal - untilNow - } else { - result = goal - delta - untilNow - } - } else { - if goal-average < epsilon { - result = goal - untilNow - } else { - result = goal + delta - untilNow - } - } - if result < 0 { - result = 0 - } - return result - } -``` -* goal: the goal of block generation time. -* average: the average of block generation time until now. -* untilNow: the time from proposed to agreement of this block. -* delta: the variable to prevent changes sharply of block creation time. -* epsilon: a range that doesn't control the block time(20 microseconds). - -For example, -* goal: 5 sec, average: 7 sec, untilNow: 3 sec, delta: 1 sec - 1. `BlockTimeBuffer = 5 - 1 - 3 = 1` - 1. In other words, since the average(7) is longer than the goal(5), the node should reduce this block time to 4 - seconds(untilNow(3) + BlockTimeBuffer(1)) -* goal: 5 sec, average: 3 sec, untilNow: 4 sec, delta: 1 sec - 1. `BlockTimeBuffer = 5 + 1 - 4 = 2` - 1. In other words, since the average(3) is shorter than the goal(5), the node should increase this block time to 6 seconds(untilNow(4) + BlockTimeBuffer(2)). -* goal: 5 sec, average: 3 sec, untilNow: 7 sec, delta: 1 sec - 1. `BlockTimeBuffer = 5 + 1 - 7 = -1 -> 0` - 1. In other words, since the average(3) is shorter than the goal(5), it is necessary to increase the time taken for consensus. But untilNow(7) has already exceeded the block generation time allowance range(6 = goal + delta), the BlockTimeBuffer becomes 0. -* goal: 5 sec, average: 5.000010 sec, untilNow: 4 sec, delta: 1 sec - 1. `BlockTimeBuffer = 5 - 4 = 1` - 1. In other words, since the average(5.000010) is in range of epsilon, the node should maintain this block time to 5 diff --git a/ricardian_guide.md b/ricardian_guide.md index 239e9b0..3e8f32a 100644 --- a/ricardian_guide.md +++ b/ricardian_guide.md @@ -1,3 +1,8 @@ +--- +layout: post +permalink: /how-to-make-a-ricardian-contract-for-PF-proposal/ +--- +--- # How to make a ricardian contract for PF proposal. In Boscoin, ricardian contract is written in yaml format. diff --git a/sebak/client_libraries.md b/sebak/client_libraries.md deleted file mode 100644 index 9af0b29..0000000 --- a/sebak/client_libraries.md +++ /dev/null @@ -1,6 +0,0 @@ -# Sebak Client Libraries - -> ## Python SDK for sebak is here ; [sebak-pyutil](https://github.com/spikeekips/sebakpy-util) -> ## Javascript SDK for sebak is here ; [sebak-jsutil](https://github.com/bosnet/sebakjs-util) -> ## Creating accounts should use tool, [sebak-angelbot](https://github.com/spikeekips/sebak-angelbot). -> ## Sebak API documents is here ; [API docs](https://bosnet.github.io/sebak/api/). diff --git a/sebak/what_kind_of_keypair_use_in_sebak.md b/sebak/what_kind_of_keypair_use_in_sebak.md deleted file mode 100644 index 00179af..0000000 --- a/sebak/what_kind_of_keypair_use_in_sebak.md +++ /dev/null @@ -1,2 +0,0 @@ -# What kind of key pair sebak in use? - diff --git a/sebak/command.md b/sebak_command.md similarity index 98% rename from sebak/command.md rename to sebak_command.md index 40999cc..97e846c 100644 --- a/sebak/command.md +++ b/sebak_command.md @@ -1,4 +1,10 @@ -To install `sebak` command, please check the [installation guide](installation.md). +--- +layout: post +permalink: /SEBAK-command/ +--- +--- +# SEBAK command +To install `sebak` command, please check the [installation guide](./sebak_installation.md). # Options ```sh diff --git a/sebak/deployment.md b/sebak_deployment.md similarity index 97% rename from sebak/deployment.md rename to sebak_deployment.md index 6fd34ec..6d0be7c 100644 --- a/sebak/deployment.md +++ b/sebak_deployment.md @@ -1,3 +1,9 @@ +--- +layout: default +permalink: /SEBAK-deployment/ +--- +--- +# SEBAK deployment To deploy the sebak network, the basic steps are mentioned below. 1. Compose network @@ -6,7 +12,7 @@ To deploy the sebak network, the basic steps are mentioned below. If you deployed network already, you should skip generating genesis block . -You can run SEBAK in standalone mode, please check [Running Standalone Mode](deployment_standalone.md). +You can run SEBAK in standalone mode, please check [Running Standalone Mode](./sebak_deployment_standalone.md). The `network-id` is `this-is-test-sebak-network`. @@ -42,7 +48,7 @@ INFO[10-29|14:57:28] genesis block created ... successfully created genesis block ``` -> You can also check the usage of `sebak key generate` in [SEBAK Commands](command.md#sebak-genesis). +> You can also check the usage of `sebak key generate` in [SEBAK Commands](./sebak_command.md#sebak-genesis). You should make genesis block in every nodes diff --git a/sebak/deployment_standalone.md b/sebak_deployment_standalone.md similarity index 93% rename from sebak/deployment_standalone.md rename to sebak_deployment_standalone.md index 66fa5e0..ad5f6d9 100644 --- a/sebak/deployment_standalone.md +++ b/sebak_deployment_standalone.md @@ -1,8 +1,14 @@ +--- +layout: post +permalink: /SEBAK-deployment-standalone/ +--- +--- +# SEBAK deployment standalone By the nature of design, SEBAK should be deployed as composition of nodes and they should tightly connected for consensus. This standalone mode recommend only for testing and debugging. With standalone mode, you do not need to compose quorum and another server. It does not make consensus, just execute incoming messages including transactions, but it do the right work, such as inflation, collecting transaction fee, etc. ## Installation -Please follow the [Installation](installation.md). If you are so busy and you already have golang (1.11 or higher) environment, do like this, +Please follow the [Installation](./sebak_installation.md). If you are so busy and you already have golang (1.11 or higher) environment, do like this, ```sh $ git clone https://github.com/bosnet/sebak.git /tmp/sebak-standalone @@ -20,7 +26,7 @@ You will get the executable `./sebak`. You can use it to deploy. ## Deploy -> For the detailed deployment instruction, please check [Deploy Network](deployment.md). +> For the detailed deployment instruction, please check [Deploy Network](./sebak_deployment.md). For standalone mode, SEBAK already prepared the special command, `self`. You can simply give only `self` in `--validators` option. Then you will get the standalone mode of SEBAK. @@ -38,7 +44,7 @@ $ sebak key generate # for node Public Address: GCEQ4M573WODOWCAVBKJBVLLT2MIQ6ZDUYCU6SXFGLKYKL5IWU6JTCBW ``` -2. Initialize sebak with genesis block. You have to put network id, genesis public address and common account public address in cmd. +2. Initialize sebak with genesis block. You have to put network id, genesis public address and common account public address in cmd. ```sh $ sebak genesis \ --network-id "this-is-sebak-standalone" \ @@ -78,7 +84,7 @@ DBUG[10-07|13:47:20] parsed flags: module=main ## Testing -For usage of SEBAK commands, plese check [`sebak` commands](command.md). +For usage of SEBAK commands, plese check [`sebak` commands](./sebak_command.md). ### Creating Account @@ -88,7 +94,7 @@ $ sebak key generate # for new account Public Address: GCQ3RMPRKH5OCFNFCUB33GIV3OSCJXSTIXTMZOSWXYZYJGANYDJ6NOA3 ``` -For Create account, you should put 1 public address for account create and a genesis block secret seed ( or secret key ). +For Create account, you should put 1 public address for account create and a genesis block secret seed ( or secret key ). ```sh $ sebak wallet payment \ diff --git a/sebak/errors.md b/sebak_errors.md similarity index 60% rename from sebak/errors.md rename to sebak_errors.md index 06bad7f..986a6ec 100644 --- a/sebak/errors.md +++ b/sebak_errors.md @@ -1,3 +1,8 @@ +--- +layout: post +permalink: /Sebak-errors/ +--- +--- # Sebak Errors ## Response diff --git a/sebak/for_exchanges.md b/sebak_for_exchanges.md similarity index 83% rename from sebak/for_exchanges.md rename to sebak_for_exchanges.md index 54f364a..f66072f 100644 --- a/sebak/for_exchanges.md +++ b/sebak_for_exchanges.md @@ -1,4 +1,11 @@ -# Pre-required Instruction +--- +layout: post +permalink: /SEBAK-for-exchange/ +--- +--- +# SEBAK for exchange + +## Pre-required Instruction Before access to Sebak public Testnet, BOScoin devteam strongly recommends to test in your local environment with [standalone mode](Running-Standalone-Mode) & [sebak-angelbot](https://github.com/spikeekips/sebak-angelbot). @@ -13,21 +20,21 @@ In case of you have seen unexpected errors or have questions, * SEBAK version and commit id. * If you request something to SEBAK, the payload you sent. -## Sebak Installation +### Sebak Installation Please check [SEBAK installation](SEBAK-Installation-Guide). -## Running Sebak on localhost (a.k.a 'standalone mode') +### Running Sebak on localhost (a.k.a 'standalone mode') Please check contents in [standalone mode](Running-Standalone-Mode). -## Installation sebak-angelbot, the account creation tool +### Installation sebak-angelbot, the account creation tool You can check specific information in the project page, [sebak-angelbot](https://github.com/spikeekips/sebak-angelbot). -## Test account creation through 'sebak-angelbot' in localhost enviroment +### Test account creation through 'sebak-angelbot' in localhost enviroment -### How to create account using 'sebak-angelbot'? +#### How to create account using 'sebak-angelbot'? - Running sebak node as [standalone](Running-Standalone-Mode) mode. - Execute sebak command `$ sebak key generate` as much as you want. this key pair will be used to create new account in sebak node. We recommend almost 100 keypair. @@ -36,11 +43,11 @@ You can check specific information in the project page, [sebak-angelbot](https:/ - From now you can create new accounts. - You can check account existed or not, when you used `http(or https)://localhost:12345/api/v1/accounts/` -## Test API in localhost environment +### Test API in localhost environment You can check [Sebak API document contents](https://bosnet.github.io/sebak/api/). -### How to make transaction?? +#### How to make transaction?? **required below data format & data** * All data must be sent through `POST` method @@ -51,13 +58,13 @@ You can check [Sebak API document contents](https://bosnet.github.io/sebak/api/) - [sebakjs-util](https://github.com/bosnet/sebakjs-util): Javascript library - [sebakpy-util](https://github.com/spikeekips/sebakpy-util): Python library -# Instruction test on Public Testnet +## Instruction test on Public Testnet **NOTE: SEBAK only supports HTTP/2.** -## Sebak public Testnet +### Sebak public Testnet You can access https://testnet-sebak.blockchainos.org . You can test sebak API, [API docs](https://bosnet.github.io/sebak/api/). -## 'sebak-angelbot' for testing. +### 'sebak-angelbot' for testing. You can access https://testnet-angelbot.blockchainos.org . diff --git a/sebak/how_block_inflation_works.md b/sebak_how_block_inflation_works.md similarity index 71% rename from sebak/how_block_inflation_works.md rename to sebak_how_block_inflation_works.md index d8b7e06..2426e57 100644 --- a/sebak/how_block_inflation_works.md +++ b/sebak_how_block_inflation_works.md @@ -1,3 +1,9 @@ +--- +layout: post +permalink: /how-block-inflation-works/ +--- +--- + # How block inflation works? BOSnet possesse common budeget account. @@ -6,4 +12,4 @@ BOSnet will produce automatically 50 BOSes in each bloc and those BOSes will sen BOScoin inflation operating period will be 5 years approximately that will started first block produce in BOSnet till 36 millon blocks. -Each transaction charge also send to common budget account. \ No newline at end of file +Each transaction charge also send to common budget account. diff --git a/sebak/how_public_financing_inflation_works.md b/sebak_how_public_financing_inflation_works.md similarity index 93% rename from sebak/how_public_financing_inflation_works.md rename to sebak_how_public_financing_inflation_works.md index 159dab5..f00bec9 100644 --- a/sebak/how_public_financing_inflation_works.md +++ b/sebak_how_public_financing_inflation_works.md @@ -1,3 +1,8 @@ +--- +layout: post +permalink: /how-pf-inflation-works/ +--- +--- # How public financing inflation works? ## PF inflation diff --git a/sebak/how_to_make_transaction_post.md b/sebak_how_to_make_transaction_post.md similarity index 98% rename from sebak/how_to_make_transaction_post.md rename to sebak_how_to_make_transaction_post.md index edbe3e0..4ef2ab4 100644 --- a/sebak/how_to_make_transaction_post.md +++ b/sebak_how_to_make_transaction_post.md @@ -1,3 +1,8 @@ +--- +layout: post +permalink: /how-to-make-transaction-post/ +--- +--- # How to make transaction post? Transaction submit to SEBAK main net and write in blockchain when after transaction confirmed . @@ -191,4 +196,4 @@ The API of sending transaction, please see https://bosnet.github.io/sebak/api/#t ### `Payment` -* `target` address must exist in network. \ No newline at end of file +* `target` address must exist in network. diff --git a/sebak/reporting_issue.md b/sebak_how_to_report_issues.md similarity index 95% rename from sebak/reporting_issue.md rename to sebak_how_to_report_issues.md index b2731d1..830f1dd 100644 --- a/sebak/reporting_issue.md +++ b/sebak_how_to_report_issues.md @@ -1,3 +1,8 @@ +--- +layout: post +permalink: /how-to-report-issue/ +--- +--- # How to report issues ? All the development happens on Github, on public projects. diff --git a/sebak/installation.md b/sebak_installation.md similarity index 83% rename from sebak/installation.md rename to sebak_installation.md index bcfcccb..2f078f0 100644 --- a/sebak/installation.md +++ b/sebak_installation.md @@ -1,3 +1,10 @@ +--- +layout: post +permalink: /SEBAK-installation/ +--- +--- +# SEAK installation + ## Prerequisite Before installing, you must install Go 1.11 or above. @@ -23,3 +30,4 @@ You can see the detailed logs; ```sh $ go test ./... -v ``` + diff --git a/sebak/testnet.md b/sebak_testnet.md similarity index 87% rename from sebak/testnet.md rename to sebak_testnet.md index cd7b019..db094b9 100644 --- a/sebak/testnet.md +++ b/sebak_testnet.md @@ -1,3 +1,8 @@ +--- +layout: post +permalink: /SEBAK-testnet/ +--- +--- ### *Testnet* As its name implies, *Testnet* is used for testing purpose. You can create new accounts without any permission or restriction and send payment to other accounts. This network is isolated from the *existing token-net network*. @@ -24,9 +29,9 @@ When you send a transaction, creating an account or sending a payment, *Testnet* ### TestNet and tools -| endpoint | +| endpoint | | -- | -| http://testnet-sebak.blockchainos.org| +| http://testnet-sebak.blockchainos.org| > ## Python SDK for sebak is here ; [sebak-pyutil](https://github.com/spikeekips/sebakpy-util) > ## Javascript SDK for sebak is here ; [sebak-jsutil](https://github.com/bosnet/sebakjs-util) @@ -34,5 +39,4 @@ When you send a transaction, creating an account or sending a payment, *Testnet* > ## Sebak API documents is here ; [API docs](https://bosnet.github.io/sebak/api/). ### Errors and Q&A - - Please refer to our [documentation](reporting_issue.md) to report an issue. + Please refer to this document, [When you saw the errors during testing](./sebak_I_find_errors_in_sebak_how_can_I_report). diff --git a/sebak/watcher_mode.md b/sebak_watcher_mode.md similarity index 94% rename from sebak/watcher_mode.md rename to sebak_watcher_mode.md index 8edf293..ab071fc 100644 --- a/sebak/watcher_mode.md +++ b/sebak_watcher_mode.md @@ -1,4 +1,9 @@ -## Watcher node mode +--- +layout: post +permalink: /watcher-node-mode/ +--- +--- +### Watcher node mode There are several node types in Sebak network. One of these is Watcher, this will sync the entire data from validator nodes or other watcher nodes, so you can monitor all the operations in the network. diff --git a/sebak/what_is_GON.md b/sebak_what_is_GON.md similarity index 83% rename from sebak/what_is_GON.md rename to sebak_what_is_GON.md index eedba82..bdfab74 100644 --- a/sebak/what_is_GON.md +++ b/sebak_what_is_GON.md @@ -1,3 +1,8 @@ +--- +layout: post +permalink: /what-is-gon/ +--- +--- # What is GON? 1 BOS == 10,000,000 GON @@ -6,4 +11,4 @@ It is decimal unit in BOScoin like as Satoshi in the Bitcoin and Gwei in the Eth So 1 BOS equals to 10,000,000 GON. When you use [*sebak-angelbot*](https://github.com/spikeekips/sebak-angelbot) ,[*sebak-pyutils*](https://github.com/spikeekips/sebakpy-util) or API query use unit **GON**. -Please note this point. \ No newline at end of file +Please note this point. diff --git a/sebak_what_kind_of_keypair_use_in_sebak.md b/sebak_what_kind_of_keypair_use_in_sebak.md new file mode 100644 index 0000000..eea6735 --- /dev/null +++ b/sebak_what_kind_of_keypair_use_in_sebak.md @@ -0,0 +1,11 @@ +--- +layout: post +permalink: /What-kind-of-key-pair-sebak-in-use/ +--- +--- +# What kind of key pair SEBAK in use? + +BOScoin mainnet, a.k.a SEBAK, use key pair from [stellar key pair library](https://github.com/stellar/go/tree/master/keypair). + + +Public key make sure that every transaction is secure. The public key is always safe & can be shared with other people neccessary to get your account information and verify that you have authority about transactions. But Secret seed, however, is private information that proves you own your account. So users have to be care to keep his secret seed in safe. If not, He has possibility to lose all of his digital assets. \ No newline at end of file diff --git a/simple-guide-for-sebak-migration.md b/simple-guide-for-sebak-migration.md new file mode 100644 index 0000000..1c36cce --- /dev/null +++ b/simple-guide-for-sebak-migration.md @@ -0,0 +1,59 @@ +--- +layout: post +permalink: /simple-guide-for-sebak-migration/ +--- +--- +# Simple guide to Exchanges for BOScoin migration + +Dear exchange developers. +Hello. +Now we are happy to announce BOScoin's main net ( A.K.A SEBAK) will launch in near future. +For the migration in a smooth, Please read below introduction carefully. + +For Help to understanding, BOScoin team write down simple guide. You can find specific guide in below link. + +https://github.com/bosnet/sebak/wiki/For-exchanges + +Here is the BOScoin SEBAK's testnet URL address. +http://testnet-sebak.blockchainos.org/ + +Of course you can access when you opend above link aned to send transaction. However before send transaction, you must check SEBAK api at first. + +Here is the [SEBAK API document](https://bosnet.github.io/sebak/api/). + +So We,BOScoin dev team, **stronly recommend** to test in your local enviroment. You can see the contents [How to test in your local enviroment](https://github.com/bosnet/sebak/wiki/Running-Standalone-Mode). + +At the moment, BOScoin dev team provide SDKs in Python and Javascript. Please check below repositories. + +[sebakjs-util](https://github.com/bosnet/sebakjs-util): Sebak SDK in Javascript + +[sebakpy-util](https://github.com/spikeekips/sebakpy-util): Sebak SDK in Python + +Before send transaction, you are necessary to make account. For that you have to use tool,called 'sebak-angelbot'. +Here is the [sebak-angelbot repository](https://github.com/spikeekips/sebak-angelbot) + +And here is the BOScoin team's angelbot url address to provide. +https://testnet-angelbot.blockchainos.org/ + +NOTE: when you send transaction, Please take care of **BOScoin's measure of amount**. + BOScoin unit should be **GON**. It is decimal unit in BOScoin like as Satoshi in the Bitcoin and Gwei in the Ethereum. +**So 1 BOS equals to 10,000,000 GON.** + +# Q&A inquiries + +When you met issues during test on the [Public test net](http://testnet-sebak.blockchainos.org/),Please send email to dev-support@blockchainos.org. + +Email must include below informations. +- Your error results or questions +- Where did you find errors, in Testnet or your own environment. +- SEBAK version and commit id. +- If you request something to SEBAK, the payload you sent. + +Thank you. + +BOScoin dev team + + + + + diff --git a/isaac/how_the_consensus_protocol_works.md b/tech_how_the_consensus_protocol_works.md similarity index 96% rename from isaac/how_the_consensus_protocol_works.md rename to tech_how_the_consensus_protocol_works.md index f341e5b..27c152c 100644 --- a/isaac/how_the_consensus_protocol_works.md +++ b/tech_how_the_consensus_protocol_works.md @@ -1,3 +1,8 @@ +--- +layout: post +permalink: /how-the-consensus-protocol-works/ +--- +--- # How the consensus protocol works # Consensus Protocol @@ -104,7 +109,7 @@ If the voting determines that the ballot is valid, all nodes confirm the transac 1. It goes to `INIT` state with height + 1 and round 0. ### `INIT` -* If the node is `proposer`, it waits for [block time buffer](how_to_calculate_block_time_buffer.md) and propose. +* If the node is `proposer`, it waits for [block time buffer](tech_how_to_calculate_block_time_buffer.md) and propose. * Else, it waits for `block time buffer` + TIMEOUT_INIT to receive proposed ballot. ## Transaction Protocol diff --git a/tech_how_to_calculate_block_time_buffer.md b/tech_how_to_calculate_block_time_buffer.md new file mode 100644 index 0000000..51b8478 --- /dev/null +++ b/tech_how_to_calculate_block_time_buffer.md @@ -0,0 +1,119 @@ +--- +layout: post +permalink: /how-to-calculate-block-time-buffer/ +--- +--- +# How To Calculate Block Time Buffer + +## Background +The `SEBAK` should have an average block confirmation time of 5 seconds (configurable). Because the BOScoin blockchain has to issue a certain amount of coins periodically according to the white paper, such as the Bitcoin blockchain, and the criterion is block height. Therefore, if the average time for confirming a block is not constant, then various problems arise because the coins are not issued constantly. + +## Solution +To make the average block time be constant, the node sets an interval of block time buffer after consensus and then the block is confirmed and saved. + +### Block Time Buffer +There are two purpose of block time buffer. One is to make the block time be constant as described above, and the other is to put a interval to gather transactions before suggesting the next block. +I will briefly explain how block time buffer is calculated, for example. +Assume that the system needs to have a block confirm time of 5 seconds. If the average block generation time is longer than 5 seconds, the node should decrease this block generation time by making this variable as small as possible. If it is shorter than 5 seconds, the node should increase it. + +### In detail +If you do not want to know the details, you can skip the following information. +```go +func calculateBlockTimeBuffer(goal, average, untilNow, delta) Duration { + epsilon = 20 microseconds + if average >= goal { + if average-goal < epsilon { + result = goal - untilNow + } else { + result = goal - delta - untilNow + } + } else { + if goal-average < epsilon { + result = goal - untilNow + } else { + result = goal + delta - untilNow + } + } + if result < 0 { + result = 0 + } + return result + } +``` +* goal: the goal of block generation time. +* average: the average of block generation time until now. +* untilNow: the time from proposed to agreement of this block. +* delta: the variable to prevent changes sharply of block creation time. +* epsilon: a range that doesn't control the block time(20 microseconds). + +For example, +* goal: 5 sec, average: 7 sec, untilNow: 3 sec, delta: 1 sec + 1. `BlockTimeBuffer = 5 - 1 - 3 = 1` + 1. In other words, since the average(7) is longer than the goal(5), the node should reduce this block time to 4 + seconds(untilNow(3) + BlockTimeBuffer(1)) +* goal: 5 sec, average: 3 sec, untilNow: 4 sec, delta: 1 sec + 1. `BlockTimeBuffer = 5 + 1 - 4 = 2` + 1. In other words, since the average(3) is shorter than the goal(5), the node should increase this block time to 6 seconds(untilNow(4) + BlockTimeBuffer(2)). +* goal: 5 sec, average: 3 sec, untilNow: 7 sec, delta: 1 sec + 1. `BlockTimeBuffer = 5 + 1 - 7 = -1 -> 0` + 1. In other words, since the average(3) is shorter than the goal(5), it is necessary to increase the time taken for consensus. But untilNow(7) has already exceeded the block generation time allowance range(6 = goal + delta), the BlockTimeBuffer becomes 0. +* goal: 5 sec, average: 5.000010 sec, untilNow: 4 sec, delta: 1 sec + 1. `BlockTimeBuffer = 5 - 4 = 1` + 1. In other words, since the average(5.000010) is in range of epsilon, the node should maintain this block time to 5 +# How To Calculate Block Time Buffer + +## Background +The `SEBAK` should have an average block confirmation time of 5 seconds (configurable). Because the BOScoin blockchain has to issue a certain amount of coins periodically according to the white paper, such as the Bitcoin blockchain, and the criterion is block height. Therefore, if the average time for confirming a block is not constant, then various problems arise because the coins are not issued constantly. + +## Solution +To make the average block time be constant, the node sets an interval of block time buffer after consensus and then the block is confirmed and saved. + +### Block Time Buffer +There are two purpose of block time buffer. One is to make the block time be constant as described above, and the other is to put a interval to gather transactions before suggesting the next block. +I will briefly explain how block time buffer is calculated, for example. +Assume that the system needs to have a block confirm time of 5 seconds. If the average block generation time is longer than 5 seconds, the node should decrease this block generation time by making this variable as small as possible. If it is shorter than 5 seconds, the node should increase it. + +### In detail +If you do not want to know the details, you can skip the following information. +```go +func calculateBlockTimeBuffer(goal, average, untilNow, delta) Duration { + epsilon = 20 microseconds + if average >= goal { + if average-goal < epsilon { + result = goal - untilNow + } else { + result = goal - delta - untilNow + } + } else { + if goal-average < epsilon { + result = goal - untilNow + } else { + result = goal + delta - untilNow + } + } + if result < 0 { + result = 0 + } + return result + } +``` +* goal: the goal of block generation time. +* average: the average of block generation time until now. +* untilNow: the time from proposed to agreement of this block. +* delta: the variable to prevent changes sharply of block creation time. +* epsilon: a range that doesn't control the block time(20 microseconds). + +For example, +* goal: 5 sec, average: 7 sec, untilNow: 3 sec, delta: 1 sec + 1. `BlockTimeBuffer = 5 - 1 - 3 = 1` + 1. In other words, since the average(7) is longer than the goal(5), the node should reduce this block time to 4 + seconds(untilNow(3) + BlockTimeBuffer(1)) +* goal: 5 sec, average: 3 sec, untilNow: 4 sec, delta: 1 sec + 1. `BlockTimeBuffer = 5 + 1 - 4 = 2` + 1. In other words, since the average(3) is shorter than the goal(5), the node should increase this block time to 6 seconds(untilNow(4) + BlockTimeBuffer(2)). +* goal: 5 sec, average: 3 sec, untilNow: 7 sec, delta: 1 sec + 1. `BlockTimeBuffer = 5 + 1 - 7 = -1 -> 0` + 1. In other words, since the average(3) is shorter than the goal(5), it is necessary to increase the time taken for consensus. But untilNow(7) has already exceeded the block generation time allowance range(6 = goal + delta), the BlockTimeBuffer becomes 0. +* goal: 5 sec, average: 5.000010 sec, untilNow: 4 sec, delta: 1 sec + 1. `BlockTimeBuffer = 5 - 4 = 1` + 1. In other words, since the average(5.000010) is in range of epsilon, the node should maintain this block time to 5 diff --git a/isaac/how_to_check_a_ballot_is_valid.md b/tech_how_to_check_a_ballot_is_valid.md similarity index 68% rename from isaac/how_to_check_a_ballot_is_valid.md rename to tech_how_to_check_a_ballot_is_valid.md index 431e66b..0a5ef71 100644 --- a/isaac/how_to_check_a_ballot_is_valid.md +++ b/tech_how_to_check_a_ballot_is_valid.md @@ -1,6 +1,11 @@ +--- +layout: post +permalink: /how-to-check-a-ballot-is-valid/ +--- +--- # How to check a ballot is valid -A node must validate the ballot with transactions from proposer(Please refer to [How the consensus protocol works](how_the_consensus_protocol_works.md)). This is because only valid ballot must be agreed and confirmed. +A node must validate the ballot with transactions from proposer(Please refer to [How the consensus protocol works](./tech_how_the_consensus_protocol_works.md)). This is because only valid ballot must be agreed and confirmed. ## Ballot Structure diff --git a/isaac/how_to_select_the_proposer.md b/tech_how_to_select_the_proposer.md similarity index 91% rename from isaac/how_to_select_the_proposer.md rename to tech_how_to_select_the_proposer.md index d465b32..9d4f79d 100644 --- a/isaac/how_to_select_the_proposer.md +++ b/tech_how_to_select_the_proposer.md @@ -1,3 +1,8 @@ +--- +layout: post +permalink: /how-to-select-the-proposer/ +--- +--- # How to select the proposer The proposer is selected based on block height and round. diff --git a/isaac/how_to_sync_blocks_with_validators.md b/tech_how_to_sync_blocks_with_validators.md similarity index 97% rename from isaac/how_to_sync_blocks_with_validators.md rename to tech_how_to_sync_blocks_with_validators.md index 1724524..e43e16d 100644 --- a/isaac/how_to_sync_blocks_with_validators.md +++ b/tech_how_to_sync_blocks_with_validators.md @@ -1,3 +1,8 @@ +--- +layout: post +permalink: /how-to-sync-blocks-with-validators/ +--- +--- ## Node State 1. `BOOTING` - The node is on start but not ready to consensus or sync. diff --git a/isaac/how_transactions_are_shared.md b/tech_how_transactions_are_shared.md similarity index 86% rename from isaac/how_transactions_are_shared.md rename to tech_how_transactions_are_shared.md index 6d57dde..a0bf085 100644 --- a/isaac/how_transactions_are_shared.md +++ b/tech_how_transactions_are_shared.md @@ -1,3 +1,8 @@ +--- +layout: post +permalink: /how-transactions-are-shared/ +--- +--- # How transactions are shared All transactions must be shared among nodes in network. This is because all nodes must validate the transactions in the proposed ballot by itself and vote with the result. Also, because of efficiency, only hash of the transaction is included in the ballot. @@ -14,7 +19,7 @@ Transaction Protocol is used for sharing transactions. * If well-formed, it goes to the next step. * If malformed, it discards the transaction and stops this process. 1. If the same transaction is already in the transaction pool, it stops this process. -1. The node [validates](how_to_check_a_ballot_is_valid.md) the transaction. +1. The node [validates](./tech_how_to_check_a_ballot_is_valid.md) the transaction. * If valid, it is stored in transaction pool. * If invalid, it discards the transaction and stops this process. 1. The node broadcasts the transaction message to all nodes except for the sender.