Changes from PR comments
MODIFY
README.md
README.md
@@ -564,62 +564,4 @@ iex -S mix run --no-start
This repo contains `gh-pages` branch intended to host [Slate-based](#todo) API specification. Branch `gh-pages` is totally diseparated from other development branches and contains just Slate generated page's files.
-## Updating API Specification
-In `docs/api-specs` folder there are numbered markdown files which forms final spec. Whenever API has changed and specs needs to be updated it should be updated along with the feature and push to the development branch.
-
-## Preparation - if you need to generate specs yourself
-
-### Fetch the branch
-Specs page files are separated from the content of other development branches. It makes sens to just fetch only one branch to sepearated folder outside of this repo files.
-
-```
-# somewhere OUTSIDE of this repo root folder
-# clone just `gh-pages` branch
-> git clone git@github.com:omisego/elixir-omg.git --branch gh-pages --single-branch gh_pages
-> cd gh_pages
-> ls
-```
-You should see just website files: html, css ...
-
-### Getting the Slate generator
-Clone [Slate repo] to some other folder outside of this repo and just created gh-pages branch files.
-
-```
-> git clone git@github.com:lord/slate.git slate
-> cd slate
-> bundle install # you need ruby installed
-```
-
-You need to follow above instructions just once
-
-## Generating the specs site
-
-Make sure you've setup you environment first as [above](Getting the Slate generator)
-
-First concat all specs files in appropriate order into one file from which Slate generates the website.
-Navigate to the `slate` folder (see above)
-```
-> cat <this repo root>/docs/api_specs/*.md > ./source/index.html.md
-
-# Run the Slate to generate static website files
-> bundle exec middleman build --clean
-```
-Above will generate static website files in `slate/build` folder
-
-
-You can review generated site locally running `bundle exec middleman server` and openning `http://localhost:4567/` in you web browser.
-
-## Updating specs in gh-pages branch
-
-Assuming you generated website as [above](Generating the specs site)
-Navigate to your `gh_pages` folder
-```
-> copy -r <your slate folder>/build/* .
-
-> git add --all
-> git commit -m "specs: regenerate from <this repo current git-sha>"
-> git push
-```
-
-New version should be visible at `https://omisego.github.io/elixir-omg/#introduction`.
-Well done!
+See [gh-pages README](https://github.com/omisego/elixir-omg/blob/gh-pages/docs/api_specs/README.md) for more details.

MODIFY
docs/api_specs/includes/watcher_api_specs.md
docs/api_specs/includes/watcher_api_specs.md
@@ -212,7 +212,7 @@ curl -X POST http://localhost:4000/status
{
"event": "invalid_exit",
"details": {
- "eth_height" : 100,
+ "eth_height" : 615440,
"utxo_pos" : 10001001,
"owner" : "B3256026863EB6AE5B06FA396AB09069784EA8EA",
"currency" : "0000000000000000000000000000000000000000",
@@ -237,7 +237,7 @@ curl -X POST http://localhost:4000/status
{
"txhash": "230C450180808080...",
"txbytes": "F3170101C0940000...",
- "timestamp" : 1544193137,
+ "eth_height" : 615441,
"piggybacked_inputs" : [1],
"piggybacked_outputs" : [0, 1]
}
@@ -581,9 +581,9 @@ curl http://localhost:4000/inflight_exit.get_input_challenge_data -d '{"txbytes"
"version": "1",
"success": true,
"data": {
- "inflight_txbytes": "F847010180808080940000...",
+ "inflight_txbytes": "F3170101C0940000...",
"inflight_input_index": 1,
- "spending_txbytes": "F317010180808080940000...",
+ "spending_txbytes": "F847010180808080940000...",
"spending_input_index": 1,
"spending_sig": "9A23010180808080940000..."
}
@@ -626,10 +626,10 @@ curl http://localhost:4000/inflight_exit.get_output_challenge_data -d '{"txbytes
"version": "1",
"success": true,
"data": {
- "inflight_txbytes": "F847010180808080940000...",
+ "inflight_txbytes": "F3170101C0940000...",
"inflight_output_pos": 21000634002,
- "inflight_proof": "F847010180808080940000...",
- "spending_txbytes": "F317010180808080940000...",
+ "inflight_proof": "03F451067A805540000...",
+ "spending_txbytes": "F847010180808080940000...",
"spending_input_index": 1,
"spending_sig": "9A23010180808080940000..."
}

MODIFY
docs/inflight_exit_scenarios.md
docs/inflight_exit_scenarios.md
@@ -78,7 +78,59 @@ RootChain.startInFlightExit(
)
```
-#### 3. Piggyback his output
+#### 3. Check status again
+```json
+{
+ "version": "1",
+ "success": true,
+ "data": {
+ "last_validated_child_block_number": 10000,
+ "last_mined_child_block_timestamp": 1535031020,
+ "last_mined_child_block_number": 11000,
+ "eth_syncing": true,
+ "byzantine_events": [
+ {
+ "event": "block_withholding",
+ "details": {
+ "blockhash" : "DB32876CC6F...",
+ "blocknum" : 10000,
+ }
+ },
+ {
+ "event": "piggyback_available",
+ "details": {
+ "txbytes": "F3170101C0940000...",
+ "available_outputs" : [0, 1]
+ }
+ },
+ ],
+ "inflight_txs": [
+ {
+ "txhash": "230C450180808080...",
+ "txbytes": "F3170101C0940000...",
+ "input_addresses": [
+ "0x1234..."
+ ],
+ "output_addresses": [
+ "0x7890...",
+ "0x1234..."
+ ],
+ }
+ ],
+ "inflight_exits": [
+ {
+ "txhash": "230C450180808080...",
+ "txbytes": "F3170101C0940000...",
+ "eth_height" : 615441,
+ }
+ ]
+ }
+}
+ ```
+
+ Bob sees that his in-flight exit is in progress and he can now piggyback his ouput.
+
+#### 4. Piggyback his output
The second argument is `4` because he is piggybacking the first output.
```
RootChain.piggybackInFlightExit(
@@ -137,7 +189,7 @@ When Alice calls `watcher/status` she gets this response:
{
"txhash": "230C450180808080...",
"txbytes": "F3170101C0940000...",
- "timestamp" : 1544193137,
+ "eth_height" : 615441,
"piggybacked_outputs" : [0]
}
]
@@ -207,7 +259,7 @@ Request `watcher/status`:
{
"txhash": "230C450180808080...",
"txbytes": "F3170101C0940000...",
- "timestamp" : 1544193137,
+ "eth_height" : 615441,
"piggybacked_inputs" : [0],
"piggybacked_outputs" : [0, 1],
}
@@ -335,9 +387,9 @@ response:
"version": "1",
"success": true,
"data": {
- "inflight_txbytes": "F847010180808080940000...",
+ "inflight_txbytes": "F3170101C0940000...",
"inflight_input_index": 1,
- "spending_txbytes": "F317010180808080940000...",
+ "spending_txbytes": "F847010180808080940000...",
"spending_input_index": 1,
"spending_sig": "9A23010180808080940000..."
}
@@ -386,10 +438,10 @@ response:
"version": "1",
"success": true,
"data": {
- "inflight_txbytes": "F847010180808080940000...",
+ "inflight_txbytes": "F3170101C0940000...",
"inflight_output_pos": 21000634002,
- "inflight_proof": "F847010180808080940000...",
- "spending_txbytes": "F317010180808080940000...",
+ "inflight_proof": "03F451067A805540000...",
+ "spending_txbytes": "F847010180808080940000...",
"spending_input_index": 1,
"spending_sig": "9A23010180808080940000..."
}

Changes from PR comments