View Issue Details

IDProjectCategoryView StatusLast Update
0001143Spring engineGeneralpublic2008-10-16 14:32
ReporterLicho Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version0.77b4+svn 
Summary0001143: Releasing new spring version changes unitsync hashes of all maps - breaking downloader
DescriptionDownloader in SL and SpringDownloader depend on springlobby hashes to identify maps and mods.

Now each new version of engine produces completely new hashes breaking whole system down.
Can it be avoided by not hashing springcontent?
Additional Informationcrosspost: http://spring.clan-sy.com/phpbb/viewtopic.php?f=12&t=16506
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

Licho

2008-10-15 01:59

reporter   ~0002909

*unitsync hashes
(why cant i edit post :(

imbaczek

2008-10-15 10:45

reporter   ~0002913

i'm not sure if unitsync hashes are good for this type of usage; couldn't the torrent infrastructure use plain old SHA1 or MD5?

Licho

2008-10-15 12:37

reporter   ~0002917

No it could not :)
Do you have any idea how long it takes to hash all maps and mods?
It has to detect all changes quickly without need for rehash..
It also has to support search by unitsync hash, because lobby system only uses unitsync hash (it has to be able to download mod/map when you join game, and when you join game lobby gives you unitsync hash).

Spring should have fast universal resource hashing infrastructure and unitsync obviously is fast and works well. Only problem is that it currently includes springcontent in map hashes and that hash is 32bit CRC .. it should be bigger to avoid collisions.

imbaczek

2008-10-15 15:08

reporter   ~0002919

exactly my point, unitsync would have to make md5/sha1 itself anyway... for now, I'll see if it's possible to add GetArchiveChecksumNoDeps.

Kloot

2008-10-15 15:43

developer   ~0002920

Don't map scripts depend on the gadget handler in springcontent.sdz?

imbaczek

2008-10-15 16:55

reporter   ~0002921

upon closer investigation, unitsync already provides GetArchiveChecksum function. don't know why you don't use that. GetMod/MapChecksum are supposed to be used by lobbies for syncing games, so it makes sense if version mismatches are detected by that.

Licho

2008-10-15 17:05

reporter   ~0002922

I have to use what lobbies use :)

How would i know what to download if my hashes were different from lobby hashes?

Licho

2008-10-15 17:05

reporter   ~0002923

I have to use what lobbies use :)

How would i know what to download if my hashes were different from lobby hashes?

Licho

2008-10-15 17:11

reporter   ~0002924

Map and mod hashes should NOT depend on engine content. Especially if we want to allow multiple engine versions in the future.
There should be separate check for engine version (incl. springcontent), but imo springcontent has nothing to do with map and mod and should be excluded from hashing.

imbaczek

2008-10-15 17:29

reporter   ~0002926

like I said: use GetArchiveChecksum. It does what you want.

GetMod/MapChecksum _will_ differ across versions. springcontent contains lua that loads the archives, so it has to be included in the checksum for ingame sync. AFAIK unitsync is really required only when joining a battle, so an appropriate version can be loaded when joining a battle in the lobby (when the lobby server will announce which engine version a given battle uses.)

Licho

2008-10-16 13:24

reporter   ~0002952

Yeah, only problem is, that this "use maparchive" applies to all lobbies :)
Its trivial change for me..

imbaczek

2008-10-16 14:32

reporter   ~0002957

closing this as it's too generic; will need several tickets which list what changes are required to the engine and unitsync, and perhaps springsync (I don't like the name, gimme something that says what it does ;p)

For now, I refer everyone interested to the linked forum discussion (see additional information.)

Issue History

Date Modified Username Field Change
2008-10-15 01:59 Licho New Issue
2008-10-15 01:59 Licho Note Added: 0002909
2008-10-15 10:45 imbaczek Note Added: 0002913
2008-10-15 12:37 Licho Note Added: 0002917
2008-10-15 15:08 imbaczek Note Added: 0002919
2008-10-15 15:43 Kloot Note Added: 0002920
2008-10-15 16:56 imbaczek Note Added: 0002921
2008-10-15 17:05 Licho Note Added: 0002922
2008-10-15 17:05 Licho Note Added: 0002923
2008-10-15 17:11 Licho Note Added: 0002924
2008-10-15 17:29 imbaczek Note Added: 0002926
2008-10-16 10:47 imbaczek Additional Information Updated
2008-10-16 13:24 Licho Note Added: 0002952
2008-10-16 14:32 imbaczek Status new => closed
2008-10-16 14:32 imbaczek Note Added: 0002957
2008-10-16 14:32 imbaczek Resolution open => no change required