Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Bad behaviour on _newPeers list map #3682

Closed
diego-G opened this issue May 21, 2019 · 1 comment
Closed

Bad behaviour on _newPeers list map #3682

diego-G opened this issue May 21, 2019 · 1 comment

Comments

@diego-G
Copy link

diego-G commented May 21, 2019

Expected behavior

P2P {
  _newPeers:
   Map {
     '127.0.0.1:5009' => {
       wsPort: 5009,
       nethash:
        'da3ed6a45429278bac2666961289ca17ad86595d33b31037615d4b8e8f158bba',
       version: '1.0.1',
       protocolVersion: '1.0.1',
       minVersion: '1.0.0',
       os: 'darwin',
       height: 0,
       broadhash:
        '2768b267ae621a9ed3b3034e2e8a1bed40895c621bbb1bbd613d92b9d24e54b5',
       nonce: 'O2wTkjqplHII5009',
       httpPort: 0,
       ipAddress: '127.0.0.1' 
      }
   },
}

Actual behavior

P2P {
  _newPeers:
   Map {
     '127.0.0.1:5009' => { 
       '0': '{',     <---- ERROR
       '1': '"',     <---- ERROR
       '2': 'w',     <---- ERROR
       '3': 's',     <---- ERROR
       '4': 'P',     <---- ERROR
       ...           <---- ERROR
       '300': '}',   <---- ERROR
       wsPort: 5009,
       nethash:
        'da3ed6a45429278bac2666961289ca17ad86595d33b31037615d4b8e8f158bba',
       version: '1.0.1',
       protocolVersion: '1.0.1',
       minVersion: '1.0.0',
       os: 'darwin',
       height: 0,
       broadhash:
        '2768b267ae621a9ed3b3034e2e8a1bed40895c621bbb1bbd613d92b9d24e54b5',
       nonce: 'O2wTkjqplHII5009',
       httpPort: 0,
       ipAddress: '127.0.0.1' 
      }
   },
}

Steps to reproduce

Log p2p['_newPeers'] array object in any test.

Which version(s) does this affect? (Environment, OS, etc...)

2.0+

@diego-G
Copy link
Author

diego-G commented May 22, 2019

https://jenkins.lisk.io/job/lisk-sdk-framework/job/3699-remove_nonce_when_broadcasting/1/execution/node/548/log/?consoleFull

