• Welcome to SC4 Devotion Forum Archives.

Reliable IID Allocation with Blockchain

Started by ChiefZDN, September 23, 2017, 10:42:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ChiefZDN

Hello,

IID (instance ID) ranges is important for group-dependent mods, including texture packs. IID ranges can be inserted easily in PIM. However, your IID ranges will be clashes with others. So, a mechanism, IID ranges allocation is used. However, there are some flaws: few points of failure and lack of inter-server communication. These can be fixed by making the database shared across server as in the diagram. Users can be easily request a ranges and others can give (with screenshot) & rate the range (using karma system). The approval is very fast. Every data is encrypted, so the possibility to be hacked is low.

However, as any other projects, this is come with challenges. First, I'm not programmer but I know the blockchain concept. So, implementation isn't my area. However, there are APIs there, like Ethereum API (not to be confused with a cryptocurrency with similar name). Second, no security is perfect. Although I designed this to be tamper-proof, this isn't prevent 100% of attacks. For instance, Bitcoin can be hacked by 51% thing (I don't know precisely what is it). Also, there's a chance of error due to it's community-contributed. I hope you can fix these issues.

Want to support this project? You don't need to give me a karma! (although I don't reject it too if my project is nice). You just need to discuss the solution and implementing it.

Sorry for mistakes. Thanks for reading!  :thumbsup:

mgb204

Actually this problem is simply a non-issue for most normal modding activities, such as making BAT models, Lots or Exemplars. Why?, well simply because Maxis set things up so well, that the potential number of IDs is so astronomical, it makes the odds of a conflict literally lower than winning the lottery. Each ID is auto-generated based on a timestamp, two modders would have to create something in the exact same second for a conflict to occur.

Over all these years, conflicts have been very rare and when they do come up, it's far more likely the result of a modding error. Otherwise a result of someone who thought they knew better and used a manual ID system, which actually hugely increases the odds of a conflict occurring. To put this into content, each type of game item has at least 88 (16,777,216) unique IDs.

Big exceptions to this rule, where the number of IDs are more limited due to game limitations or specific ID reservation is required include:


  • NAM Content
    The NAM has reserved the entire range of instance IDs that begin with 0x5 for it's content. This system is well established and internally we handle ID allocation to prevent conflicts.
  • Prop/Building Families
    There is a dedicated range already setup for this, if you need IDs, the community (currently me), will ensure you are provided with a unique set of IDs for use to prevent conflicts. We manage the allocations and ensure records are kept of all assigned IDs.
  • Texture IDs
    Much the same as with the Prop/Building families above, this has been handled by the community.
  • MMPs
    Once more a dedicated range exists for MMPs and anyone wishing to make MMPs should apply for one.

Provided modders do not usurp the correct process of applying for and using reserved ranges for such items, no issues will occur with conflicts. Extending allocated ranges to general content like Lots and Mods would just complicate matters and provide very little in the way of benefits. The reality is that the apps themselves handle this for everyone and that system, whilst not flawless, really isn't causing troubles.

Everything discussed here is nothing new, as such solutions where needed, have long since been in place. It is my personal belief that we have a good system that works currently in place, if it ain't broke, why fix it?

ChiefZDN

Quote from: mgb204 on September 24, 2017, 06:02:10 AM
.., if it ain't broke, why fix it?

Yes, I'm agree with your quotation. However, what I do is fix the IID reservation system. There are some flaws: single point of failure and lack of coordination. Yes, in normal circumstances, these are not problems. But, if we don't have coordination between our site (SC4D) and ST and get a conflict, this is difficult to fix, especially if the mod has been circulated. Also, if some of givers (like you) aren't active again, it's difficult to assign an IID correctly. There are alternatives, like manual consensus. I'll review more in a follow-up reply.

Thanks,

mgb204

Well to be fair, how do you know what out procedures are in this regard? So how do you know if there is a single-point of failure?

As for coordination between ST and SC4D, there doesn't need to be any, the ranges are applied for here on SC4D, regardless of the site being used. Although, I would like to see it made possible to apply for ranges on either site, it's not a huge priority. In any case it would be difficult to extend that beyond ST and there are many more SC4 sites out there. I think it's always been understood that this is where it's managed for the benefit of all.

If someone releases a mod without due consideration of ID ranges, the fix is simple. If you are not using a valid assigned range, that user should alter the IDs accordingly and redistribute the files. This system has worked just fine for a long time, the issue rarely even comes up.

As for those assigning IDs being active or not, that's something I've already got plans in place to cover. I hope we will move to a new system here that allows for any active staff member to handle such requests, this same system will also ensure there isn't a single point of failure in the system with multiple redundant backups. We don't need a hugely complex piece of software to handle a few spreadsheets.

ChiefZDN

Quote from: mgb204 on September 25, 2017, 06:38:43 AM
Well to be fair, how do you know what out procedures are in this regard? So how do you know if there is a single-point of failure?

As for coordination between ST and SC4D, there doesn't need to be any, the ranges are applied for here on SC4D, regardless of the site being used. Although, I would like to see it made possible to apply for ranges on either site, it's not a huge priority. In any case it would be difficult to extend that beyond ST and there are many more SC4 sites out there. I think it's always been understood that this is where it's managed for the benefit of all.

If someone releases a mod without due consideration of ID ranges, the fix is simple. If you are not using a valid assigned range, that user should alter the IDs accordingly and redistribute the files. This system has worked just fine for a long time, the issue rarely even comes up.

As for those assigning IDs being active or not, that's something I've already got plans in place to cover. I hope we will move to a new system here that allows for any active staff member to handle such requests, this same system will also ensure there isn't a single point of failure in the system with multiple redundant backups. We don't need a hugely complex piece of software to handle a few spreadsheets.

Staff member? Not all staffs are mod collector like you. If I'm a staff here, I will not assign the ID without asking others. This is significantly increase the time needed to give IID, from few minutes to days. So, I recommend to decentralize the system to members. If you think blockchain is complex, use the previous system with decentralization is good.

APSMS

It's worth pointing out that in all the years since the establishment first of Simtropolis and the BSC, and the later split of the English-speaking SC4 community to SC4Devotion and SimPeg, and with all the foreign-language sites like SC China, the numerous Japanese Creators, SCKurier, SCPolska, ToutCities, and the LBT, the number of IID conflicts between users' creations can be found almost in the single digits.

Foreign Language users have never apparently had an issue coming to the English-speaking side of the fandom to reserve IIDs, and the proliferation of the creations on those sites should indicate that if anything the method of IID assignment was actually a way to facilitate communication between portions of the fandom that might have never interacted otherwise, given the inherent language barrier.

Additionally, IIDs are assigned on request based on need, not on worthiness of the requester. People banned from places like SC4Devotion are not restricting from having IID ranges or using them as needed. In fact if they have a range it serves the community because it prevents conflicts if they ever release mods elsewhere on the internet.

So even that part is not really clear. All the IID allocations are in a very old spreadsheet. It's not like there's an issue with handing out new ones; a simple search is made to ensure no prior range was granted and then if it's a valid new request the next range down on the list is handed out. What consultation is needed?
Experience is something you don't get until just after you need it.

My Mayor Diary San Diego: A Reinterpretation