From 9644fb6a73997ac6a1c4ff66ddc7c5ba1c48afe3 Mon Sep 17 00:00:00 2001 From: Merope Riddle Date: Sat, 22 Oct 2016 18:35:48 +0000 Subject: [PATCH] Add apache 2.0 license header to all source files --- chain/src/lib.rs | 14 ++++++++++++++ chain/src/pipe.rs | 14 ++++++++++++++ chain/src/store.rs | 14 ++++++++++++++ chain/src/types.rs | 14 ++++++++++++++ chain/tests/mine_simple_chain.rs | 14 ++++++++++++++ core/src/core/mod.rs | 14 ++++++++++++++ core/src/core/ser.rs | 14 ++++++++++++++ core/src/genesis.rs | 14 ++++++++++++++ core/src/lib.rs | 14 ++++++++++++++ core/src/macros.rs | 14 ++++++++++++++ core/src/pow/cuckoo.rs | 14 ++++++++++++++ core/src/pow/mod.rs | 14 ++++++++++++++ core/src/pow/siphash.rs | 14 ++++++++++++++ core/src/ser.rs | 14 ++++++++++++++ grin/src/main.rs | 14 ++++++++++++++ store/src/lib.rs | 14 ++++++++++++++ 16 files changed, 224 insertions(+) diff --git a/chain/src/lib.rs b/chain/src/lib.rs index 1325037c5..c0c6b7090 100644 --- a/chain/src/lib.rs +++ b/chain/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2016 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! The block chain itself, validates and accepts new blocks, handles reorgs. #![deny(non_upper_case_globals)] diff --git a/chain/src/pipe.rs b/chain/src/pipe.rs index 9b92a1bb0..050fceaae 100644 --- a/chain/src/pipe.rs +++ b/chain/src/pipe.rs @@ -1,3 +1,17 @@ +// Copyright 2016 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Implementation of the chain block acceptance (or refusal) pipeline. use secp; diff --git a/chain/src/store.rs b/chain/src/store.rs index 08e69eeb2..4b5ef9cd6 100644 --- a/chain/src/store.rs +++ b/chain/src/store.rs @@ -1,3 +1,17 @@ +// Copyright 2016 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Implements storage primitives required by the chain use byteorder::{WriteBytesExt, BigEndian}; diff --git a/chain/src/types.rs b/chain/src/types.rs index 086dd2661..142af6f63 100644 --- a/chain/src/types.rs +++ b/chain/src/types.rs @@ -1,3 +1,17 @@ +// Copyright 2016 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Base types that the block chain pipeline requires. use core::core::{Hash, Block}; diff --git a/chain/tests/mine_simple_chain.rs b/chain/tests/mine_simple_chain.rs index 742ec6233..7fb1cdb3b 100644 --- a/chain/tests/mine_simple_chain.rs +++ b/chain/tests/mine_simple_chain.rs @@ -1,3 +1,17 @@ +// Copyright 2016 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + extern crate grin_core; extern crate grin_chain; extern crate rand; diff --git a/core/src/core/mod.rs b/core/src/core/mod.rs index 0a40350d7..fd828615e 100644 --- a/core/src/core/mod.rs +++ b/core/src/core/mod.rs @@ -1,3 +1,17 @@ +// Copyright 2016 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Core types #[allow(dead_code)] diff --git a/core/src/core/ser.rs b/core/src/core/ser.rs index 34d40ef95..aabe3cc62 100644 --- a/core/src/core/ser.rs +++ b/core/src/core/ser.rs @@ -1,3 +1,17 @@ +// Copyright 2016 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Binary stream serialization and deserialzation for core types from trusted //! Write or Read implementations. Issues like starvation or too big sends are //! expected to be handled upstream. diff --git a/core/src/genesis.rs b/core/src/genesis.rs index 9cbe8a47c..02a225dd2 100644 --- a/core/src/genesis.rs +++ b/core/src/genesis.rs @@ -1,3 +1,17 @@ +// Copyright 2016 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Definition of the genesis block. Placeholder for now. use time; diff --git a/core/src/lib.rs b/core/src/lib.rs index 805bc26ba..9d234104d 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2016 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Implementation of the MimbleWimble paper. //! https://download.wpsoftware.net/bitcoin/wizardry/mimblewimble.txt diff --git a/core/src/macros.rs b/core/src/macros.rs index 7c9988f5e..5a480dad5 100644 --- a/core/src/macros.rs +++ b/core/src/macros.rs @@ -1,3 +1,17 @@ +// Copyright 2016 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Generic macros used here and there to simplify and make code more //! readable. diff --git a/core/src/pow/cuckoo.rs b/core/src/pow/cuckoo.rs index 10888a82f..6d0a4615c 100644 --- a/core/src/pow/cuckoo.rs +++ b/core/src/pow/cuckoo.rs @@ -1,3 +1,17 @@ +// Copyright 2016 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Implementation of Cuckoo Cycle designed by John Tromp. Ported to Rust from //! the C and Java code at https://github.com/tromp/cuckoo. Note that only the //! simple miner is included, mostly for testing purposes. John Tromp's Tomato diff --git a/core/src/pow/mod.rs b/core/src/pow/mod.rs index d795d8661..7b41878c3 100644 --- a/core/src/pow/mod.rs +++ b/core/src/pow/mod.rs @@ -1,3 +1,17 @@ +// Copyright 2016 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! The proof of work needs to strike a balance between fast header //! verification to avoid DoS attacks and difficulty for block verifiers to //! build new blocks. In addition, mining new blocks should also be as diff --git a/core/src/pow/siphash.rs b/core/src/pow/siphash.rs index 8d1c148cd..d1339dda2 100644 --- a/core/src/pow/siphash.rs +++ b/core/src/pow/siphash.rs @@ -1,3 +1,17 @@ +// Copyright 2016 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Simple implementation of the siphash 2-4 hashing function from //! Jean-Philippe Aumasson and Daniel J. Bernstein. diff --git a/core/src/ser.rs b/core/src/ser.rs index 0851140b4..a0c9a607a 100644 --- a/core/src/ser.rs +++ b/core/src/ser.rs @@ -1,3 +1,17 @@ +// Copyright 2016 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Serialization and deserialization layer specialized for binary encoding. //! Ensures consistency and safety. Basically a minimal subset or //! rustc_serialize customized for our need. diff --git a/grin/src/main.rs b/grin/src/main.rs index a78f88a63..8e6a261aa 100644 --- a/grin/src/main.rs +++ b/grin/src/main.rs @@ -1,3 +1,17 @@ +// Copyright 2016 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Main crate putting together all the other crates that compose Grin into a //! binary. diff --git a/store/src/lib.rs b/store/src/lib.rs index 60a1b613c..d70cfe189 100644 --- a/store/src/lib.rs +++ b/store/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2016 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Storage of core types using RocksDB. #![deny(non_upper_case_globals)]