11:34:09  > URI: GET http://0.0.0.0:4000/api/peers
11:34:09  > Query: {"state":2}
11:34:09  > Response: 200 {"meta":{"offset":0,"limit":10,"count":2},"data":[{"ip":"127.0.0.1","broadhash":"198f2b61a8eb95fbeed58b8216780b68f697f26b849acf00c8c93bb9b24f783d","state":2,"height":1,"wsPort":47510,"httpPort":47511,"nonce":"70ISerigyoiEeyfQ","os":"win64","version":"2.0.0","protocolVersion":"1.1"},{"0":"{","1":"\"","2":"b","3":"r","4":"o","5":"a","6":"d","7":"h","8":"a","9":"s","10":"h","11":"\"","12":":","13":"\"","14":"1","15":"9","16":"8","17":"f","18":"2","19":"b","20":"6","21":"1","22":"a","23":"8","24":"e","25":"b","26":"9","27":"5","28":"f","29":"b","30":"e","31":"e","32":"d","33":"5","34":"8","35":"b","36":"8","37":"2","38":"1","39":"6","40":"7","41":"8","42":"0","43":"b","44":"6","45":"8","46":"f","47":"6","48":"9","49":"7","50":"f","51":"2","52":"6","53":"b","54":"8","55":"4","56":"9","57":"a","58":"c","59":"f","60":"0","61":"0","62":"c","63":"8","64":"c","65":"9","66":"3","67":"b","68":"b","69":"9","70":"b","71":"2","72":"4","73":"f","74":"7","75":"8","76":"3","77":"d","78":"\"","79":",","80":"\"","81":"n","82":"e","83":"t","84":"h","85":"a","86":"s","87":"h","88":"\"","89":":","90":"\"","91":"1","92":"9","93":"8","94":"f","95":"2","96":"b","97":"6","98":"1","99":"a","100":"8","101":"e","102":"b","103":"9","104":"5","105":"f","106":"b","107":"e","108":"e","109":"d","110":"5","111":"8","112":"b","113":"8","114":"2","115":"1","116":"6","117":"7","118":"8","119":"0","120":"b","121":"6","122":"8","123":"f","124":"6","125":"9","126":"7","127":"f","128":"2","129":"6","130":"b","131":"8","132":"4","133":"9","134":"a","135":"c","136":"f","137":"0","138":"0","139":"c","140":"8","141":"c","142":"9","143":"3","144":"b","145":"b","146":"9","147":"b","148":"2","149":"4","150":"f","151":"7","152":"8","153":"3","154":"d","155":"\"","156":",","157":"\"","158":"s","159":"t","160":"a","161":"t","162":"e","163":"\"","164":":","165":"2","166":",","167":"\"","168":"h","169":"e","170":"i","171":"g","172":"h","173":"t","174":"\"","175":":","176":"1","177":",","178":"\"","179":"w","180":"s","181":"P","182":"o","183":"r","184":"t","185":"\"","186":":","187":"4","188":"4","189":"8","190":"8","191":"0","192":",","193":"\"","194":"h","195":"t","196":"t","197":"p","198":"P","199":"o","200":"r","201":"t","202":"\"","203":":","204":"4","205":"4","206":"8","207":"8","208":"1","209":",","210":"\"","211":"n","212":"o","213":"n","214":"c","215":"e","216":"\"","217":":","218":"\"","219":"O","220":"A","221":"1","222":"v","223":"G","224":"1","225":"k","226":"6","227":"x","228":"H","229":"n","230":"X","231":"R","232":"v","233":"n","234":"q","235":"\"","236":",","237":"\"","238":"o","239":"s","240":"\"","241":":","242":"\"","243":"u","244":"b","245":"u","246":"n","247":"t","248":"u","249":"\"","250":",","251":"\"","252":"v","253":"e","254":"r","255":"s","256":"i","257":"o","258":"n","259":"\"","260":":","261":"\"","262":"2","263":".","264":"0","265":".","266":"0","267":"\"","268":",","269":"\"","270":"m","271":"i","272":"n","273":"V","274":"e","275":"r","276":"s","277":"i","278":"o","279":"n","280":"\"","281":":","282":"\"","283":"1","284":".","285":"0","286":".","287":"0","288":"\"","289":",","290":"\"","291":"p","292":"r","293":"o","294":"t","295":"o","296":"c","297":"o","298":"l","299":"V","300":"e","301":"r","302":"s","303":"i","304":"o","305":"n","306":"\"","307":":","308":"\"","309":"1","310":".","311":"1","312":"\"","313":"}","ip":"127.0.0.1","broadhash":"198f2b61a8eb95fbeed58b8216780b68f697f26b849acf00c8c93bb9b24f783d","state":2,"height":1,"wsPort":44880,"httpPort":44881,"nonce":"OA1vG1k6xHnXRvnq","os":"ubuntu","version":"2.0.0","protocolVersion":"1.1"}],"links":{}}
11:34:09  > Response Error: [{"code":"OBJECT_ADDITIONAL_PROPERTIES","params":[["313","312","311","310","309","308","307","306","305","304","303","302","301","300","299","298","297","296","295","294","293","292","291","290","289","288","287","286","285","284","283","282","281","280","279","278","277","276","275","274","273","272","271","270","269","268","267","266","265","264","263","262","261","260","259","258","257","256","255","254","253","252","251","250","249","248","247","246","245","244","243","242","241","240","239","238","237","236","235","234","233","232","231","230","229","228","227","226","225","224","223","222","221","220","219","218","217","216","215","214","213","212","211","210","209","208","207","206","205","204","203","202","201","200","199","198","197","196","195","194","193","192","191","190","189","188","187","186","185","184","183","182","181","180","179","178","177","176","175","174","173","172","171","170","169","168","167","166","165","164","163","162","161","160","159","158","157","156","155","154","153","152","151","150","149","148","147","146","145","144","143","142","141","140","139","138","137","136","135","134","133","132","131","130","129","128","127","126","125","124","123","122","121","120","119","118","117","116","115","114","113","112","111","110","109","108","107","106","105","104","103","102","101","100","99","98","97","96","95","94","93","92","91","90","89","88","87","86","85","84","83","82","81","80","79","78","77","76","75","74","73","72","71","70","69","68","67","66","65","64","63","62","61","60","59","58","57","56","55","54","53","52","51","50","49","48","47","46","45","44","43","42","41","40","39","38","37","36","35","34","33","32","31","30","29","28","27","26","25","24","23","22","21","20","19","18","17","16","15","14","13","12","11","10","9","8","7","6","5","4","3","2","1","0"]],"message":"Additional properties not allowed: 313,312,311,310,309,308,307,306,305,304,303,302,301,300,299,298,297,296,295,294,293,292,291,290,289,288,287,286,285,284,283,282,281,280,279,278,277,276,275,274,273,272,271,270,269,268,267,266,265,264,263,262,261,260,259,258,257,256,255,254,253,252,251,250,249,248,247,246,245,244,243,242,241,240,239,238,237,236,235,234,233,232,231,230,229,228,227,226,225,224,223,222,221,220,219,218,217,216,215,214,213,212,211,210,209,208,207,206,205,204,203,202,201,200,199,198,197,196,195,194,193,192,191,190,189,188,187,186,185,184,183,182,181,180,179,178,177,176,175,174,173,172,171,170,169,168,167,166,165,164,163,162,161,160,159,158,157,156,155,154,153,152,151,150,149,148,147,146,145,144,143,142,141,140,139,138,137,136,135,134,133,132,131,130,129,128,127,126,125,124,123,122,121,120,119,118,117,116,115,114,113,112,111,110,109,108,107,106,105,104,103,102,101,100,99,98,97,96,95,94,93,92,91,90,89,88,87,86,85,84,83,82,81,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0","path":["data","1"]}]
11:34:09        1) using valid value state=2

@diego-G diego-G self-assigned this May 27, 2019
shuse2 added a commit that referenced this issue May 29, 2019
Fix failure to generate block within delegate slot due to Inadequate broadhash consensus - Closes #3687 & #3682
@shuse2 shuse2 closed this as completed in 72e3454 May 29, 2019
@jondubois jondubois added this to the P2P robust peer selection milestone Jun 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants