Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ostracon/main based on Tendermint v0.34.8 #194

Merged
merged 330 commits into from
Jul 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
330 commits
Select commit Hold shift + click to select a range
7d15429
Fix skipped `TestReactorWithTimeoutCommit` test
zemyblue Apr 17, 2020
6c968bb
Fix `TestByzantine`
zemyblue Apr 17, 2020
2099882
Modify to find proposer directly on `TestReactorRecordsVotesAndBlockP…
zemyblue Apr 17, 2020
f320883
fix: reactor test failure
Apr 17, 2020
1d2a4e6
set resource for the circleci machine
zemyblue Apr 14, 2020
93468af
fix: skipped tests
Apr 21, 2020
9cc30b0
fix: race bug
Apr 21, 2020
fd0c521
fix: apply comment
Apr 21, 2020
c804ea2
chore: remove blank line
Apr 21, 2020
fd5622b
fix: refine forceProposer
Apr 21, 2020
5e0258e
fix: remove hard code
Apr 21, 2020
00e37e4
fix: refactoring forceProposer
Apr 21, 2020
43a9444
fixed skipped testcase (but in the end, skipped them that were diffic…
torao Apr 24, 2020
aec9269
fixed all FIXME, pass all tests
torao Apr 24, 2020
f1247a9
Fix race detection error of `SelectProposer` (unit tests uncompleted)
zemyblue Apr 24, 2020
588af48
Fix `TestReactorHelperMode` error in the `blockchain/v2/reactor_test.go`
zemyblue Apr 21, 2020
a8097d7
fix lint warnings.
zemyblue Apr 21, 2020
9ccdfbe
Modify the file name of `CHANGELOG.md` to `CHANGELOG_OF_TENDERMINT.md`
zemyblue Apr 27, 2020
69e3123
changelog and version
zemyblue Apr 27, 2020
f849006
Disable checking the markdown links.
zemyblue Apr 27, 2020
36d8090
Fix swagger format error.
zemyblue Apr 9, 2020
871cf03
Fix dredd skip paths.
zemyblue Apr 9, 2020
118e2bd
Fix `/genesis` dredd test
zemyblue Apr 9, 2020
6e5711c
Fix dredd fail case.
zemyblue Apr 29, 2020
f2ccd90
Fix dredd test case(2)
zemyblue May 6, 2020
760809a
Add fixed dredd test to circleCI
zemyblue May 7, 2020
60826ad
Add changelog
zemyblue May 8, 2020
910b459
Remove unused RemoveProperty of unmarshal.go
zemyblue May 8, 2020
2e51b30
feat: election of ValidatorSet based on VRF #74
Apr 27, 2020
12db378
Apply changelog of Tendermint about v0.33.4
zemyblue May 20, 2020
73c2430
fix lint error
zemyblue May 20, 2020
a8c8e4a
fix p2p test of circleCI
zemyblue May 20, 2020
a5c2b81
fix unit test of `helpers_test`
zemyblue May 29, 2020
6e9df55
fix lint error
zemyblue May 29, 2020
ec5545f
Update protobuf implementations
zemyblue May 29, 2020
43c1f6c
Apply reviews
zemyblue Jun 1, 2020
cae2dcc
fix some bugs and apply formatting, for a merged branch zemyblue/appl…
torao May 7, 2021
1416323
fix: blockchain/v1/peer_test failure
Jun 10, 2020
7648ee2
fix: consensus timed out failure
Jun 10, 2020
689cc52
fix: diable proto-checking of circle-ci
Jun 3, 2020
42100f5
fix: raise resource class to pass test suits
Jun 10, 2020
3365d47
fix: restore test code
Jun 10, 2020
00f13ee
Revert "fix: restore test code"
Jun 10, 2020
8df3ba5
refactor: rename VotingPower to StakingPower
May 25, 2020
b9d917f
fix: separate StakingPower and VotingPower
May 25, 2020
4dac22b
feat: implement RandomSamplingWithoutReplacement
May 29, 2020
c02daac
fix: lint error
May 29, 2020
56699ae
feat: implement assigning voting power
Jun 2, 2020
c6c6052
fix: lint error
Jun 2, 2020
fd82ef0
fix: lint error
Jun 2, 2020
02310ac
fix: lite2 test failure
Jun 2, 2020
51c18eb
fix: proto generated file
Jun 2, 2020
001d43c
fix: diable proto-checking of circle-ci
Jun 3, 2020
7f5a35e
fix: apply comment; use VotingPower on adding vote
Jun 3, 2020
88806d4
fix: apply comment; remove totalStakingPower from VoterSet
Jun 3, 2020
339d9a3
fix: apply comment; fix NewVoterSet
Jun 3, 2020
5212f6e
fix: apply comment; rename validatorSet to voterSet and fix compile e…
Jun 3, 2020
ea2ad88
fix: apply comment; use VotingPower on consensus
Jun 3, 2020
fad82fe
fix: lint error
Jun 3, 2020
0d6d35c
fix: lint error
Jun 3, 2020
40081bd
fix: lite test compile error
Jun 3, 2020
48ea0dc
fix: remove unused function
Jun 3, 2020
0744c9d
fix: modify validator to voter in comments
Jun 4, 2020
a0fe5dc
fix: total voting power overflow
Jun 5, 2020
83adbfe
fix: update total voting power if 0
Jun 5, 2020
2d44b06
docs: change log
Jun 8, 2020
06b3c31
fix: apply comments
Jun 11, 2020
3fd3d72
fix: lint error
Jun 11, 2020
a5995de
fix: rewrite randomThreshold; remove priorityRateThreshold; some test…
Jun 11, 2020
f5b2c84
fix: lint error
Jun 11, 2020
509a158
test: add test for randomThreshold
Jun 12, 2020
7580403
test: add testing for verifying idempotence of randomThreshold
Jun 12, 2020
1cb885c
fix: lint error
Jun 12, 2020
4229960
fix: improve voting power polacy
Jun 15, 2020
82dff28
fix: compile error
Jun 15, 2020
1d8fc28
fix: lint error
Jun 15, 2020
e5114ef
fix: test case
Jun 15, 2020
bde1d21
test: add comment
Jun 15, 2020
9319839
fix: remove unused function
Jun 15, 2020
c54128d
fix: define MaxTotalVotingPower
Jun 16, 2020
9e067e8
fix: remove useless test case, and leave todo
Jun 16, 2020
9cd0cc6
fix some bugs and apply formatting, for a merged branch feature/votin…
torao May 10, 2021
791736f
Add `CalNumOfVoterToElect` function to calculate the number of voter …
zemyblue Jun 3, 2020
4ebf204
re-add removed libraries in the before commit.
zemyblue Jun 3, 2020
85833d9
Modify don't using floating-point to calculate `CalNumOfVoterToElect`.
zemyblue Jun 17, 2020
5a903bd
Add `CalNumOfVoterToElect` function to calculate the number of voter …
zemyblue Jun 3, 2020
183619f
re-add removed libraries in the before commit.
zemyblue Jun 3, 2020
9f5ceb0
feat: add voter params to genesis doc
Jun 17, 2020
9791bb3
feat: add voter params to state
Jun 18, 2020
d2dfbd4
fix: add go.sum
Jun 18, 2020
9e1cdc7
test: add TestCalVotersNum2
Jun 18, 2020
443d097
docs: change log
Jun 18, 2020
65b8bad
fix: test failure
Jun 18, 2020
9b6545f
test: add consensus test with voter election
Jun 18, 2020
00dc333
test: refine the test more precisely
Jun 18, 2020
2a41f42
fix: apply comments
Jun 18, 2020
0b286d3
fix: lint error, test failure
Jun 18, 2020
ddf95a9
fix: consensus logic, race error
Jun 19, 2020
515dada
fix: rename a parameter; modify limit value
Jun 19, 2020
ddaaadc
fix: add comment, refactoring test code
Jun 19, 2020
09da150
fix: rename AccuracyPrecision to ElectionPrecision
Jun 19, 2020
2e57b32
fix: apply comment; debugging log conflict
Jun 22, 2020
3814f58
fix some fails and apply formatting, for a merged branch feature/num_…
torao May 12, 2021
f05c39c
Update changelog of v0.33.4-0.2
zemyblue Jun 22, 2020
042125e
Change LINE Core version to 0.2
zemyblue Jun 22, 2020
db4c54d
fix golang lint warning
zemyblue Jun 22, 2020
7a1027f
introduce BLS12-381 signature key
torao Jun 2, 2020
442dd7d
introduce BLS12-381 signature key
torao Jun 2, 2020
16664a1
Fix the floating-point problem of sampling
zemyblue Jun 18, 2020
ee3ec27
fix integer overflow problem of `winPoint`.
zemyblue Jun 25, 2020
5e7661f
fix lint warning
zemyblue Jun 25, 2020
02f1a51
fix lint warning
zemyblue Jun 25, 2020
4e85593
add `GenerateVRFProof` function for `RetrySignerClient`
zemyblue Jun 25, 2020
26eeedf
fix lint warning.
zemyblue Jun 26, 2020
49afd86
Remove `CGO_ENABLED` in Makefile.
zemyblue Jun 26, 2020
692f7bf
fix contract_test error in circleCI
zemyblue Jun 26, 2020
3368ceb
fix contract_test error in circleCI
zemyblue Jun 29, 2020
4d57491
fix contract_test error in circleCI
zemyblue Jun 29, 2020
3793e46
types: return an error if voting power overflows in VerifyCommitTrus…
zemyblue Jun 29, 2020
c77258b
Add `VoterSet` protobuf and set to State message
zemyblue Jul 1, 2020
ea99cd4
Add `VoterParams` protobuf and set to State message
zemyblue Jul 1, 2020
9bac0ce
Fix type error
zemyblue Jul 1, 2020
72c8d9e
Apply the PR review feedback
zemyblue Jul 2, 2020
30109b2
feat: remove NextVoters from state
Jun 23, 2020
46d6305
fix: modify LoadVoters/SaveVoters logic
Jun 30, 2020
c933bf8
fix: disable skipping verification
Jun 30, 2020
b798546
test: add test case for load/save voters
Jun 30, 2020
d14dcef
test: apply voter sampling to lite verification
Jul 1, 2020
c0424f1
test: add TestVerifyAdjacentHeadersWithVoterSampling
Jul 1, 2020
2872aa8
fix: fmt errors
Jul 2, 2020
fa80950
fix: dredd error
Jul 2, 2020
12eba2f
fix: evidence test failure
Jul 2, 2020
4e21099
fix: lint error
Jul 2, 2020
dbd163e
fix: test failure
Jul 2, 2020
3e91ab2
fix: modify private function name
Jul 2, 2020
c5c19ec
fix: apply goimports
Jul 2, 2020
170d6e5
fix: apply comments
Jul 5, 2020
05e4185
fix: lint error
Jul 6, 2020
6fb32bb
fix: apply comment
Jul 7, 2020
ef90328
optimize imports
torao Jul 9, 2020
a7ef997
add voting power in `VotingInfo` of abci
zemyblue Jul 9, 2020
2c4810a
update changelog.
zemyblue Jul 9, 2020
444d519
modify from `VoterInfo.power` to `VoterInfo.voting_power` for disting…
zemyblue Jul 10, 2020
0d7a4a0
test: add test case; non-voter votes
Jul 10, 2020
d64e742
test: verifying voter sampling under validator set changed
Jul 13, 2020
d7f7ae0
fix: add comments
Jul 14, 2020
dc831af
test: add test case load/save voters
Jul 16, 2020
f908310
fix: lint error
Jul 16, 2020
7c16752
fix: race problem
Jul 16, 2020
3b4f1a8
fix: test failure
Jul 16, 2020
44de8d6
fix: minus voting power
Jul 17, 2020
e76accb
fix: lint error
Jul 17, 2020
320003e
fix: remove useless test code
Jul 17, 2020
37f7cc0
fix: apply comment; add test case of max total staking
Jul 19, 2020
63b62fc
add comment
Jul 19, 2020
74479df
fix: test failure
Jul 20, 2020
b888706
fix: use voting power in MedianTime
Jul 21, 2020
c93f65b
Update changelogs and the version about 0.33.5-0.3
zemyblue Jul 28, 2020
1807947
introduced a composite-key that delegates processing to each key-func…
torao May 28, 2021
9e64c26
fix the points made in the review
torao Aug 13, 2020
d971373
add public-key type in sending ValidatorUpdate Tx
shiki-tak Aug 12, 2020
4f7e8f8
Ready for demo (#106)
zemyblue Aug 28, 2020
e088636
fix: set consensus_voter_power to 0 if not elected as voter
Sep 11, 2020
6a487f4
fix: citest failure
Sep 14, 2020
d80b581
fix: nil pointer reference
Sep 15, 2020
920ac30
fix: set voter power metric with label
Sep 15, 2020
c9256e7
fix: check nil
Sep 15, 2020
756d227
fix: race
Sep 16, 2020
95d6191
feat: add an option for selecting priv key type
Oct 6, 2020
6025a47
fix: test cases
Oct 6, 2020
37d7266
fix: golang ci error
Oct 6, 2020
b8c4e08
fix: apply priv-key-type option to testnet command
Oct 7, 2020
51bd4bc
fix: bls compile problem
Oct 7, 2020
ebbc0e1
fix: contract-tests failure
Oct 7, 2020
1b5f442
fix: modify change log pending
Oct 7, 2020
a077714
fix: typo
Oct 12, 2020
f2bdc4b
feat: Make voting satisfy finality
Sep 15, 2020
a657a53
fix: Make voter sorting working well
Sep 22, 2020
59ef1db
Move sampling logic to types package
Sep 29, 2020
31f6774
Change the voter that don't use winpoint to validator
Oct 5, 2020
425c063
Change condition to sort voters
Oct 6, 2020
59493c9
fix: Fix error during test run
Oct 8, 2020
d296535
feat: log execution time
Sep 18, 2020
0996af6
feat: add consensus duration metric
Sep 18, 2020
7e4e7b4
fix: end time overwrite bug
Sep 21, 2020
a652ca8
feat: modify metric type to histogram
Sep 22, 2020
8d7e963
fix: duration max float
Sep 22, 2020
25a113f
feat: add proposal creating metric and missing proposal metric
Sep 23, 2020
e0a0f89
fix: time duration error
Sep 28, 2020
b40a337
fix: change log
Oct 8, 2020
fe19856
fix: fmt error
Oct 8, 2020
7a0d18d
fix: rename a configure
Oct 12, 2020
e9f26e3
test: Write a test case to verify a new voter sampling
Oct 21, 2020
b4c1739
test: Write a test case to verify a new voter sampling
Oct 21, 2020
fb04995
Change a condition when determining if is voters byzantine
Oct 23, 2020
8641f86
test: Use a seed to generate random value in test
Oct 26, 2020
6483e52
fix: overflow, integer division truncated, more test cases
Oct 27, 2020
1c2d271
fix: fmt error
Oct 27, 2020
3bbd76c
feat: add test sample, verifying sort order
Oct 27, 2020
e688f78
fix: priv test failure
Oct 28, 2020
64568a1
fix: apply comment; log seed for random
Oct 29, 2020
d884014
feat: async reactor receiving
Oct 29, 2020
a4cc5c5
fix: add VotingPower to abci.Evidence
egonspace Nov 19, 2020
d1f3420
ci: remove `add-path` (#5674)
tac0turtle Nov 17, 2020
324dcfa
fix: github action failure
Nov 18, 2020
d0fbe9d
fix: github action failure
Nov 18, 2020
331932a
fix: skip test cases that require skipping mode in verification, and …
torao Jun 4, 2021
8c075cb
fix: calculate MaxDataBytes accurately by pv key type
Nov 11, 2020
e1363de
fix: lint error
Nov 11, 2020
1a19339
fix: apply review comments
Nov 13, 2020
e14bb50
fix: merge conflict
Nov 13, 2020
098e4c1
fix: golangci error
Nov 13, 2020
96ebdf8
fix: golangci error
Nov 13, 2020
17b8962
fix: golangci error
Nov 13, 2020
8214412
change Evidence size calculation to be based on Signature size, and r…
torao Jun 15, 2021
2ccec3f
added signature aggregation and verify to block
torao Sep 3, 2020
65f9dd1
fixed to restore aggregate signature when restoring Commit to VoteSet
torao Sep 3, 2020
02d5a01
fixed a trivial typo
torao Dec 3, 2020
4ff29d7
fix: rollback needless modification
egonspace Dec 2, 2020
3de5560
fix: Changed to ubuntu20.04 due to end of support for ubuntu19.0
Kynea0b Dec 15, 2020
8323058
fix: typo about variable names that select the type of private key
Kynea0b Dec 15, 2020
036eeb6
codecov: Restore a codecov job in circleci
Oct 14, 2020
6313c90
codecov: Add a codecov token in config
Oct 14, 2020
e4cfb1d
codecov: Report all of modules to codecov
Oct 29, 2020
a4116a0
codecov: Allow a undercoverd source can pass CI
Oct 29, 2020
8202c60
test: don't use foo-bar.net in TestHTTPClientMakeHTTPDialer (#5997)
erikgrinaker Jan 27, 2021
4f7bdd4
ci: increase the test_cover timeout
Feb 2, 2021
7d2b212
apply 0.33.8
torao Feb 16, 2021
33f8fb1
change golang version to 1.15
torao Feb 16, 2021
54230d6
fix: A bug fix
Kynea0b Feb 17, 2021
e939e99
feat: add an option for selecting priv key type to `unsafe_reset_all`…
Kynea0b Feb 17, 2021
ccea40c
fix: use the proposer address selected by VRF when creating new propo…
torao Feb 22, 2021
47f6d18
revert: it's correct to create the Proposal Block iff privValidator i…
torao Feb 24, 2021
b93e934
Merge pull request #190 from line/fix/set_proposer_selected_in_vrf_to…
torao Feb 24, 2021
1c6c5ba
test: add tests for each validator type (#189)
Kynea0b Mar 1, 2021
13eb22c
use fmt.Sprint for string to int conversion
melekes Nov 10, 2020
a5f74e0
bump version and update changelog
melekes Nov 10, 2020
7eb0276
privval: increase read/write timeout to 5s and calculate ping interva…
melekes Nov 10, 2020
e44a326
consensus: only call privValidator.GetPubKey once per block (#5143)
melekes Jul 30, 2020
344c939
only retrieve pubkey once for all validators (partially fixes #4865) …
May 29, 2020
45258d4
fix: replace privValidatorPubKey on the same time of privValidator to…
torao Feb 24, 2021
328e9d6
remove redundant section mistakenly added in the merge
torao Feb 25, 2021
f0b8c8e
remove redundant empty line
torao Feb 26, 2021
87f73f2
fix: Address to the problem that the signature of bls voter cannot be…
Kynea0b Mar 31, 2021
01b4d22
feat: Modify MakeCommit and AggregateSignature to one operation at on…
Kynea0b Apr 6, 2021
5a1db6b
chore: remove hard coded codecov token (#220)
Apr 19, 2021
647994a
fix: Specified RecvBufSize for pex_reactor_test (91e1df7)
tnasu Jun 24, 2021
e1def12
remove Skip() of test cases that are currently successful
torao Jun 25, 2021
63a0f7c
add a TODO comment after investigating the fail of TestWALCrash since…
torao Jun 25, 2021
5df4ea7
merge diffs of branch main to resolve conflicts with it
torao Jun 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Test Coverage
on:
pull_request:
push:
branches:
- master
- release/**

jobs:
split-test-files:
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/linkchecker.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Check Markdown links
on:
schedule:
- cron: '* */24 * * *'
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.7
with:
folder-path: "docs"
#name: Check Markdown links
#on:
# schedule:
# - cron: '* */24 * * *'
#jobs:
# markdown-link-check:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - uses: gaurav-nelson/github-action-markdown-link-check@1.0.7
# with:
# folder-path: "docs"
2 changes: 0 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ name: Lint
on:
pull_request:
push:
branches:
- master
jobs:
golangci:
name: golangci-lint
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
name: Lint
on:
push:
branches:
- master
paths:
- "**.md"
- "**.yml"
- "**.yaml"
pull_request:
branches: [master]
paths:
- "**.md"

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/proto-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
paths:
- "tools/proto/*"
push:
branches:
- master
paths:
- "tools/proto/*"
schedule:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
- uses: actions/checkout@master
- name: lint
run: make proto-lint
proto-breakage:
runs-on: ubuntu-latest
timeout-minutes: 4
steps:
- uses: actions/checkout@master
- name: check-breakage
run: make proto-check-breaking-ci
# proto-breakage:
# runs-on: ubuntu-latest
# timeout-minutes: 4
# steps:
# - uses: actions/checkout@master
# - name: check-breakage
# run: make proto-check-breaking-ci
27 changes: 3 additions & 24 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,7 @@ jobs:
**/**.go
go.mod
go.sum
- uses: actions/cache@v2.1.4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
if: env.GIT_DIFF
- uses: actions/cache@v2.1.4
- uses: actions/cache@v1
with:
path: ~/go/bin
key: ${{ runner.os }}-${{ github.sha }}-tm-binary
Expand All @@ -97,14 +90,7 @@ jobs:
**/**.go
go.mod
go.sum
- uses: actions/cache@v2.1.4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
if: env.GIT_DIFF
- uses: actions/cache@v2.1.4
- uses: actions/cache@v1
with:
path: ~/go/bin
key: ${{ runner.os }}-${{ github.sha }}-tm-binary
Expand All @@ -128,14 +114,7 @@ jobs:
**/**.go
go.mod
go.sum
- uses: actions/cache@v2.1.4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
if: env.GIT_DIFF
- uses: actions/cache@v2.1.4
- uses: actions/cache@v1
with:
path: ~/go/bin
key: ${{ runner.os }}-${{ github.sha }}-tm-binary
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,5 @@ test/fuzz/**/corpus
test/fuzz/**/crashers
test/fuzz/**/suppressions
test/fuzz/**/*.zip
crypto/vrf/internal/vrf/lib
crypto/vrf/internal/vrf/include
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "crypto/vrf/internal/vrf/libsodium"]
path = crypto/vrf/internal/vrf/libsodium
url = https://github.com/algorand/libsodium.git
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# Changelog

## v1.0.0

*Jun 29, 2021*

* Changed from the consensus way which the entire validator agrees to a part of the validators is elected as a voter to
consensus. The selected validator is called `voter`
* The voter to be elected has been changed so that it can be determined in the n-1 block from the one determined by
the n-2 block.
* A BLS signature library was added. The ability to use the BLS signature library will be added in the next version.
* When distributing rewards in Cosmos-SDK, some ABCIs have been modified to distribute the voting power of elected
voters.

### BREAKING CHANGES
- State
- [state] [\#92](https://github.com/line/tendermint/pull/92) Add `VoterParams` to Genesis state
- [state] [\#100](https://github.com/line/tendermint/pull/100) Remove `NextVoters` from state
- Go API
- [types] [\#83](https://github.com/line/tendermint/pull/83) Add `StakingPower` to `Validator`
- [consensus] [\#83](https://github.com/line/tendermint/pull/83) Change calculation of `VotingPower`
- Blockchain Protocol
- [state] [\#7](https://github.com/line/tendermint/issues/7) Add round, proof in block
- P2P Protocol
- [abci] [\#100](https://github.com/line/tendermint/pull/100) Add `voters_hash` field, which is needed for verification of a block header
- [abci] [\#102](https://github.com/line/tendermint/pull/102) Add voting power in `VoterInfo` of abci

### FEATURES
- [types] [\#40](https://github.com/line/tendermint/issues/40) Add vrf interface and add a function generating vrf proof to PrivValidator
- [lib/rand] [\#43](https://github.com/line/tendermint/issues/43) Implementation of selection algorithms using categorical distributions
- [state] [\#44](https://github.com/line/tendermint/issues/44) Add genesis seed for electing proposer of first block
- [types] [\#48](https://github.com/line/tendermint/issues/48) Replace Tendermint's PoS to VRF-based Random Sampling
- [rpc] [\#78](https://github.com/line/tendermint/pull/78) Add `Voters` rpc
- [consensus] [\#83](https://github.com/line/tendermint/pull/83) Selection voters using random sampling without replacement
- [consensus] [\#92](https://github.com/line/tendermint/pull/92) Apply calculation of voter count
- [BLS] [\#81](https://github.com/line/tendermint/issues/81) Modify to generate at the same time as Ed25519 key generation
- [lite] [\#100](https://github.com/line/tendermint/pull/100) Lite calls `Genesis()` rpc when it starts up

### BUG FIXES
- [circleCI] [\#76](https://github.com/line/tendermint/pull/76) Fix contract test job of circleCI

## v0.0.0

*Mar 15, 2021*
Expand Down
2 changes: 1 addition & 1 deletion DOCKER/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ENV TMHOME /tendermint
# could execute bash commands.
RUN apk update && \
apk upgrade && \
apk --no-cache add curl jq bash && \
apk --no-cache add git make gcc libc-dev build-base curl jq bash && \
addgroup ostracon && \
adduser -S -G ostracon ostracon -h "$TMHOME"

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2021 LINE TECH PLUS Pte., Ltd.
Copyright 2021 LINE Plus Corporation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
74 changes: 64 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
PACKAGES=$(shell go list ./...)
SRCPATH=$(shell pwd)
OUTPUT?=build/tendermint

BUILD_TAGS?=tendermint
INCLUDE = -I=${GOPATH}/src/github.com/tendermint/tendermint -I=${GOPATH}/src -I=${GOPATH}/src/github.com/gogo/protobuf/protobuf
BUILD_TAGS?='tendermint'
VERSION := $(shell git describe --always)
CGO_OPTPTION=0
LIBSODIUM_TARGET=
PREPARE_LIBSODIUM_TARGET=
ifeq ($(LIBSODIUM), 1)
BUILD_TAGS='libsodium tendermint'
LIBSODIUM_TARGET=libsodium
ifneq ($(OS), Windows_NT)
ifeq ($(shell uname -s), Linux)
PREPARE_LIBSODIUM_TARGET=prepare-libsodium-linux
endif
endif
endif
LIBSODIM_BUILD_TAGS='libsodium tendermint'
LD_FLAGS = -X github.com/tendermint/tendermint/version.TMCoreSemVer=$(VERSION)
BUILD_FLAGS = -mod=readonly -ldflags "$(LD_FLAGS)"
HTTPS_GIT := https://github.com/line/ostracon.git
Expand All @@ -17,13 +32,11 @@ endif

# handle race
ifeq (race,$(findstring race,$(TENDERMINT_BUILD_OPTIONS)))
CGO_ENABLED=1
BUILD_FLAGS += -race
endif

# handle cleveldb
ifeq (cleveldb,$(findstring cleveldb,$(TENDERMINT_BUILD_OPTIONS)))
CGO_ENABLED=1
BUILD_TAGS += cleveldb
endif

Expand Down Expand Up @@ -55,14 +68,22 @@ include tests.mk
### Build Ostracon ###
###############################################################################

build:
CGO_ENABLED=$(CGO_ENABLED) go build $(BUILD_FLAGS) -tags '$(BUILD_TAGS)' -o $(OUTPUT) ./cmd/tendermint/
build: $(LIBSODIUM_TARGET)
CGO_ENABLED=1 go build $(BUILD_FLAGS) -tags "$(BUILD_TAGS)" -o $(OUTPUT) ./cmd/tendermint/
.PHONY: build

install:
CGO_ENABLED=$(CGO_ENABLED) go install $(BUILD_FLAGS) -tags $(BUILD_TAGS) ./cmd/tendermint
CGO_ENABLED=1 go install $(BUILD_FLAGS) -tags "$(BUILD_TAGS)" ./cmd/tendermint
.PHONY: install

###############################################################################
### Mockery ###
###############################################################################

mock-gen:
go generate ./...
.PHONY: mock

###############################################################################
### Protobuf ###
###############################################################################
Expand All @@ -73,7 +94,7 @@ proto-all: proto-gen proto-lint proto-check-breaking
proto-gen:
@docker pull -q tendermintdev/docker-build-proto
@echo "Generating Protobuf files"
@docker run -v $(shell pwd):/workspace --workdir /workspace tendermintdev/docker-build-proto sh ./scripts/protocgen.sh
@docker run --rm -v $(shell pwd):/workspace --workdir /workspace tendermintdev/docker-build-proto sh ./scripts/protocgen.sh
.PHONY: proto-gen

proto-lint:
Expand All @@ -82,7 +103,7 @@ proto-lint:

proto-format:
@echo "Formatting Protobuf files"
docker run -v $(shell pwd):/workspace --workdir /workspace tendermintdev/docker-build-proto find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \;
docker run --rm -v $(shell pwd):/workspace --workdir /workspace tendermintdev/docker-build-proto find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \;
.PHONY: proto-format

proto-check-breaking:
Expand All @@ -109,6 +130,22 @@ install_abci:
### Distribution ###
###############################################################################

########################################
### libsodium

prepare-libsodium-linux:
apt-get update && apt-get -y install libtool libboost-all-dev autoconf build-essential

libsodium:
cd $(SRCPATH)/crypto/vrf/internal/vrf/libsodium && \
./autogen.sh && \
./configure --disable-shared --prefix="$(SRCPATH)/crypto/vrf/internal/vrf/" && \
$(MAKE) && \
$(MAKE) install

########################################
### Distribution

# dist builds binaries for all platforms and packages them for distribution
# TODO add abci to these scripts
dist:
Expand Down Expand Up @@ -210,9 +247,26 @@ build-docker: build-linux
### Local testnet using docker ###
###############################################################################

DOCKER_HOME = /go/src/github.com/tendermint/tendermint
DOCKER_CMD = docker run --rm \
-v `pwd`:$(DOCKER_HOME) \
-w $(DOCKER_HOME)
DOCKER_IMG = golang:1.15-alpine
BUILD_CMD = apk add --update --no-cache git make gcc libc-dev build-base curl jq file gmp-dev clang \
&& cd $(DOCKER_HOME) \
&& make build

# Login docker-container for confirmation building linux binary
build-shell:
$(DOCKER_CMD) -it --entrypoint '' ${DOCKER_IMG} /bin/sh
.PHONY: build-shell

# Build linux binary on other platforms

build-linux:
GOOS=linux GOARCH=amd64 $(MAKE) build
# Build Linux binary
$(DOCKER_CMD) ${DOCKER_IMG} /bin/sh -c "$(BUILD_CMD)"

.PHONY: build-linux

build-docker-localnode:
Expand Down Expand Up @@ -252,6 +306,6 @@ endif
# prerequisits: build-contract-tests-hooks build-linux
# the two build commands were not added to let this command run from generic containers or machines.
# The binaries should be built beforehand
contract-tests:
contract-tests: build-docker-localnode
dredd
.PHONY: contract-tests
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Copyright 2016 All in Bits, Inc
Copyright 2021 LINE TECH PLUS Pte., Ltd.
Copyright 2021 LINE Plus Corporation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
11 changes: 9 additions & 2 deletions abci/example/kvstore/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@ package kvstore

import (
"github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/composite"
tmrand "github.com/tendermint/tendermint/libs/rand"
)

// Generates a default private key for use in an example or test.
func GenDefaultPrivKey() crypto.PrivKey {
return composite.GenPrivKey()
}

// RandVal creates one random validator, with a key derived
// from the input value
func RandVal(i int) types.ValidatorUpdate {
pubkey := tmrand.Bytes(32)
pk := GenDefaultPrivKey().PubKey()
power := tmrand.Uint16() + 1
v := types.UpdateValidator(pubkey, int64(power), "")
v := types.NewValidatorUpdate(pk, int64(power))
return v
}

Expand Down
Loading