-
Notifications
You must be signed in to change notification settings - Fork 167
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
World metadatas no uploaded after fail #2096
Comments
related: #2079 |
Closed in #2203. |
@glihm this was initially the part of the linked PR, but which the new approach we took of fetching it from onchain this would have not been fixed in the same PR. although this is less likely to happen so we can probably add a flag to force upload metadata |
Can i try this ? |
sure @AshokGorana, but first can you describe how you plan to address this issue? |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedi want to start me open source journey and i thinks it'd be a great place for me.... can i please get this issue? |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI'm an IT student persuing final year |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedi'm a blockchain developer from 2022 and here is my github profile - https://github.com/jaikumar9 How I plan on tackling this issueAllow metadata updates after deployment with an admin function. |
@lambda-0x can i try this issue? |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedlove to work on this |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI am a Python programmer and also a Cairo programmer also I am pleased to say my skills can be of great value in this project thank you How I plan on tackling this issueI will approach this project by using the knowledge I have on Cairo and as a lover of games I will be of great assistance |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI come from a programming and web development background having worked on various client-based projects and freelanced on People Per Hour and contributed to open-source initiatives. I have also worked with responsive and stateful websites and applications which included careful migration and deployment processes. My work in mortgages has reinforced my problem-solving skills which are aimed towards reliability and long term solutions of the system. This is the way why I think I can use both of these relevant aspects for analyzing the bug in Dojo’s world metadata handling and making sure that such things don’t happen again. How I plan on tackling this issueFirst I would investigate why metadata is only uploaded once and not updated on subsequent deployments if errors occur. To do this: Reproduce the Bug: I would follow the steps (initiating and canceling the migration after base and world contracts have been deployed) and look at the logs and contract states to see where metadata handling fails. Fix Metadata Upload Logic: I would refactor the metadata upload process so it’s not tied to the world creation phase. Instead I would make sure metadata can be uploaded or updated at any point post creation. This could mean: Implementing a retry mechanism for metadata upload failures during deployment. Adding the ability to update world metadata after initial deployment, perhaps by introducing a separate function or migration step for metadata updates. Test Thoroughly: After the fix I would write comprehensive tests to simulate various deployment failures (e.g. server crashes, network issues) to make sure the metadata upload mechanism is robust. Optimize and Document: Finally I would document this new process clearly and make sure any future contributors or users of the platform can update metadata without having to redeploy the entire world contract. |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedGiven your scenario and the nature of the bug, my background in Python, data handling, and logical problem-solving could be helpful in diagnosing and resolving this issue. Specifically: Programming Experience: I could assist in crafting solutions for ensuring metadata is always uploaded, either by retrying failed uploads or allowing manual updates. How I plan on tackling this issueIdentify Where the Issue Occurs: The logic handling the uploading of metadata. When exactly is the metadata uploaded in the flow? Ensure the metadata upload is transactional. This means if the deployment fails or is canceled, any action related to metadata upload would be rolled back. This could be done by: Catch deployment errors: When the deployment process is canceled or fails, catch these errors and: Manual Update API/Functionality: Implement a manual method (either through CLI, smart contract functions, or a dedicated update tool) to allow users to upload or update metadata at any point after the world is deployed. Versioning: Consider adding versioning or timestamps to metadata updates so that any updated information is traceable. def update_metadata(world_id, new_metadata): Verification: After the contracts are deployed, check if metadata exists for the world. The metadata is uploaded properly in all cases (success, failure, or cancellation). |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI am a back-end developer with strong experience in systems architecture, databases, and cloud infrastructure. I specialize in frameworks like NestJS and database management systems such as PostgreSQL, which enable me to design reliable and scalable backend services. Additionally, I am proficient in TypeScript, which strengthens my ability to handle complex codebases with a clear focus on typing and structure. My background enables me to understand issues related to deployment processes and system upgrades. Given my experience, I can identify bottlenecks in software deployments, data synchronization problems, and architectural pitfalls. This skill set would allow me to analyze and resolve bugs like the metadata upload issue in your system. How I plan on tackling this issueAnalyze and Debug the Existing Code: My first step would be to examine the existing deployment logic related to the dojo::world::world metadatas. I would review how and when the metadatas are triggered for upload and investigate if they are tied to specific conditions during world creation. Implement a Retry Mechanism: Since the issue occurs when the initial deployment fails, I would introduce a retry mechanism that allows metadata uploads to re-attempt in case of errors. This could be done by adding error-handling mechanisms that ensure metadata upload is retried after failure rather than abandoned. Add Metadata Update Functionality: I would introduce a separate function or API endpoint allowing updates to metadatas after initial world creation. This would allow administrators or developers to manually update world metadata whenever required, resolving the problem of immutability. Testing and Validation: I would thoroughly test this fix by simulating various scenarios such as deployment failures, re-attempted migrations, and metadata updates. This would help ensure that the solution is robust across different environments. Analyze and Debug the Existing Code: My first step would be to examine the existing deployment logic related to the dojo::world::world metadatas. I would review how and when the metadatas are triggered for upload and investigate if they are tied to specific conditions during world creation. Implement a Retry Mechanism: Since the issue occurs when the initial deployment fails, I would introduce a retry mechanism that allows metadata uploads to re-attempt in case of errors. This could be done by adding error-handling mechanisms that ensure metadata upload is retried after failure rather than abandoned. Add Metadata Update Functionality: I would introduce a separate function or API endpoint allowing updates to metadatas after initial world creation. This would allow administrators or developers to manually update world metadata whenever required, resolving the problem of immutability. Testing and Validation: I would thoroughly test this fix by simulating various scenarios such as deployment failures, re-attempted migrations, and metadata updates. This would help ensure that the solution is robust across different environments. |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI have over 3 years of experience as a backend developer, with a strong focus on blockchain technology, particularly in smart contract development and deployment. I have previously taught over 400 students about blockchain at Anna University, which has given me a solid foundation in the intricacies of decentralized applications. My expertise includes working with technologies such as Hardhat, Polygon Mumbai, and more recently, Dojo, where I have been involved in smart contract migration, debugging, and optimization. I have also worked across multiple development roles, giving me a holistic view of both technical and architectural challenges within blockchain systems. How I plan on tackling this issueAnalyze the Deployment Process: I would begin by conducting a thorough analysis of the deployment pipeline for the world contract and metadata. This involves identifying the exact step where metadata upload is triggered and where the process fails when deployment is interrupted. By breaking down the entire flow, I can pinpoint vulnerabilities in the sequence. Implement Error Handling and Fallbacks: One of the key issues here is that metadata upload is not retried after an initial failure. I would design a more robust error-handling mechanism by implementing automatic retries or checkpoints, ensuring that metadata upload does not happen until the world contract is fully deployed. This would guarantee that an incomplete deployment does not prevent the upload of essential metadata. Enable Metadata Updates: Given that there's no current mechanism to update metadata, I would extend the contract to include functionality that allows the update of metadata post-deployment. This could be done through an additional function in the smart contract that can be called only when certain conditions are met (e.g., verifying that the initial metadata upload was unsuccessful). |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI am Full-Stack Web Developer with over 4+ years of experience How I plan on tackling this issueTo address the issue of world metadata only being uploaded once during world creation in the Dojo framework, and the complications that arise if an error occurs during the initial deployment, follow these steps:
|
Describe the bug
World metadatas are only uploaded once, at world creation.
If an error occurs on first deployement before uploading metadatas, no metadatas will be uploaded for
dojo::world::world
Moreover there is no easy way to update world metadatas
To Reproduce
with dojo starter, start a migration and cancel after base & world contract has been deployed
relaunch migration
Additional context
0.7.2
The text was updated successfully, but these errors were encountered: