Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Conversation

@rphmeier
Copy link
Contributor

cargo run -p adder-collator -- --bootnodes '...' to connect to a validator or two, then if the parachain is registered (assumes ID 100), it'll begin to collate.

@rphmeier rphmeier added the A0-please_review Pull request needs code review. label Jul 27, 2018

for i in adder
do
cd $i/wasm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces

Cargo.toml Outdated

"polkadot/test-parachains/adder",
"polkadot/test-parachains/adder/collator",
"polkadot/test-parachains/adder/wasm",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this in members but other wasm projects in exclude?

// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

//! Defines WASM module logic.
//! WASM validation for basic-add parachain.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's adder now

E: IntoFuture<Item=(),Error=()>,
E::Future: Send + Clone + 'static,
I: IntoIterator<Item=T>,
T: Into<std::ffi::OsString> + Clone,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What makes it to be called T? : )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

following convention of the rest of the files using args. I wasn't trying to write PEE IT...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sure : ) Just wonder if we can do something, since one letter type names go unweildy if there are more than about 3 or more of them

/// State to begin from.
pub state: u64,
/// Amount to add (overflowing)
pub add: u64,
Copy link
Contributor

@pepyakin pepyakin Jul 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it overflowing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to specify!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean what makes it overflowing? Like, we don't do anything like summing with it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, did you mean that it is %-ed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is meant to be an overflowing add

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah now it makes sense

return Err(StateMismatch);
}

let new_state = block_data.state.saturating_add(block_data.add);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isn't it wrapping? : )

};

let next_body = AdderBody {
state: last_body.state + last_body.add,
Copy link
Contributor

@pepyakin pepyakin Jul 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this isn't saturating (like in adder::execute)?

::tiny_keccak::keccak256(state.encode().as_slice())
}

/// Start state
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, did you mean to write something different? : )

@gavofyork gavofyork added A8-looksgood and removed A0-please_review Pull request needs code review. A8-looksgood labels Jul 29, 2018
@rphmeier rphmeier force-pushed the rh-simple-parachain branch from 3baa94a to b393ae9 Compare July 31, 2018 13:26
@rphmeier rphmeier merged commit 64813f6 into master Aug 1, 2018
@rphmeier rphmeier deleted the rh-simple-parachain branch August 1, 2018 15:04
@rphmeier rphmeier restored the rh-simple-parachain branch August 1, 2018 15:04
@rphmeier rphmeier deleted the rh-simple-parachain branch August 1, 2018 15:04
@rphmeier rphmeier restored the rh-simple-parachain branch August 1, 2018 15:04
dvdplm added a commit that referenced this pull request Aug 1, 2018
* master:
  Collator for the "adder" (formerly basic-add) parachain and various small fixes (#438)
  Storage changes subscription (#464)
  Wasm execution optimizations (#466)
  Fix the --key generation (#475)
  Fix typo in service.rs (#472)
  Fix session phase in early-exit (#453)
  Make ping unidirectional (#458)
  Update README.adoc
liuchengxu added a commit to chainx-org/substrate that referenced this pull request Aug 23, 2021
* Add runtime version in release note

* Extract spec version using script

* .

* .

* .

* .

* Rename to dump_spec_version.py

* .
liuchengxu added a commit to autonomys/substrate that referenced this pull request Jun 3, 2022
…ry-genesis-block

Skip processing the genesis primary block on executor
helin6 pushed a commit to boolnetwork/substrate that referenced this pull request Jul 25, 2023
…ritytech#438)

* apply std feature to runtime to avoid static assertion error

* std is a default feature anyway
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants