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

Ban peer doesn't save to storage fix #1093

Merged
merged 1 commit into from
Jul 26, 2019
Merged

Ban peer doesn't save to storage fix #1093

merged 1 commit into from
Jul 26, 2019

Conversation

lexfrl
Copy link
Contributor

@lexfrl lexfrl commented Jul 24, 2019

fix #1042

@lexfrl lexfrl requested a review from ilblackdragon as a code owner July 24, 2019 15:32
@ilblackdragon
Copy link
Member

Going to submit disabling test_kickout for now.

@ilblackdragon ilblackdragon changed the base branch from master to staging July 25, 2019 20:02
@ilblackdragon ilblackdragon changed the base branch from staging to master July 25, 2019 20:04
@ilblackdragon ilblackdragon merged commit 309e151 into near:master Jul 26, 2019
ilblackdragon added a commit that referenced this pull request Jul 30, 2019
* bump version to 0.2.6 (#1091)

* Fix stake double return bug (#1084)

* fix stake double return bug and update tests

* use cache properly

* properly implement stake returning

* refactor test utils

* fix gensis config

* Fix block producer assignment (#1088)

* fix block producer assignment

* trying with test lock

* tweak test parameters

* bump version to 0.2.6

* Update docker to have git version and use cache (#1092)

* neartest.com has been retired (#1098)

* Change how docker port mapping works for macos (#1086)

* Apply Peter's fix to docker image start up code

* fix port mapping in nodelib

* fix #1042: Ban peer doesn't save to storage (#1093)

* Add registers to Wasm bindings

* Remove some unreachables (#1108)

* Revert back to cranelift backend for now (#1109)

Singlepass backend is crashing

* Fix stake test (#1095)

* Fix stake test

* Check expected validators.

* Specify expected validator order.

* No need to move anymore.
ilblackdragon added a commit that referenced this pull request Jul 31, 2019
* Adding gas usage and limit to the header to track relevant information for rewards.

* Remove usage of ..Default::default in proto conversions, which is hiding issues

* Account deletion (#1107)

* Account deletion implementation

* Stakers can't be deleted, but must have more rent on their account (4 * epoch_length). Also added check_rent method to call after transaction execution to make sure there is still enough rent on the account

* Actually delete data when deleting an account and test that

* Add support for default values in runtime config (expected that we will put reasonable defaults in the binary), and fixed test_deserialize test / testnet.json

* Moved helper functions for transactions into test-utils User trait

* Reuse check_stake function from runtime and system

* Address comments

* Step 1. Add validator proposals are called from process_block. Additional issue that verify_chunk_sginatures calling and that it may result in error are fixed.

* Merge master into staging (#1116)

* bump version to 0.2.6 (#1091)

* Fix stake double return bug (#1084)

* fix stake double return bug and update tests

* use cache properly

* properly implement stake returning

* refactor test utils

* fix gensis config

* Fix block producer assignment (#1088)

* fix block producer assignment

* trying with test lock

* tweak test parameters

* bump version to 0.2.6

* Update docker to have git version and use cache (#1092)

* neartest.com has been retired (#1098)

* Change how docker port mapping works for macos (#1086)

* Apply Peter's fix to docker image start up code

* fix port mapping in nodelib

* fix #1042: Ban peer doesn't save to storage (#1093)

* Add registers to Wasm bindings

* Remove some unreachables (#1108)

* Revert back to cranelift backend for now (#1109)

Singlepass backend is crashing

* Fix stake test (#1095)

* Fix stake test

* Check expected validators.

* Specify expected validator order.

* No need to move anymore.

* Step 2. Move post_state_root into ChunkExtra with gas_used and validator_proposals. Removed post state root from ShardMsg

* Step 3. Gas limit/usage & validator proposals propagate

* Cleaned up tests in validator manager. First steps to make sure routing tables are populated.

* Fix chain tests

* Change 100ms to 250ms block production for chunk_manager tests
evgenykuzyakov added a commit that referenced this pull request Aug 7, 2019
commit a08667e
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Wed Aug 7 15:23:55 2019 -0700

    Move static functions into separate file from Runtime lib

commit d662904
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Wed Aug 7 11:25:41 2019 -0700

    Less hash cloning

commit 748da51
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Tue Aug 6 16:18:32 2019 -0700

    Fix benches

commit 6ad8711
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Tue Aug 6 15:50:40 2019 -0700

    Basic clippy cleanup

commit 4cbd392
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Tue Aug 6 15:43:09 2019 -0700

    Cleanup Callbacks

commit bc71e5e
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Tue Aug 6 15:36:13 2019 -0700

    Fixed remaining tests

commit 4701143
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Tue Aug 6 14:27:24 2019 -0700

    WIP. Fixed a few tests, but a few still fail

commit bb6c090
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Tue Aug 6 12:21:29 2019 -0700

    WIP. All tests compile, but a few still fail

commit e5279c8
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Tue Aug 6 11:36:04 2019 -0700

    WIP. Standard test pass

commit 20f0dae
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Mon Aug 5 17:06:04 2019 -0700

    WIP. One test passed

commit d41ec9b
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Mon Aug 5 16:35:07 2019 -0700

    WIP. Compiles

commit 28485a5
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Mon Aug 5 13:50:24 2019 -0700

    WIP. Generating TransactionResult and map new receipts

commit 4408eac
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Fri Aug 2 16:25:18 2019 -0700

    WIP. Fixed some tests. Added user actions. Externals for promises

commit 807522b
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Thu Aug 1 16:45:11 2019 -0700

    WIP. Runtime most actions

commit e5043f8
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Thu Aug 1 14:54:21 2019 -0700

    WIP. Runtime some actions and validations

commit 1f9dc1c
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Wed Jul 31 17:26:14 2019 -0700

    WIP. Runtime data into actions

commit 5907fe5
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Wed Jul 31 15:11:17 2019 -0700

    WIP. Config and runtime work

commit e2395df
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Wed Jul 31 10:48:16 2019 -0700

    WIP. Final rebase changes

commit 6f46173
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Tue Jul 30 17:33:59 2019 -0700

    WIP. Rename ReceiptTransaction to Receipt

commit ab5babe
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Tue Jul 30 16:43:20 2019 -0700

    WIP. Serialization seems to work

commit 3b03864
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Tue Jul 30 15:18:46 2019 -0700

    WIP. Fix proto tryfrom bugs

commit 51151fc
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Tue Jul 30 13:10:13 2019 -0700

    WIP. Receipt protos

commit cb8e6ee
Author: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
Date:   Tue Jul 30 11:26:27 2019 -0700

    WIP. Transaction protos

commit 8db0e1a
Author: Illia Polosukhin <ilblackdragon@gmail.com>
Date:   Wed Aug 7 13:14:34 2019 -0700

    Bump version to 0.2.7

commit 4790d27
Author: Illia Polosukhin <ilblackdragon@gmail.com>
Date:   Wed Aug 7 11:40:22 2019 -0700

    Remove merge conflict issue from store/lib.rs

commit d10caa4
Merge: 54b4a36 8a9cb90
Author: Illia Polosukhin <ilblackdragon@gmail.com>
Date:   Wed Aug 7 11:39:06 2019 -0700

    Merge remote-tracking branch 'origin/master' into staging

commit 8a9cb90
Author: Vlad Frolov <frolvlad@gmail.com>
Date:   Mon Aug 5 01:35:25 2019 +0300

    Fixed a minor Python 3.x compatibility issue in the deployment scripts (#1132)

commit 56e792e
Author: Illia Polosukhin <ilblackdragon@gmail.com>
Date:   Thu Aug 1 17:28:29 2019 -0700

    Fix issue with running localnet second time (#1128)

    * Fix issue with running localnet second time. Better error messages and KeyboardInterrupt handling

    * Few fixes

commit d00e49d
Author: mikhailOK <mikhail@nearprotocol.com>
Date:   Tue Jul 30 14:31:15 2019 -0700

    Reenable singlepass backend (#1120)

    Update wasmer to 0.5.7, enable singlepass, add regression test

commit af9c545
Author: Marcelo Fornet <mfornet94@gmail.com>
Date:   Mon Jul 29 08:38:09 2019 -0700

    Fix stake test (#1095)

    * Fix stake test

    * Check expected validators.

    * Specify expected validator order.

    * No need to move anymore.

commit 2e88823
Author: mikhailOK <mikhail@nearprotocol.com>
Date:   Fri Jul 26 16:33:48 2019 -0700

    Revert back to cranelift backend for now (#1109)

    Singlepass backend is crashing

commit afe8786
Author: Bowen Wang <bowenwang1996@users.noreply.github.com>
Date:   Fri Jul 26 16:26:05 2019 -0700

    Remove some unreachables (#1108)

commit 60edd7b
Author: Maksym Zavershynskyi <max@near.ai>
Date:   Fri Jul 26 15:52:16 2019 -0700

    Add registers to Wasm bindings

commit 309e151
Author: Alexey <alexey@fckt.dev>
Date:   Fri Jul 26 20:18:32 2019 +0300

    fix #1042: Ban peer doesn't save to storage (#1093)

commit a4870f5
Author: Vladimir Grichina <vgrichina@gmail.com>
Date:   Thu Jul 25 16:35:31 2019 -0700

    Change how docker port mapping works for macos (#1086)

    * Apply Peter's fix to docker image start up code

    * fix port mapping in nodelib

commit 0fd0a32
Author: ckshei <cks856@gmail.com>
Date:   Thu Jul 25 15:25:56 2019 -0700

    neartest.com has been retired (#1098)

commit 3442597
Author: Bowen Wang <bowenwang1996@users.noreply.github.com>
Date:   Tue Jul 23 13:49:39 2019 -0700

    bump version to 0.2.6 (#1091)

    * Fix stake double return bug (#1084)

    * fix stake double return bug and update tests

    * use cache properly

    * properly implement stake returning

    * refactor test utils

    * fix gensis config

    * Fix block producer assignment (#1088)

    * fix block producer assignment

    * trying with test lock

    * tweak test parameters

    * bump version to 0.2.6

    * Update docker to have git version and use cache (#1092)
Move static functions into separate file from Runtime lib
ilblackdragon added a commit that referenced this pull request Aug 10, 2019
* Fix stake double return bug (#1084)

* fix stake double return bug and update tests

* use cache properly

* properly implement stake returning

* refactor test utils

* fix gensis config

* Fix block producer assignment (#1088)

* fix block producer assignment

* trying with test lock

* tweak test parameters

* Add epoch hash to block headers (#1089)

* add epoch hash to block header

* rework runtime adapter API

* address comments

* Check validator signature (#1100)

* check validator signature

* ignore flaky test

* fix (#1101)

* Telemetry (#1090)

* Add telemetry cargo, which sends RPC to given url. Add serde attributes to transaction to correctly serialize u128. Moved out information into a separate module called from client

* Added signature to info telemetry. Default url for telemetry. Better showing mem and cpu

* Add formatting for Option<BaseEncode>, fix comments

* bump version to 0.2.6 (#1091)

* Fix stake double return bug (#1084)

* fix stake double return bug and update tests

* use cache properly

* properly implement stake returning

* refactor test utils

* fix gensis config

* Fix block producer assignment (#1088)

* fix block producer assignment

* trying with test lock

* tweak test parameters

* bump version to 0.2.6

* Update docker to have git version and use cache (#1092)

* Disable test_kickout

* Remove trailing slash in DEFAULT_TELEMETRY_URL

* Adding node id to the info/telemetry

* Return stake 3 epochs later (#1105)

* Return stake 3 epochs later

* remove print

* fix test

* remove clutch

* Networking AccountId tracking (#1058)

* Remove account id from handshake

* Add AnnounceAccount

+ Communication between client and network on trigger
    Missing trigger condition

+ Routing table as mechanism to support conection through hops

* Improve signed data on announce & check conditions

* reformat announce account into simpler pieces

* Handle client side.

* Fix tests

* Provide `get_epoch_offset` for mock runtime

* Address small issues

* Use hash for epoch instead of height

* Verify signature from account announcement

* Verify route while announcing account

* nit

* Fix mock test

* Add missing verify

* Update NewtorkInfo api for ease to use on tests

* Add test for announce account.

Add routing information in NetworkInfo for testing.

* Exact cause for ban in invalid acc announcement.

* Add test for announce account with different graph

* Avoid extra clone and queries

* Fix up merge conflict

* Account deletion (#1107)

* Account deletion implementation

* Stakers can't be deleted, but must have more rent on their account (4 * epoch_length). Also added check_rent method to call after transaction execution to make sure there is still enough rent on the account

* Actually delete data when deleting an account and test that

* Add support for default values in runtime config (expected that we will put reasonable defaults in the binary), and fixed test_deserialize test / testnet.json

* Moved helper functions for transactions into test-utils User trait

* Reuse check_stake function from runtime and system

* Address comments

* Merge master into staging (#1116)

* bump version to 0.2.6 (#1091)

* Fix stake double return bug (#1084)

* fix stake double return bug and update tests

* use cache properly

* properly implement stake returning

* refactor test utils

* fix gensis config

* Fix block producer assignment (#1088)

* fix block producer assignment

* trying with test lock

* tweak test parameters

* bump version to 0.2.6

* Update docker to have git version and use cache (#1092)

* neartest.com has been retired (#1098)

* Change how docker port mapping works for macos (#1086)

* Apply Peter's fix to docker image start up code

* fix port mapping in nodelib

* fix #1042: Ban peer doesn't save to storage (#1093)

* Add registers to Wasm bindings

* Remove some unreachables (#1108)

* Revert back to cranelift backend for now (#1109)

Singlepass backend is crashing

* Fix stake test (#1095)

* Fix stake test

* Check expected validators.

* Specify expected validator order.

* No need to move anymore.

* Add slashing in validator manager (#1112)

* Add slashing in validator manager

* pass slashed_validators as a parameter to add_proposals

* change runtime adapter to include slashing

* refactor slashing

* Finish kickout test after everything gets verified (#1123)

* Finish kickout test after everything gets verified

* Remove println

* typo (#1124)

* Remove merge conflict issue from store/lib.rs

* Bump version to 0.2.7

* Fix test_deserialize issue

* Enabled sending telemetry data over https (#1149)

* Update testnet genesis (#1150)

* HARD FORK: update testnet genesis

* Dedup validators in get_epoch_producers

* Correct test and reduce size of docker by removing files after docker is done

* Zero out storage_used_at

* Validator proposals fix (#1154)

* Fix issue that validator proposals were not propagated to Block::produce

* Speed up sync_state_stake_change and remove extra print

* Update testnet genesis to 1859314 block

* Hot fixes to syncing issues

* Fix issue with orphan resolution

* Fix genesis with fisherman to 0 for now

* Fix rushed fix

* Fix validator_join and remove warning

* Fix total approvals formula when there are 2 validatos

* Bump up the timelimits for announce_account tests

* Check what happened on CI for the announce_account test

* Add ignore to account_announce tests as they are currently not fully propagating account into. Will be fixing separtely
ilblackdragon pushed a commit that referenced this pull request Aug 29, 2019
* Release v0.2.7 (#1155)

* Fix stake double return bug (#1084)

* fix stake double return bug and update tests

* use cache properly

* properly implement stake returning

* refactor test utils

* fix gensis config

* Fix block producer assignment (#1088)

* fix block producer assignment

* trying with test lock

* tweak test parameters

* Add epoch hash to block headers (#1089)

* add epoch hash to block header

* rework runtime adapter API

* address comments

* Check validator signature (#1100)

* check validator signature

* ignore flaky test

* fix (#1101)

* Telemetry (#1090)

* Add telemetry cargo, which sends RPC to given url. Add serde attributes to transaction to correctly serialize u128. Moved out information into a separate module called from client

* Added signature to info telemetry. Default url for telemetry. Better showing mem and cpu

* Add formatting for Option<BaseEncode>, fix comments

* bump version to 0.2.6 (#1091)

* Fix stake double return bug (#1084)

* fix stake double return bug and update tests

* use cache properly

* properly implement stake returning

* refactor test utils

* fix gensis config

* Fix block producer assignment (#1088)

* fix block producer assignment

* trying with test lock

* tweak test parameters

* bump version to 0.2.6

* Update docker to have git version and use cache (#1092)

* Disable test_kickout

* Remove trailing slash in DEFAULT_TELEMETRY_URL

* Adding node id to the info/telemetry

* Return stake 3 epochs later (#1105)

* Return stake 3 epochs later

* remove print

* fix test

* remove clutch

* Networking AccountId tracking (#1058)

* Remove account id from handshake

* Add AnnounceAccount

+ Communication between client and network on trigger
    Missing trigger condition

+ Routing table as mechanism to support conection through hops

* Improve signed data on announce & check conditions

* reformat announce account into simpler pieces

* Handle client side.

* Fix tests

* Provide `get_epoch_offset` for mock runtime

* Address small issues

* Use hash for epoch instead of height

* Verify signature from account announcement

* Verify route while announcing account

* nit

* Fix mock test

* Add missing verify

* Update NewtorkInfo api for ease to use on tests

* Add test for announce account.

Add routing information in NetworkInfo for testing.

* Exact cause for ban in invalid acc announcement.

* Add test for announce account with different graph

* Avoid extra clone and queries

* Fix up merge conflict

* Account deletion (#1107)

* Account deletion implementation

* Stakers can't be deleted, but must have more rent on their account (4 * epoch_length). Also added check_rent method to call after transaction execution to make sure there is still enough rent on the account

* Actually delete data when deleting an account and test that

* Add support for default values in runtime config (expected that we will put reasonable defaults in the binary), and fixed test_deserialize test / testnet.json

* Moved helper functions for transactions into test-utils User trait

* Reuse check_stake function from runtime and system

* Address comments

* Merge master into staging (#1116)

* bump version to 0.2.6 (#1091)

* Fix stake double return bug (#1084)

* fix stake double return bug and update tests

* use cache properly

* properly implement stake returning

* refactor test utils

* fix gensis config

* Fix block producer assignment (#1088)

* fix block producer assignment

* trying with test lock

* tweak test parameters

* bump version to 0.2.6

* Update docker to have git version and use cache (#1092)

* neartest.com has been retired (#1098)

* Change how docker port mapping works for macos (#1086)

* Apply Peter's fix to docker image start up code

* fix port mapping in nodelib

* fix #1042: Ban peer doesn't save to storage (#1093)

* Add registers to Wasm bindings

* Remove some unreachables (#1108)

* Revert back to cranelift backend for now (#1109)

Singlepass backend is crashing

* Fix stake test (#1095)

* Fix stake test

* Check expected validators.

* Specify expected validator order.

* No need to move anymore.

* Add slashing in validator manager (#1112)

* Add slashing in validator manager

* pass slashed_validators as a parameter to add_proposals

* change runtime adapter to include slashing

* refactor slashing

* Finish kickout test after everything gets verified (#1123)

* Finish kickout test after everything gets verified

* Remove println

* typo (#1124)

* Remove merge conflict issue from store/lib.rs

* Bump version to 0.2.7

* Fix test_deserialize issue

* Enabled sending telemetry data over https (#1149)

* Update testnet genesis (#1150)

* HARD FORK: update testnet genesis

* Dedup validators in get_epoch_producers

* Correct test and reduce size of docker by removing files after docker is done

* Zero out storage_used_at

* Validator proposals fix (#1154)

* Fix issue that validator proposals were not propagated to Block::produce

* Speed up sync_state_stake_change and remove extra print

* Update testnet genesis to 1859314 block

* Hot fixes to syncing issues

* Fix issue with orphan resolution

* Fix genesis with fisherman to 0 for now

* Fix rushed fix

* Fix validator_join and remove warning

* Fix total approvals formula when there are 2 validatos

* Bump up the timelimits for announce_account tests

* Check what happened on CI for the announce_account test

* Add ignore to account_announce tests as they are currently not fully propagating account into. Will be fixing separtely

* Remove #update-as from dependencies (#1168)

* Remove #nightshade from near-shell dependency (#1169)

* Add print headers to state-viewer (#1171)

* add print headers to state-viewer

* more info

* Fix bug in printing blocks (#1173)

* add print headers to state-viewer

* more info

* fix

* Allow state viewer to replay chain (#1175)

* Allow state viewer to replay chain

* add help

* Fix incorrect epoch hash computation (#1214)

* Fix incorrect epoch hash computation

* fix another bug

* bump version to 0.2.8

* use bs58 properly

* fix tests

* address comments

* Fix compilatoin error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ban peer doesn't save to storage
2 participants